diff -Nru camlimages-3.0.1/0BUILD.sh camlimages-4.0.1/0BUILD.sh --- camlimages-3.0.1/0BUILD.sh 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/0BUILD.sh 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,7 @@ +#!/bin/sh +export ACLOCAL='aclocal -I ../autoconf' +autoreconf --install +./configure --prefix $PREFIX +make clean all install +cp src/*.sp?t $PREFIX/lib/ocaml/site-lib/camlimages/ +(cd examples/liv; make opt; /bin/cp liv.opt $PREFIX/bin) diff -Nru camlimages-3.0.1/aclocal.m4 camlimages-4.0.1/aclocal.m4 --- camlimages-3.0.1/aclocal.m4 2007-10-11 10:50:40.000000000 +0200 +++ camlimages-4.0.1/aclocal.m4 1970-01-01 02:00:00.000000000 +0200 @@ -1,904 +0,0 @@ -# generated automatically by aclocal 1.8.3 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.8.3])]) - -# AM_AUX_DIR_EXPAND - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 6 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]) -fi])]) - -# serial 7 -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -#serial 2 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 11 - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl - -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# -*- Autoconf -*- - - -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# -# Check to make sure that the build environment is sane. -# - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -m4_include([./ocaml.m4]) diff -Nru camlimages-3.0.1/Announce camlimages-4.0.1/Announce --- camlimages-3.0.1/Announce 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/Announce 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,28 @@ +Version 2.12 of the CamlImages library, by Jun Furuse, François +Pessaux, and Pierre Weis, is now available. + +CamlImages is an image processing library, which provides to the +objective Caml programmer: + + ** basic functions for image processing and loading/saving various image + file formats (hence providing a translation facility from format to format), + + ** an interface with the Caml graphics library allows to display + images in the Graphics module screen and to mix them with Caml + drawings, + + ** a freetype interface, integrated into the library: + you can draw texts into images using any truetype fonts, + + ** a set of example programs, including gif animation, slide show, postscript + converter to print images. + +Version 2.12 adds support for lablgtk2 and is also a bug fix release. + +Sources and documentation are available from: + +http://pauillac.inria.fr/camlimages/eng.htm + +ftp://ftp.inria.fr/INRIA/caml-light/bazar-ocaml/camlimages-2.12.tgz + +Contributions and comments are welcome. diff -Nru camlimages-3.0.1/Announce-4.0.1.txt camlimages-4.0.1/Announce-4.0.1.txt --- camlimages-3.0.1/Announce-4.0.1.txt 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/Announce-4.0.1.txt 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,37 @@ +Hi, + +I'm glad to announce the availability of the 4.0.1 version of the +CamlImages library, by Jun Furuse, François Pessaux, and Pierre Weis. + +This is a bug fix release. + +The software home page is: + +http://cristal.inria.fr/camlimages/eng.htm + +Sources and documentation are available from: + +http://cristal.inria.fr/camlimages/camlimages-3.0.2.tgz +ftp://ftp.inria.fr/INRIA/Projects/cristal/caml-light/bazar-ocaml/camlimages-3.0.2.tgz + +Contributions and comments are welcome. + +Pierre Weis & June Furuse + +CamlImages is an image processing library, which provides to the +objective Caml programmer a lot of image processing functionality. + +CamlImages provides to the objective Caml programmer: + + ** basic functions for image processing and loading/saving various image + file formats (hence providing a translation facility from format to format), + + ** an interface with the Caml graphics library allows to display + images in the Graphics module screen and to mix them with Caml + drawings, + + ** a freetype interface, integrated into the library: + you can draw texts into images using any truetype fonts, + + ** a set of example programs, including gif animation, slide show, + and a postscript converter to print images. diff -Nru camlimages-3.0.1/Changes.txt camlimages-4.0.1/Changes.txt --- camlimages-3.0.1/Changes.txt 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/Changes.txt 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,65 @@ +4.0.1 + * Minor bug fixes, patch submitted by Damien Doligez + +4.0.0 + * Stop supporting the autoconf build. (It might works though.) + * Instead of autoconf, using omake and ocamlfind + * Subpackages: no need to link codes for uninterested format. + * Stop supporting lablgtk1 + - Ximage2 module is now Ximage, and the older Ximage is removed + - OXimage2 module is now OXimage, and the older OXimage is removed + +3.2.0 + * Misnamed version. It should have been 3.0.3 or something. + * Small bug fix for image load memory allocation vulnerability + +3.0.2 + * O'Caml 3.11 port. + * Integer overflow vulnerability fix for pngread.c + +3.0.1 + * Alpha channel support for png images. + +3.0.0 + * new version numbering scheme + * autoconf and makefiles cleanup + * fix examples compilation + +2.2.1 + * Now compiling with -warn-error -A +2.2 + * complete code review and rewriting + * the main module, originally named "Image" is now "Images". + * the whole set of compiled files are now installed in the library + * a new export for the Ps module: + get_bounding_box : string -> bounding_box + returns the bounding box option of a postscript file image. +2.12 + * O'Caml 3.07 port. Added support for lablgtk2. +2.11 + * bug fix release +2.01 + * bug fix at load_Glyph at freetype1/ftintf.c +2.00 + * O'Caml 3.03 dll support. (This and later versions of camlimages + will not work with the older O'Camls). + * Better support for giflib library +1.03 + * Image.save takes the image format now as an option. +1.02 + * added CMYK (Cyan Magenta Yellow and blacK) color space + (even though we have no trivial good color conversion + between CMYK and RGB) + * added RGBA (RGB with the Alpha channel) and CMYK images + * Colorhist + * Unit + * Geometry + + * (Jpeg now supports CMYK image reading and writing) + * Postscript +1.01 + * fix for O'Caml 3.00 + lablgtk 1.00 + * bitmap cache files finalization is now standard. + * bug fixes +1.0 + * Initial distribution revision diff -Nru camlimages-3.0.1/config.h.in camlimages-4.0.1/config.h.in --- camlimages-3.0.1/config.h.in 2007-10-11 10:50:52.000000000 +0200 +++ camlimages-4.0.1/config.h.in 2011-06-22 20:04:32.000000000 +0200 @@ -48,7 +48,7 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* The size of a `long', as computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* Define to 1 if you have the ANSI C header files. */ diff -Nru camlimages-3.0.1/configure camlimages-4.0.1/configure --- camlimages-3.0.1/configure 2007-10-11 10:50:45.000000000 +0200 +++ camlimages-4.0.1/configure 2011-06-22 20:04:32.000000000 +0200 @@ -1,27 +1,56 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for camlimages 3.0.1. +# Generated by GNU Autoconf 2.61 for camlimages 3.2.0. # -# Report bugs to . +# Report bugs to . # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -31,8 +60,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -46,18 +110,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -65,157 +130,388 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. fi +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -224,7 +520,28 @@ as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -233,85 +550,226 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='camlimages' PACKAGE_TARNAME='camlimages' -PACKAGE_VERSION='3.0.1' -PACKAGE_STRING='camlimages 3.0.1' -PACKAGE_BUGREPORT='Pierre.Weis@inria.fr' +PACKAGE_VERSION='3.2.0' +PACKAGE_STRING='camlimages 3.2.0' +PACKAGE_BUGREPORT='use-omake-to-be-supported@nowhere.com' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot OCAMLC OCAMLC_OPT OCAMLOPT OCAMLOPT_OPT OCAMLDEP OCAMLDEP_OPT OCAMLMKLIB OCAMLMKLIB_OPT OCAMLLIB BUILD_NATIVE_TRUE BUILD_NATIVE_FALSE BUILD_BYTECODE_TRUE BUILD_BYTECODE_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP WORD_SIZE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS HAVE_LABLGTK_TRUE HAVE_LABLGTK_FALSE LABLGTKDIR HAVE_LABLGTK2_TRUE HAVE_LABLGTK2_FALSE LABLGTK2DIR LIBGIF SUPPORT_GIF HAVE_GIF_TRUE HAVE_GIF_FALSE LIBPNG SUPPORT_PNG HAVE_PNG_TRUE HAVE_PNG_FALSE LIBJPEG SUPPORT_JPEG HAVE_JPEG_TRUE HAVE_JPEG_FALSE LIBTIFF SUPPORT_TIFF HAVE_TIFF_TRUE HAVE_TIFF_FALSE LIBXPM INCXPM SUPPORT_XPM HAVE_XPM_TRUE HAVE_XPM_FALSE FREETYPE_CONFIG INCFREETYPE LIBFREETYPE SUPPORT_FREETYPE HAVE_FREETYPE_TRUE HAVE_FREETYPE_FALSE GS SUPPORT_PS HAVE_PS_TRUE HAVE_PS_FALSE PATH_RGB_TXT REQUIRES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +OCAMLC +OCAMLC_OPT +OCAMLOPT +OCAMLOPT_OPT +OCAMLDEP +OCAMLDEP_OPT +OCAMLCFLAGS +OCAMLMKLIB +OCAMLMKLIB_OPT +OCAMLLIB +BUILD_NATIVE_TRUE +BUILD_NATIVE_FALSE +BUILD_BYTECODE_TRUE +BUILD_BYTECODE_FALSE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CPP +GREP +EGREP +WORD_SIZE +XMKMF +X_CFLAGS +X_PRE_LIBS +X_LIBS +X_EXTRA_LIBS +PATH_OCAMLFIND +OCAMLSITELIBDIR +HAVE_LABLGTK_TRUE +HAVE_LABLGTK_FALSE +LABLGTKDIR +HAVE_LABLGTK2_TRUE +HAVE_LABLGTK2_FALSE +LABLGTK2DIR +LIBGIF +SUPPORT_GIF +HAVE_GIF_TRUE +HAVE_GIF_FALSE +LIBPNG +SUPPORT_PNG +HAVE_PNG_TRUE +HAVE_PNG_FALSE +LIBJPEG +SUPPORT_JPEG +HAVE_JPEG_TRUE +HAVE_JPEG_FALSE +LIBTIFF +SUPPORT_TIFF +HAVE_TIFF_TRUE +HAVE_TIFF_FALSE +LIBXPM +INCXPM +SUPPORT_XPM +HAVE_XPM_TRUE +HAVE_XPM_FALSE +FREETYPE_CONFIG +INCFREETYPE +LIBFREETYPE +SUPPORT_FREETYPE +HAVE_FREETYPE_TRUE +HAVE_FREETYPE_FALSE +GS +SUPPORT_PS +HAVE_PS_TRUE +HAVE_PS_FALSE +PATH_RGB_TXT +REQUIRES +LIBOBJS +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +OCAMLCFLAGS +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +XMKMF' + # Initialize some variables set by options. ac_init_help= @@ -338,34 +796,48 @@ # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -387,33 +859,45 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -440,6 +924,12 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -464,13 +954,16 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -535,6 +1028,16 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -587,24 +1090,20 @@ -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -635,8 +1134,7 @@ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -656,27 +1154,19 @@ { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix +# Be sure to have absolute directory names. +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 do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -703,74 +1193,76 @@ test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -779,7 +1271,7 @@ # 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 camlimages 3.0.1 to adapt to many kinds of systems. +\`configure' configures camlimages 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -799,9 +1291,6 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -819,15 +1308,22 @@ --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/camlimages] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -845,14 +1341,16 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of camlimages 3.0.1:";; + short | recursive ) echo "Configuration of camlimages 3.2.0:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-opt use optimized versions of ocaml tools (default) + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-native-tools use native versions of ocaml tools (default) --enable-native-library build native version of library (default) --enable-bytecode-library build bytecode version of library (default) @@ -863,6 +1361,8 @@ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-x use the X Window System + --with-ocamlfind enable ocamlfind support (default: depends on + ocamlfind) --with-lablgtk enable lablgtk support (default: yes) --with-lablgtk-dir=dir defines lablgtk installation directory --with-lablgtk2 enable lablgtk2 support (default: yes) @@ -876,133 +1376,102 @@ --with-gs enable gs support (default: yes) Some influential environment variables: + OCAMLCFLAGS Ocaml compiler flags [none] CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor + XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -camlimages configure 3.0.1 -generated by GNU Autoconf 2.59 +camlimages configure 3.2.0 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +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 camlimages $as_me 3.0.1, which was -generated by GNU Autoconf 2.59. Invocation command line was +It was created by camlimages $as_me 3.2.0, which was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1021,7 +1490,7 @@ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1035,6 +1504,7 @@ test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1056,7 +1526,6 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1067,7 +1536,7 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1089,9 +1558,7 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1102,8 +1569,8 @@ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1116,20 +1583,34 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1140,22 +1621,28 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1167,26 +1654,24 @@ ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1217,14 +1702,17 @@ # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1240,8 +1728,8 @@ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1253,12 +1741,11 @@ # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1283,8 +1770,7 @@ # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1301,12 +1787,6 @@ { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1331,33 +1811,44 @@ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version="1.8" +am__api_version="1.9" ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -1372,8 +1863,8 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1395,7 +1886,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1414,21 +1905,22 @@ ;; esac done +IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1438,8 +1930,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file @@ -1481,20 +1973,20 @@ Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" + program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed +rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1510,13 +2002,21 @@ fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as @@ -1538,8 +2038,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1552,54 +2052,57 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$AWK" && break done -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -1632,7 +2135,7 @@ # Define the identity of the package. PACKAGE='camlimages' - VERSION='3.0.1' + VERSION='3.2.0' cat >>confdefs.h <<_ACEOF @@ -1660,9 +2163,6 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -AMTAR=${AMTAR-"${am_missing_run}tar"} - install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user @@ -1673,8 +2173,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1687,32 +2187,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1725,27 +2227,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - STRIP=$ac_ct_STRIP + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi else STRIP="$ac_cv_prog_STRIP" fi @@ -1755,7 +2271,38 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + MAINT=$MAINTAINER_MODE_TRUE @@ -1763,27 +2310,27 @@ # allow the user to disable the use of optimized versions - # Check whether --enable-opt or --disable-opt was given. -if test "${enable_opt+set}" = set; then - enableval="$enable_opt" - case "$enableval" in - yes) ac_ocaml_enable_opt=$enableval;; - no) ac_ocaml_enable_opt=$enableval;; - *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-opt" >&5 -echo "$as_me: error: bad value $enableval for --enable-opt" >&2;} + # Check whether --enable-native-tools was given. +if test "${enable_native_tools+set}" = set; then + enableval=$enable_native_tools; case "$enableval" in + yes) ac_ocaml_enable_native_tools=$enableval;; + no) ac_ocaml_enable_native_tools=$enableval;; + *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-native-tools" >&5 +echo "$as_me: error: bad value $enableval for --enable-native-tools" >&2;} { (exit 1); exit 1; }; };; esac else - ac_ocaml_enable_opt=yes + ac_ocaml_enable_native_tools=yes + +fi -fi; # Checking for OCaml compiler # Extract the first word of "ocamlc", so it can be a program name with args. set dummy ocamlc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1798,27 +2345,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLC="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLC=$ac_cv_path_OCAMLC - if test -n "$OCAMLC"; then - echo "$as_me:$LINENO: result: $OCAMLC" >&5 -echo "${ECHO_T}$OCAMLC" >&6 + { echo "$as_me:$LINENO: result: $OCAMLC" >&5 +echo "${ECHO_T}$OCAMLC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -z "$OCAMLC"; then { { echo "$as_me:$LINENO: error: Cannot find ocamlc" >&5 echo "$as_me: error: Cannot find ocamlc" >&2;} @@ -1827,23 +2375,23 @@ # Checking for OCaml version - echo "$as_me:$LINENO: checking for OCaml version" >&5 -echo $ECHO_N "checking for OCaml version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for OCaml version" >&5 +echo $ECHO_N "checking for OCaml version... $ECHO_C" >&6; } if test "${ac_cv_ocaml_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_ocaml_version=`$OCAMLC -version` fi -echo "$as_me:$LINENO: result: $ac_cv_ocaml_version" >&5 -echo "${ECHO_T}$ac_cv_ocaml_version" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_ocaml_version" >&5 +echo "${ECHO_T}$ac_cv_ocaml_version" >&6; } OCAMLVERSION=$ac_cv_ocaml_version if test -n "3.08"; then ac_ocaml_min_version="3.08"; # Checking for OCaml minimum version - echo "$as_me:$LINENO: checking whether OCaml version >= $ac_ocaml_min_version" >&5 -echo $ECHO_N "checking whether OCaml version >= $ac_ocaml_min_version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether OCaml version >= $ac_ocaml_min_version" >&5 +echo $ECHO_N "checking whether OCaml version >= $ac_ocaml_min_version... $ECHO_C" >&6; } if test "${ac_cv_ocaml_version_enough+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1884,8 +2432,8 @@ fi -echo "$as_me:$LINENO: result: $ac_cv_ocaml_version_enough" >&5 -echo "${ECHO_T}$ac_cv_ocaml_version_enough" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_ocaml_version_enough" >&5 +echo "${ECHO_T}$ac_cv_ocaml_version_enough" >&6; } if test "$ac_cv_ocaml_version_enough" = "no"; then { { echo "$as_me:$LINENO: error: OCaml version unsufficient" >&5 @@ -1895,25 +2443,25 @@ fi # Checking for OCaml library path - echo "$as_me:$LINENO: checking for OCaml library path" >&5 -echo $ECHO_N "checking for OCaml library path... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for OCaml library path" >&5 +echo $ECHO_N "checking for OCaml library path... $ECHO_C" >&6; } if test "${ac_cv_ocaml_library_path+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_ocaml_library_path=`$OCAMLC -where` fi -echo "$as_me:$LINENO: result: $ac_cv_ocaml_library_path" >&5 -echo "${ECHO_T}$ac_cv_ocaml_library_path" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_ocaml_library_path" >&5 +echo "${ECHO_T}$ac_cv_ocaml_library_path" >&6; } OCAMLLIB=$ac_cv_ocaml_library_path - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for ocamlc.opt # Extract the first word of "ocamlc.opt", so it can be a program name with args. set dummy ocamlc.opt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLC_OPT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1928,27 +2476,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLC_OPT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLC_OPT=$ac_cv_path_OCAMLC_OPT - if test -n "$OCAMLC_OPT"; then - echo "$as_me:$LINENO: result: $OCAMLC_OPT" >&5 -echo "${ECHO_T}$OCAMLC_OPT" >&6 + { echo "$as_me:$LINENO: result: $OCAMLC_OPT" >&5 +echo "${ECHO_T}$OCAMLC_OPT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -z "$OCAMLC_OPT"; then { echo "$as_me:$LINENO: WARNING: Cannot find ocamlc.opt" >&5 echo "$as_me: WARNING: Cannot find ocamlc.opt" >&2;} @@ -1957,8 +2506,8 @@ if test -n "$OCAMLC_OPT"; then - echo "$as_me:$LINENO: checking wether ocamlc.opt version = $OCAMLVERSION" >&5 -echo $ECHO_N "checking wether ocamlc.opt version = $OCAMLVERSION... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking wether ocamlc.opt version = $OCAMLVERSION" >&5 +echo $ECHO_N "checking wether ocamlc.opt version = $OCAMLVERSION... $ECHO_C" >&6; } if test "${ac_cv_ocaml_OCAMLC_OPT_version_ok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1972,8 +2521,8 @@ fi -echo "$as_me:$LINENO: result: $ac_cv_ocaml_OCAMLC_OPT_version_ok" >&5 -echo "${ECHO_T}$ac_cv_ocaml_OCAMLC_OPT_version_ok" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_ocaml_OCAMLC_OPT_version_ok" >&5 +echo "${ECHO_T}$ac_cv_ocaml_OCAMLC_OPT_version_ok" >&6; } if test "$ac_cv_ocaml_OCAMLC_OPT_version_ok" = "no"; then unset OCAMLC_OPT @@ -1994,8 +2543,8 @@ # Extract the first word of "ocamlopt", so it can be a program name with args. set dummy ocamlopt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLOPT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2010,27 +2559,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLOPT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLOPT=$ac_cv_path_OCAMLOPT - if test -n "$OCAMLOPT"; then - echo "$as_me:$LINENO: result: $OCAMLOPT" >&5 -echo "${ECHO_T}$OCAMLOPT" >&6 + { echo "$as_me:$LINENO: result: $OCAMLOPT" >&5 +echo "${ECHO_T}$OCAMLOPT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -z "$OCAMLOPT"; then { echo "$as_me:$LINENO: WARNING: Cannot find ocamlopt; bytecode compilation only" >&5 echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only" >&2;} @@ -2039,8 +2589,8 @@ if test -n "$OCAMLOPT"; then - echo "$as_me:$LINENO: checking wether ocamlopt version = $OCAMLVERSION" >&5 -echo $ECHO_N "checking wether ocamlopt version = $OCAMLVERSION... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking wether ocamlopt version = $OCAMLVERSION" >&5 +echo $ECHO_N "checking wether ocamlopt version = $OCAMLVERSION... $ECHO_C" >&6; } if test "${ac_cv_ocaml_OCAMLOPT_version_ok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2054,8 +2604,8 @@ fi -echo "$as_me:$LINENO: result: $ac_cv_ocaml_OCAMLOPT_version_ok" >&5 -echo "${ECHO_T}$ac_cv_ocaml_OCAMLOPT_version_ok" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_ocaml_OCAMLOPT_version_ok" >&5 +echo "${ECHO_T}$ac_cv_ocaml_OCAMLOPT_version_ok" >&6; } if test "$ac_cv_ocaml_OCAMLOPT_version_ok" = "no"; then unset OCAMLOPT @@ -2068,8 +2618,8 @@ fi if test -n "$OCAMLOPT"; then - echo "$as_me:$LINENO: checking if OCaml C compiler works" >&5 -echo $ECHO_N "checking if OCaml C compiler works... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if OCaml C compiler works" >&5 +echo $ECHO_N "checking if OCaml C compiler works... $ECHO_C" >&6; } if test "${ac_cv_ocaml_c_compiler_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2084,8 +2634,8 @@ fi -echo "$as_me:$LINENO: result: $ac_cv_ocaml_c_compiler_works" >&5 -echo "${ECHO_T}$ac_cv_ocaml_c_compiler_works" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_ocaml_c_compiler_works" >&5 +echo "${ECHO_T}$ac_cv_ocaml_c_compiler_works" >&6; } if test "$ac_cv_ocaml_c_compiler_works" = "no"; then { echo "$as_me:$LINENO: WARNING: bytecode compilation only" >&5 @@ -2094,13 +2644,13 @@ fi fi - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for ocamlopt.opt # Extract the first word of "ocamlopt.opt", so it can be a program name with args. set dummy ocamlopt.opt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLOPT_OPT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2115,27 +2665,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLOPT_OPT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLOPT_OPT=$ac_cv_path_OCAMLOPT_OPT - if test -n "$OCAMLOPT_OPT"; then - echo "$as_me:$LINENO: result: $OCAMLOPT_OPT" >&5 -echo "${ECHO_T}$OCAMLOPT_OPT" >&6 + { echo "$as_me:$LINENO: result: $OCAMLOPT_OPT" >&5 +echo "${ECHO_T}$OCAMLOPT_OPT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -z "$OCAMLOPT_OPT"; then { echo "$as_me:$LINENO: WARNING: Cannot find ocamlopt.opt" >&5 echo "$as_me: WARNING: Cannot find ocamlopt.opt" >&2;} @@ -2144,8 +2695,8 @@ if test -n "$OCAMLOPT_OPT"; then - echo "$as_me:$LINENO: checking wether ocamlopt.opt version = $OCAMLVERSION" >&5 -echo $ECHO_N "checking wether ocamlopt.opt version = $OCAMLVERSION... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking wether ocamlopt.opt version = $OCAMLVERSION" >&5 +echo $ECHO_N "checking wether ocamlopt.opt version = $OCAMLVERSION... $ECHO_C" >&6; } if test "${ac_cv_ocaml_OCAMLOPT_OPT_version_ok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2159,8 +2710,8 @@ fi -echo "$as_me:$LINENO: result: $ac_cv_ocaml_OCAMLOPT_OPT_version_ok" >&5 -echo "${ECHO_T}$ac_cv_ocaml_OCAMLOPT_OPT_version_ok" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_ocaml_OCAMLOPT_OPT_version_ok" >&5 +echo "${ECHO_T}$ac_cv_ocaml_OCAMLOPT_OPT_version_ok" >&6; } if test "$ac_cv_ocaml_OCAMLOPT_OPT_version_ok" = "no"; then unset OCAMLOPT_OPT @@ -2181,8 +2732,8 @@ # Extract the first word of "ocamldep", so it can be a program name with args. set dummy ocamldep; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLDEP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2197,40 +2748,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLDEP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLDEP=$ac_cv_path_OCAMLDEP - if test -n "$OCAMLDEP"; then - echo "$as_me:$LINENO: result: $OCAMLDEP" >&5 -echo "${ECHO_T}$OCAMLDEP" >&6 + { echo "$as_me:$LINENO: result: $OCAMLDEP" >&5 +echo "${ECHO_T}$OCAMLDEP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -z "$OCAMLDEP"; then { echo "$as_me:$LINENO: WARNING: Cannot find ocamldep" >&5 echo "$as_me: WARNING: Cannot find ocamldep" >&2;} fi - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for ocamldep.opt # Extract the first word of "ocamldep.opt", so it can be a program name with args. set dummy ocamldep.opt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLDEP_OPT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2245,27 +2797,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLDEP_OPT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLDEP_OPT=$ac_cv_path_OCAMLDEP_OPT - if test -n "$OCAMLDEP_OPT"; then - echo "$as_me:$LINENO: result: $OCAMLDEP_OPT" >&5 -echo "${ECHO_T}$OCAMLDEP_OPT" >&6 + { echo "$as_me:$LINENO: result: $OCAMLDEP_OPT" >&5 +echo "${ECHO_T}$OCAMLDEP_OPT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -z "$OCAMLDEP_OPT"; then { echo "$as_me:$LINENO: WARNING: Cannot find ocamldep.opt" >&5 echo "$as_me: WARNING: Cannot find ocamldep.opt" >&2;} @@ -2280,12 +2833,14 @@ + + # Checking for bytecode version # Extract the first word of "ocamlmklib", so it can be a program name with args. set dummy ocamlmklib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLMKLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2300,40 +2855,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLMKLIB="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLMKLIB=$ac_cv_path_OCAMLMKLIB - if test -n "$OCAMLMKLIB"; then - echo "$as_me:$LINENO: result: $OCAMLMKLIB" >&5 -echo "${ECHO_T}$OCAMLMKLIB" >&6 + { echo "$as_me:$LINENO: result: $OCAMLMKLIB" >&5 +echo "${ECHO_T}$OCAMLMKLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -z "$OCAMLMKLIB"; then { echo "$as_me:$LINENO: WARNING: Cannot find ocamlmklib" >&5 echo "$as_me: WARNING: Cannot find ocamlmklib" >&2;} fi - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for binary version, using AC_PATH_PROG directly # to avoid warnings # Extract the first word of "ocamlmklib.opt", so it can be a program name with args. set dummy ocamlmklib.opt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_OCAMLMKLIB_OPT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2348,27 +2904,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLMKLIB_OPT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi OCAMLMKLIB_OPT=$ac_cv_path_OCAMLMKLIB_OPT - if test -n "$OCAMLMKLIB_OPT"; then - echo "$as_me:$LINENO: result: $OCAMLMKLIB_OPT" >&5 -echo "${ECHO_T}$OCAMLMKLIB_OPT" >&6 + { echo "$as_me:$LINENO: result: $OCAMLMKLIB_OPT" >&5 +echo "${ECHO_T}$OCAMLMKLIB_OPT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -n "$OCAMLMKLIB_OPT"; then OCAMLMKLIB=$OCAMLMKLIB_OPT fi @@ -2377,10 +2934,9 @@ # Check versions to build -# Check whether --enable-native-library or --disable-native-library was given. +# Check whether --enable-native-library was given. if test "${enable_native_library+set}" = set; then - enableval="$enable_native_library" - case "$enableval" in + enableval=$enable_native_library; case "$enableval" in yes) enable_native=$enableval;; no) enable_native=$enableval;; *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-native-library" >&5 @@ -2390,17 +2946,18 @@ else enable_native=yes -fi; -echo "$as_me:$LINENO: checking wether to build native library" >&5 -echo $ECHO_N "checking wether to build native library... $ECHO_C" >&6 +fi + +{ echo "$as_me:$LINENO: checking wether to build native library" >&5 +echo $ECHO_N "checking wether to build native library... $ECHO_C" >&6; } build_native=no if test -n "$OCAMLOPT" && test "$enable_native" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } build_native=yes else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } build_native=no fi @@ -2414,10 +2971,9 @@ fi -# Check whether --enable-bytecode-library or --disable-bytecode-library was given. +# Check whether --enable-bytecode-library was given. if test "${enable_bytecode_library+set}" = set; then - enableval="$enable_bytecode_library" - case "$enableval" in + enableval=$enable_bytecode_library; case "$enableval" in yes) enable_bytecode=$enableval;; no) enable_bytecode=$enableval;; *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bytecode-library" >&5 @@ -2427,17 +2983,18 @@ else enable_bytecode=yes -fi; -echo "$as_me:$LINENO: checking wether to build bytecode library" >&5 -echo $ECHO_N "checking wether to build bytecode library... $ECHO_C" >&6 +fi + +{ echo "$as_me:$LINENO: checking wether to build bytecode library" >&5 +echo $ECHO_N "checking wether to build bytecode library... $ECHO_C" >&6; } build_bytecode=no if test -n "$OCAMLC" && test "$enable_bytecode" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } build_bytecode=yes else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } build_bytecode=no fi @@ -2466,8 +3023,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2480,32 +3037,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2518,36 +3077,51 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2560,74 +3134,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2641,7 +3175,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2652,6 +3186,7 @@ fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2669,22 +3204,23 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2697,36 +3233,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2739,29 +3277,45 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -2774,21 +3328,35 @@ { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2813,47 +3381,77 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2865,19 +3463,21 @@ fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2896,22 +3496,27 @@ fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2922,9 +3527,8 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -2938,14 +3542,14 @@ fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2965,14 +3569,20 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2990,12 +3600,12 @@ rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3018,50 +3628,49 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -3077,38 +3686,118 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3124,12 +3813,12 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3163,12 +3852,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -3183,205 +3877,57 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3389,7 +3935,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" - ac_config_commands="$ac_config_commands depfiles" +ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} @@ -3399,8 +3945,8 @@ .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none @@ -3427,15 +3973,15 @@ fi -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +# Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" + enableval=$enable_dependency_tracking; +fi -fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -3455,8 +4001,8 @@ depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3524,9 +4070,14 @@ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi @@ -3540,8 +4091,8 @@ fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -3565,8 +4116,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3600,24 +4151,22 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3626,9 +4175,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3638,24 +4188,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3666,6 +4214,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3683,8 +4232,8 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3707,24 +4256,22 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3733,9 +4280,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3745,24 +4293,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3773,6 +4319,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3795,23 +4342,170 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3835,35 +4529,31 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3919,6 +4609,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3938,18 +4629,27 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3962,12 +4662,14 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3990,9 +4692,9 @@ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4006,38 +4708,35 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -4048,8 +4747,8 @@ done -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6; } if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4060,61 +4759,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long ac__type_new_; int main () { -if ((long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long=no + ac_cv_type_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6; } -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -4124,10 +4819,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -4135,27 +4831,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -4165,10 +4856,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4176,56 +4868,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -4233,27 +4922,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -4263,10 +4947,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -4274,50 +4959,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -4328,10 +5011,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4339,52 +5023,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +'') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4392,8 +5069,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } + typedef long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -4402,35 +5080,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4441,22 +5128,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF @@ -4466,44 +5156,49 @@ # Checks X libraries -echo "$as_me:$LINENO: checking for X" >&5 -echo $ECHO_N "checking for X... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6; } -# Check whether --with-x or --without-x was given. +# Check whether --with-x was given. if test "${with_x+set}" = set; then - withval="$with_x" + withval=$with_x; +fi -fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else - if test "${ac_cv_have_x+set}" = set; then + case $x_includes,$x_libraries in #( + *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 +echo "$as_me: error: Cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no -rm -fr conftest.dir +rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' _ACEOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done @@ -4511,7 +5206,7 @@ # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in - /usr/include) ;; + /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in @@ -4520,7 +5215,7 @@ esac fi cd .. - rm -fr conftest.dir + rm -f -r conftest.dir fi # Standard set of common directories for X headers. @@ -4561,7 +5256,7 @@ /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Intrinsic.h. + # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4569,26 +5264,24 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # We can compile using X headers with no special include directory. ac_x_includes= else @@ -4596,12 +5289,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Intrinsic.h"; then + if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi + rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no @@ -4610,44 +5304,40 @@ # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" + LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XtMalloc (0) +XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= @@ -4655,49 +5345,54 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -LIBS=$ac_save_LIBS + LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do - if test -r $ac_dir/libXt.$ac_extension; then + if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no -if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac fi - - fi +;; #( + *) have_x=yes;; + esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then - echo "$as_me:$LINENO: result: $have_x" >&5 -echo "${ECHO_T}$have_x" >&6 + { echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then @@ -4718,12 +5413,12 @@ X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - cat >conftest.$ac_ext <<_ACEOF + { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4739,43 +5434,32 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_nospace=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_R_nospace=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $ac_R_nospace = yes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - X_LIBS="$X_LIBS -R$x_libraries" - else LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4791,47 +5475,42 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_space=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_R_space=no + { echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - if test $ac_R_space = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$as_me:$LINENO: result: neither works" >&5 -echo "${ECHO_T}neither works" >&6 - fi - fi - LIBS=$ac_xsave_LIBS - esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. @@ -4852,50 +5531,46 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { -XOpenDisplay (); +return XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4908,63 +5583,60 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { -dnet_ntoa (); +return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dnet_dnet_ntoa=no + ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4977,63 +5649,61 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { -dnet_ntoa (); +return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dnet_stub_dnet_ntoa=no + ac_cv_lib_dnet_stub_dnet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" @@ -5045,8 +5715,8 @@ # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5073,72 +5743,63 @@ #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5151,63 +5812,60 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5220,56 +5878,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gethostbyname=no + ac_cv_lib_bsd_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -5284,8 +5939,8 @@ # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5312,72 +5967,63 @@ #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = no; then - echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5390,56 +6036,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); int main () { -connect (); +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_connect=no + ac_cv_lib_socket_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi @@ -5447,8 +6090,8 @@ fi # Guillermo Gomez says -lposix is necessary on A/UX. - echo "$as_me:$LINENO: checking for remove" >&5 -echo $ECHO_N "checking for remove... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6; } if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5475,72 +6118,63 @@ #undef remove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_remove) || defined (__stub___remove) +#if defined __stub_remove || defined __stub___remove choke me -#else -char (*f) () = remove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != remove; +return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_remove=no + ac_cv_func_remove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -echo "${ECHO_T}$ac_cv_func_remove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6; } if test $ac_cv_func_remove = no; then - echo "$as_me:$LINENO: checking for remove in -lposix" >&5 -echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5553,56 +6187,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char remove (); int main () { -remove (); +return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_posix_remove=no + ac_cv_lib_posix_remove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 -echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi @@ -5610,8 +6241,8 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo "$as_me:$LINENO: checking for shmat" >&5 -echo $ECHO_N "checking for shmat... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5638,72 +6269,63 @@ #undef shmat -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_shmat) || defined (__stub___shmat) +#if defined __stub_shmat || defined __stub___shmat choke me -#else -char (*f) () = shmat; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != shmat; +return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_shmat=no + ac_cv_func_shmat=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -echo "${ECHO_T}$ac_cv_func_shmat" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6; } if test $ac_cv_func_shmat = no; then - echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 -echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5716,56 +6338,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shmat (); int main () { -shmat (); +return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ipc_shmat=no + ac_cv_lib_ipc_shmat=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 -echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -5782,8 +6401,8 @@ # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5796,56 +6415,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); int main () { -IceConnectionNumber (); +return IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ICE_IceConnectionNumber=no + ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -5859,11 +6475,81 @@ SUPPORT_LABLGTK="false" LABLGTKDIR= +# Extract the first word of "ocamlfind", so it can be a program name with args. +set dummy ocamlfind; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PATH_OCAMLFIND+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PATH_OCAMLFIND in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_OCAMLFIND="$PATH_OCAMLFIND" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PATH_OCAMLFIND="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PATH_OCAMLFIND" && ac_cv_path_PATH_OCAMLFIND="no" + ;; +esac +fi +PATH_OCAMLFIND=$ac_cv_path_PATH_OCAMLFIND +if test -n "$PATH_OCAMLFIND"; then + { echo "$as_me:$LINENO: result: $PATH_OCAMLFIND" >&5 +echo "${ECHO_T}$PATH_OCAMLFIND" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +if test "x$PATH_OCAMLFIND" = "x"; then + with_ocamlfind_default="no" +else + with_ocamlfind_default="yes" +fi + + +# Check whether --with-ocamlfind was given. +if test "${with_ocamlfind+set}" = set; then + withval=$with_ocamlfind; case "$withval" in + yes) with_ocamlfind=yes;; + no) with_ocamlfind=no;; + *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-ocamlfind" >&5 +echo "$as_me: error: bad value $withval for --with-ocamlfind" >&2;} + { (exit 1); exit 1; }; };; + esac +else + with_ocamlfind=$with_ocamlfind_default + +fi + + +if test "$with_ocamlfind" = "no"; then + OCAMLSITELIBDIR=$OCAMLLIB/camlimages +else + OCAMLSITELIBDIR=$OCAMLLIB/site-lib/camlimages +fi + + -# Check whether --with-lablgtk or --without-lablgtk was given. +# Check whether --with-lablgtk was given. if test "${with_lablgtk+set}" = set; then - withval="$with_lablgtk" - case "$withval" in + withval=$with_lablgtk; case "$withval" in yes) with_lablgtk=yes;; no) with_lablgtk=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-lablgtk" >&5 @@ -5873,20 +6559,20 @@ else with_lablgtk=yes -fi; +fi + -echo "$as_me:$LINENO: checking lablgtk" >&5 -echo $ECHO_N "checking lablgtk... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking lablgtk" >&5 +echo $ECHO_N "checking lablgtk... $ECHO_C" >&6; } if test "$with_lablgtk" = "no"; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else -# Check whether --with-lablgtk-dir or --without-lablgtk-dir was given. +# Check whether --with-lablgtk-dir was given. if test "${with_lablgtk_dir+set}" = set; then - withval="$with_lablgtk_dir" - if test -d "$withval"; then + withval=$with_lablgtk_dir; if test -d "$withval"; then lablgtkdir=$withval else { { echo "$as_me:$LINENO: error: invalid value $withval for --with-lablgtk-dir" >&5 @@ -5896,29 +6582,30 @@ else lablgtkdir="$OCAMLLIB/lablgtk" -fi; +fi + if test -f "$lablgtkdir/gtk.ml"; then - echo "$as_me:$LINENO: result: found at $lablgtkdir" >&5 -echo "${ECHO_T}found at $lablgtkdir" >&6 + { echo "$as_me:$LINENO: result: found at $lablgtkdir" >&5 +echo "${ECHO_T}found at $lablgtkdir" >&6; } - echo "$as_me:$LINENO: checking for lablgtk version" >&5 -echo $ECHO_N "checking for lablgtk version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for lablgtk version" >&5 +echo $ECHO_N "checking for lablgtk version... $ECHO_C" >&6; } if test \ -f "$lablgtkdir/gBin.mli" && \ ! `grep image: "$lablgtkdir/gdk.mli" > /dev/null`; \ then - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } SUPPORT_LABLGTK="true" LABLGTKDIR="$lablgtkdir" else - echo "$as_me:$LINENO: result: too old" >&5 -echo "${ECHO_T}too old" >&6 + { echo "$as_me:$LINENO: result: too old" >&5 +echo "${ECHO_T}too old" >&6; } fi else - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } fi fi @@ -5939,10 +6626,9 @@ LABLGTK2DIR= -# Check whether --with-lablgtk2 or --without-lablgtk2 was given. +# Check whether --with-lablgtk2 was given. if test "${with_lablgtk2+set}" = set; then - withval="$with_lablgtk2" - case "$withval" in + withval=$with_lablgtk2; case "$withval" in yes) with_lablgtk2=yes;; no) with_lablgtk2=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-lablgtk2" >&5 @@ -5952,24 +6638,24 @@ else with_lablgtk2=yes -fi; +fi + -echo "$as_me:$LINENO: checking lablgtk2" >&5 -echo $ECHO_N "checking lablgtk2... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking lablgtk2" >&5 +echo $ECHO_N "checking lablgtk2... $ECHO_C" >&6; } if test "$with_lablgtk2" = "no"; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else if test "$SUPPORT_LABLGTK" = "true"; then - echo "$as_me:$LINENO: result: incompatible with lablgtk" >&5 -echo "${ECHO_T}incompatible with lablgtk" >&6 + { echo "$as_me:$LINENO: result: incompatible with lablgtk" >&5 +echo "${ECHO_T}incompatible with lablgtk" >&6; } else -# Check whether --with-lablgtk2-dir or --without-lablgtk2-dir was given. +# Check whether --with-lablgtk2-dir was given. if test "${with_lablgtk2_dir+set}" = set; then - withval="$with_lablgtk2_dir" - if test -d "$withval"; then + withval=$with_lablgtk2_dir; if test -d "$withval"; then lablgtkdir2=$withval else { { echo "$as_me:$LINENO: error: invalid value $withval for --with-lablgtk2-dir" >&5 @@ -5979,16 +6665,17 @@ else lablgtk2dir="$OCAMLLIB/lablgtk2" -fi; +fi + if test -f "$lablgtk2dir/gtk.ml"; then - echo "$as_me:$LINENO: result: found at $lablgtk2dir" >&5 -echo "${ECHO_T}found at $lablgtk2dir" >&6 + { echo "$as_me:$LINENO: result: found at $lablgtk2dir" >&5 +echo "${ECHO_T}found at $lablgtk2dir" >&6; } SUPPORT_LABLGTK2="true" LABLGTK2DIR="$lablgtk2dir" else - echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6 + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } fi fi fi @@ -6009,10 +6696,9 @@ LIBGIF="" -# Check whether --with-gif or --without-gif was given. +# Check whether --with-gif was given. if test "${with_gif+set}" = set; then - withval="$with_gif" - case "$withval" in + withval=$with_gif; case "$withval" in yes) with_gif=yes;; no) with_gif=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-gif" >&5 @@ -6022,24 +6708,25 @@ else with_gif=yes -fi; +fi + if test "$with_gif" = "no" ; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else if test "${ac_cv_header_gif_lib_h+set}" = set; then - echo "$as_me:$LINENO: checking for gif_lib.h" >&5 -echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gif_lib.h" >&5 +echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; } if test "${ac_cv_header_gif_lib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5 -echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5 +echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking gif_lib.h usability" >&5 -echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5 +echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6050,41 +6737,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking gif_lib.h presence" >&5 -echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5 +echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6093,24 +6776,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6118,9 +6799,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6144,30 +6826,28 @@ echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------- ## -## Report this to Pierre.Weis@inria.fr ## -## ----------------------------------- ## + ( cat <<\_ASBOX +## ---------------------------------------------------- ## +## Report this to use-omake-to-be-supported@nowhere.com ## +## ---------------------------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for gif_lib.h" >&5 -echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5 +echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; } if test "${ac_cv_header_gif_lib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_gif_lib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5 -echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5 +echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; } fi if test $ac_cv_header_gif_lib_h = yes; then - echo "$as_me:$LINENO: checking for DGifOpenFileName in -lgif" >&5 -echo $ECHO_N "checking for DGifOpenFileName in -lgif... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for DGifOpenFileName in -lgif" >&5 +echo $ECHO_N "checking for DGifOpenFileName in -lgif... $ECHO_C" >&6; } if test "${ac_cv_lib_gif_DGifOpenFileName+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6180,61 +6860,58 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char DGifOpenFileName (); int main () { -DGifOpenFileName (); +return DGifOpenFileName (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_gif_DGifOpenFileName=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_gif_DGifOpenFileName=no + ac_cv_lib_gif_DGifOpenFileName=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gif_DGifOpenFileName" >&5 -echo "${ECHO_T}$ac_cv_lib_gif_DGifOpenFileName" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_DGifOpenFileName" >&5 +echo "${ECHO_T}$ac_cv_lib_gif_DGifOpenFileName" >&6; } if test $ac_cv_lib_gif_DGifOpenFileName = yes; then LIBGIF="-lgif" else - echo "$as_me:$LINENO: checking for DGifOpenFileName in -lungif" >&5 -echo $ECHO_N "checking for DGifOpenFileName in -lungif... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for DGifOpenFileName in -lungif" >&5 +echo $ECHO_N "checking for DGifOpenFileName in -lungif... $ECHO_C" >&6; } if test "${ac_cv_lib_ungif_DGifOpenFileName+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6247,56 +6924,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char DGifOpenFileName (); int main () { -DGifOpenFileName (); +return DGifOpenFileName (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ungif_DGifOpenFileName=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ungif_DGifOpenFileName=no + ac_cv_lib_ungif_DGifOpenFileName=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_DGifOpenFileName" >&5 -echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpenFileName" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_DGifOpenFileName" >&5 +echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpenFileName" >&6; } if test $ac_cv_lib_ungif_DGifOpenFileName = yes; then LIBGIF="-lungif" @@ -6314,8 +6988,8 @@ SUPPORT_GIF="true" # Checks old gif bug - echo "$as_me:$LINENO: checking if gif bug is fixed" >&5 -echo $ECHO_N "checking if gif bug is fixed... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if gif bug is fixed" >&5 +echo $ECHO_N "checking if gif bug is fixed... $ECHO_C" >&6; } save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $LIBGIF" if test "$cross_compiling" = yes; then @@ -6342,13 +7016,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6357,8 +7040,8 @@ #define GIFLIB_BUG_FIXED 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -6367,12 +7050,14 @@ ( exit $ac_status ) { echo "$as_me:$LINENO: WARNING: buggy gif library, consider rebuilding it with gcc option -fwritable-strings" >&5 echo "$as_me: WARNING: buggy gif library, consider rebuilding it with gcc option -fwritable-strings" >&2;} - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + LDFLAGS=$save_LDFLAGS fi fi @@ -6394,10 +7079,9 @@ LIBPNG="" -# Check whether --with-png or --without-png was given. +# Check whether --with-png was given. if test "${with_png+set}" = set; then - withval="$with_png" - case "$withval" in + withval=$with_png; case "$withval" in yes) with_png=yes;; no) with_png=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-png" >&5 @@ -6407,24 +7091,25 @@ else with_png=yes -fi; +fi + if test "$with_png" = "no" ; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else if test "${ac_cv_header_png_h+set}" = set; then - echo "$as_me:$LINENO: checking for png.h" >&5 -echo $ECHO_N "checking for png.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6; } if test "${ac_cv_header_png_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 -echo "${ECHO_T}$ac_cv_header_png_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking png.h usability" >&5 -echo $ECHO_N "checking png.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking png.h usability" >&5 +echo $ECHO_N "checking png.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6435,41 +7120,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking png.h presence" >&5 -echo $ECHO_N "checking png.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking png.h presence" >&5 +echo $ECHO_N "checking png.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6478,24 +7159,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6503,9 +7182,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6529,30 +7209,28 @@ echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------- ## -## Report this to Pierre.Weis@inria.fr ## -## ----------------------------------- ## + ( cat <<\_ASBOX +## ---------------------------------------------------- ## +## Report this to use-omake-to-be-supported@nowhere.com ## +## ---------------------------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for png.h" >&5 -echo $ECHO_N "checking for png.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6; } if test "${ac_cv_header_png_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_png_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 -echo "${ECHO_T}$ac_cv_header_png_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6; } fi if test $ac_cv_header_png_h = yes; then - echo "$as_me:$LINENO: checking for png_create_read_struct in -lpng" >&5 -echo $ECHO_N "checking for png_create_read_struct in -lpng... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for png_create_read_struct in -lpng" >&5 +echo $ECHO_N "checking for png_create_read_struct in -lpng... $ECHO_C" >&6; } if test "${ac_cv_lib_png_png_create_read_struct+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6566,56 +7244,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char png_create_read_struct (); int main () { -png_create_read_struct (); +return png_create_read_struct (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_png_png_create_read_struct=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_png_png_create_read_struct=no + ac_cv_lib_png_png_create_read_struct=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_read_struct" >&5 -echo "${ECHO_T}$ac_cv_lib_png_png_create_read_struct" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_read_struct" >&5 +echo "${ECHO_T}$ac_cv_lib_png_png_create_read_struct" >&6; } if test $ac_cv_lib_png_png_create_read_struct = yes; then LIBPNG="-lpng -lz" SUPPORT_PNG="true" @@ -6644,10 +7319,9 @@ LIBJPEG="" -# Check whether --with-jpeg or --without-jpeg was given. +# Check whether --with-jpeg was given. if test "${with_jpeg+set}" = set; then - withval="$with_jpeg" - case "$withval" in + withval=$with_jpeg; case "$withval" in yes) with_jpeg=yes;; no) with_jpeg=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-jpeg" >&5 @@ -6657,24 +7331,25 @@ else with_jpeg=yes -fi; +fi + if test "$with_jpeg" = "no" ; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else if test "${ac_cv_header_jpeglib_h+set}" = set; then - echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; } if test "${ac_cv_header_jpeglib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 -echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 +echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6685,41 +7360,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 -echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 +echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6728,24 +7399,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6753,9 +7422,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6779,30 +7449,28 @@ echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------- ## -## Report this to Pierre.Weis@inria.fr ## -## ----------------------------------- ## + ( cat <<\_ASBOX +## ---------------------------------------------------- ## +## Report this to use-omake-to-be-supported@nowhere.com ## +## ---------------------------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; } if test "${ac_cv_header_jpeglib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_jpeglib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; } fi if test $ac_cv_header_jpeglib_h = yes; then - echo "$as_me:$LINENO: checking for jpeg_read_header in -ljpeg" >&5 -echo $ECHO_N "checking for jpeg_read_header in -ljpeg... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for jpeg_read_header in -ljpeg" >&5 +echo $ECHO_N "checking for jpeg_read_header in -ljpeg... $ECHO_C" >&6; } if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6815,56 +7483,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char jpeg_read_header (); int main () { -jpeg_read_header (); +return jpeg_read_header (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_jpeg_jpeg_read_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_jpeg_jpeg_read_header=no + ac_cv_lib_jpeg_jpeg_read_header=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5 -echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_read_header" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5 +echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_read_header" >&6; } if test $ac_cv_lib_jpeg_jpeg_read_header = yes; then LIBJPEG="-ljpeg" SUPPORT_JPEG="true" @@ -6894,10 +7559,9 @@ LIBTIFF="" -# Check whether --with-tiff or --without-tiff was given. +# Check whether --with-tiff was given. if test "${with_tiff+set}" = set; then - withval="$with_tiff" - case "$withval" in + withval=$with_tiff; case "$withval" in yes) with_tiff=yes;; no) with_tiff=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-tiff" >&5 @@ -6907,24 +7571,25 @@ else with_tiff=yes -fi; +fi + if test "$with_tiff" = "no" ; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else if test "${ac_cv_header_tiffio_h+set}" = set; then - echo "$as_me:$LINENO: checking for tiffio.h" >&5 -echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for tiffio.h" >&5 +echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; } if test "${ac_cv_header_tiffio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5 -echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5 +echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking tiffio.h usability" >&5 -echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5 +echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6935,41 +7600,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking tiffio.h presence" >&5 -echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5 +echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6978,24 +7639,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7003,9 +7662,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -7029,30 +7689,28 @@ echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------- ## -## Report this to Pierre.Weis@inria.fr ## -## ----------------------------------- ## + ( cat <<\_ASBOX +## ---------------------------------------------------- ## +## Report this to use-omake-to-be-supported@nowhere.com ## +## ---------------------------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for tiffio.h" >&5 -echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for tiffio.h" >&5 +echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; } if test "${ac_cv_header_tiffio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_tiffio_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5 -echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5 +echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; } fi if test $ac_cv_header_tiffio_h = yes; then - echo "$as_me:$LINENO: checking for TIFFOpen in -ltiff" >&5 -echo $ECHO_N "checking for TIFFOpen in -ltiff... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for TIFFOpen in -ltiff" >&5 +echo $ECHO_N "checking for TIFFOpen in -ltiff... $ECHO_C" >&6; } if test "${ac_cv_lib_tiff_TIFFOpen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7066,56 +7724,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char TIFFOpen (); int main () { -TIFFOpen (); +return TIFFOpen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_tiff_TIFFOpen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_tiff_TIFFOpen=no + ac_cv_lib_tiff_TIFFOpen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFOpen" >&5 -echo "${ECHO_T}$ac_cv_lib_tiff_TIFFOpen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFOpen" >&5 +echo "${ECHO_T}$ac_cv_lib_tiff_TIFFOpen" >&6; } if test $ac_cv_lib_tiff_TIFFOpen = yes; then LIBTIFF="-ltiff -lz -ljpeg" SUPPORT_TIFF="true" @@ -7144,10 +7799,9 @@ LIBXPM="" -# Check whether --with-xpm or --without-xpm was given. +# Check whether --with-xpm was given. if test "${with_xpm+set}" = set; then - withval="$with_xpm" - case "$withval" in + withval=$with_xpm; case "$withval" in yes) with_xpm=yes;; no) with_xpm=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-xpm" >&5 @@ -7157,28 +7811,29 @@ else with_xpm=yes -fi; +fi + if test "$with_xpm" = "no" ; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else save_CFLAGS="$CFLAGS" save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS" if test "${ac_cv_header_X11_xpm_h+set}" = set; then - echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 -echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 +echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_xpm_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5 -echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5 +echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7189,41 +7844,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5 -echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5 +echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7232,24 +7883,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7257,9 +7906,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -7283,30 +7933,28 @@ echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------- ## -## Report this to Pierre.Weis@inria.fr ## -## ----------------------------------- ## + ( cat <<\_ASBOX +## ---------------------------------------------------- ## +## Report this to use-omake-to-be-supported@nowhere.com ## +## ---------------------------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 -echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 +echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_xpm_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_xpm_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; } fi if test $ac_cv_header_X11_xpm_h = yes; then - echo "$as_me:$LINENO: checking for XpmReadFileToXpmImage in -lXpm" >&5 -echo $ECHO_N "checking for XpmReadFileToXpmImage in -lXpm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for XpmReadFileToXpmImage in -lXpm" >&5 +echo $ECHO_N "checking for XpmReadFileToXpmImage in -lXpm... $ECHO_C" >&6; } if test "${ac_cv_lib_Xpm_XpmReadFileToXpmImage+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7320,56 +7968,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char XpmReadFileToXpmImage (); int main () { -XpmReadFileToXpmImage (); +return XpmReadFileToXpmImage (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_Xpm_XpmReadFileToXpmImage=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xpm_XpmReadFileToXpmImage=no + ac_cv_lib_Xpm_XpmReadFileToXpmImage=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToXpmImage" >&5 -echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToXpmImage" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToXpmImage" >&5 +echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToXpmImage" >&6; } if test $ac_cv_lib_Xpm_XpmReadFileToXpmImage = yes; then INCXPM="$X_CFLAGS" LIBXPM="$X_LIBS -lXpm $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" @@ -7403,10 +8048,9 @@ INCFREETYPE="" -# Check whether --with-freetype or --without-freetype was given. +# Check whether --with-freetype was given. if test "${with_freetype+set}" = set; then - withval="$with_freetype" - case "$withval" in + withval=$with_freetype; case "$withval" in yes) with_freetype=yes;; no) with_freetype=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-freetype" >&5 @@ -7416,16 +8060,17 @@ else with_freetype=yes -fi; +fi + if test "$with_freetype" = "no" ; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else # Extract the first word of "freetype-config", so it can be a program name with args. set dummy freetype-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7440,27 +8085,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FREETYPE_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG - if test -n "$FREETYPE_CONFIG"; then - echo "$as_me:$LINENO: result: $FREETYPE_CONFIG" >&5 -echo "${ECHO_T}$FREETYPE_CONFIG" >&6 + { echo "$as_me:$LINENO: result: $FREETYPE_CONFIG" >&5 +echo "${ECHO_T}$FREETYPE_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -n "$FREETYPE_CONFIG"; then LIBFREETYPE=`freetype-config --libs` INCFREETYPE=`freetype-config --cflags` @@ -7485,10 +8131,9 @@ SUPPORT_PS="false" -# Check whether --with-gs or --without-gs was given. +# Check whether --with-gs was given. if test "${with_gs+set}" = set; then - withval="$with_gs" - case "$withval" in + withval=$with_gs; case "$withval" in yes) with_gs=yes;; no) with_gs=no;; *) { { echo "$as_me:$LINENO: error: bad value $withval for --with-gs" >&5 @@ -7498,16 +8143,17 @@ else with_gs=yes -fi; +fi + if test "$with_gs" = "no" ; then - echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6 + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } else # Extract the first word of "gs", so it can be a program name with args. set dummy gs; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7522,27 +8168,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GS="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi GS=$ac_cv_path_GS - if test -n "$GS"; then - echo "$as_me:$LINENO: result: $GS" >&5 -echo "${ECHO_T}$GS" >&6 + { echo "$as_me:$LINENO: result: $GS" >&5 +echo "${ECHO_T}$GS" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + SUPPORT_PS="false" if test -n "$GS"; then SUPPORT_PS="true" @@ -7582,9 +8229,9 @@ # Create files - ac_config_headers="$ac_config_headers config.h" +ac_config_headers="$ac_config_headers config.h" - ac_config_files="$ac_config_files src/META Makefile src/Makefile doc/Makefile test/Makefile examples/Makefile examples/converter/Makefile examples/crop/Makefile examples/edgedetect/Makefile examples/gifanim/Makefile examples/imgstat/Makefile examples/liv/Makefile examples/monochrome/Makefile examples/normalize/Makefile examples/resize/Makefile examples/tiffps/Makefile examples/ttfimg/Makefile" +ac_config_files="$ac_config_files src/META Makefile src/Makefile doc/Makefile test/Makefile examples/Makefile examples/converter/Makefile examples/crop/Makefile examples/edgedetect/Makefile examples/gifanim/Makefile examples/imgstat/Makefile examples/liv/Makefile examples/monochrome/Makefile examples/normalize/Makefile examples/resize/Makefile examples/tiffps/Makefile examples/ttfimg/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -7604,39 +8251,58 @@ # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -7645,38 +8311,31 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${BUILD_NATIVE_TRUE}" && test -z "${BUILD_NATIVE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -7792,17 +8451,45 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -7812,8 +8499,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -7827,18 +8549,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -7846,159 +8569,120 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -8007,7 +8691,28 @@ as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -8016,31 +8721,14 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by camlimages $as_me 3.0.1, which was -generated by GNU Autoconf 2.59. Invocation command line was +# values after options handling. +ac_log=" +This file was extended by camlimages $as_me 3.2.0, which was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8048,30 +8736,20 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -8079,7 +8757,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -8098,19 +8776,21 @@ $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -camlimages config.status 3.0.1 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +camlimages config.status 3.2.0 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -8121,39 +8801,24 @@ do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift @@ -8163,18 +8828,24 @@ $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -8190,53 +8861,65 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "src/META" ) CONFIG_FILES="$CONFIG_FILES src/META" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "examples/converter/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/converter/Makefile" ;; - "examples/crop/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/crop/Makefile" ;; - "examples/edgedetect/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/edgedetect/Makefile" ;; - "examples/gifanim/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/gifanim/Makefile" ;; - "examples/imgstat/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/imgstat/Makefile" ;; - "examples/liv/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/liv/Makefile" ;; - "examples/monochrome/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/monochrome/Makefile" ;; - "examples/normalize/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/normalize/Makefile" ;; - "examples/resize/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/resize/Makefile" ;; - "examples/tiffps/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/tiffps/Makefile" ;; - "examples/ttfimg/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/ttfimg/Makefile" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "src/META") CONFIG_FILES="$CONFIG_FILES src/META" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "examples/converter/Makefile") CONFIG_FILES="$CONFIG_FILES examples/converter/Makefile" ;; + "examples/crop/Makefile") CONFIG_FILES="$CONFIG_FILES examples/crop/Makefile" ;; + "examples/edgedetect/Makefile") CONFIG_FILES="$CONFIG_FILES examples/edgedetect/Makefile" ;; + "examples/gifanim/Makefile") CONFIG_FILES="$CONFIG_FILES examples/gifanim/Makefile" ;; + "examples/imgstat/Makefile") CONFIG_FILES="$CONFIG_FILES examples/imgstat/Makefile" ;; + "examples/liv/Makefile") CONFIG_FILES="$CONFIG_FILES examples/liv/Makefile" ;; + "examples/monochrome/Makefile") CONFIG_FILES="$CONFIG_FILES examples/monochrome/Makefile" ;; + "examples/normalize/Makefile") CONFIG_FILES="$CONFIG_FILES examples/normalize/Makefile" ;; + "examples/resize/Makefile") CONFIG_FILES="$CONFIG_FILES examples/resize/Makefile" ;; + "examples/tiffps/Makefile") CONFIG_FILES="$CONFIG_FILES examples/tiffps/Makefile" ;; + "examples/ttfimg/Makefile") CONFIG_FILES="$CONFIG_FILES examples/ttfimg/Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -8248,630 +8931,629 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@AMTAR@,$AMTAR,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@OCAMLC@,$OCAMLC,;t t -s,@OCAMLC_OPT@,$OCAMLC_OPT,;t t -s,@OCAMLOPT@,$OCAMLOPT,;t t -s,@OCAMLOPT_OPT@,$OCAMLOPT_OPT,;t t -s,@OCAMLDEP@,$OCAMLDEP,;t t -s,@OCAMLDEP_OPT@,$OCAMLDEP_OPT,;t t -s,@OCAMLMKLIB@,$OCAMLMKLIB,;t t -s,@OCAMLMKLIB_OPT@,$OCAMLMKLIB_OPT,;t t -s,@OCAMLLIB@,$OCAMLLIB,;t t -s,@BUILD_NATIVE_TRUE@,$BUILD_NATIVE_TRUE,;t t -s,@BUILD_NATIVE_FALSE@,$BUILD_NATIVE_FALSE,;t t -s,@BUILD_BYTECODE_TRUE@,$BUILD_BYTECODE_TRUE,;t t -s,@BUILD_BYTECODE_FALSE@,$BUILD_BYTECODE_FALSE,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@DEPDIR@,$DEPDIR,;t t -s,@am__include@,$am__include,;t t -s,@am__quote@,$am__quote,;t t -s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t -s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t -s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t -s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t -s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@WORD_SIZE@,$WORD_SIZE,;t t -s,@X_CFLAGS@,$X_CFLAGS,;t t -s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t -s,@X_LIBS@,$X_LIBS,;t t -s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t -s,@HAVE_LABLGTK_TRUE@,$HAVE_LABLGTK_TRUE,;t t -s,@HAVE_LABLGTK_FALSE@,$HAVE_LABLGTK_FALSE,;t t -s,@LABLGTKDIR@,$LABLGTKDIR,;t t -s,@HAVE_LABLGTK2_TRUE@,$HAVE_LABLGTK2_TRUE,;t t -s,@HAVE_LABLGTK2_FALSE@,$HAVE_LABLGTK2_FALSE,;t t -s,@LABLGTK2DIR@,$LABLGTK2DIR,;t t -s,@LIBGIF@,$LIBGIF,;t t -s,@SUPPORT_GIF@,$SUPPORT_GIF,;t t -s,@HAVE_GIF_TRUE@,$HAVE_GIF_TRUE,;t t -s,@HAVE_GIF_FALSE@,$HAVE_GIF_FALSE,;t t -s,@LIBPNG@,$LIBPNG,;t t -s,@SUPPORT_PNG@,$SUPPORT_PNG,;t t -s,@HAVE_PNG_TRUE@,$HAVE_PNG_TRUE,;t t -s,@HAVE_PNG_FALSE@,$HAVE_PNG_FALSE,;t t -s,@LIBJPEG@,$LIBJPEG,;t t -s,@SUPPORT_JPEG@,$SUPPORT_JPEG,;t t -s,@HAVE_JPEG_TRUE@,$HAVE_JPEG_TRUE,;t t -s,@HAVE_JPEG_FALSE@,$HAVE_JPEG_FALSE,;t t -s,@LIBTIFF@,$LIBTIFF,;t t -s,@SUPPORT_TIFF@,$SUPPORT_TIFF,;t t -s,@HAVE_TIFF_TRUE@,$HAVE_TIFF_TRUE,;t t -s,@HAVE_TIFF_FALSE@,$HAVE_TIFF_FALSE,;t t -s,@LIBXPM@,$LIBXPM,;t t -s,@INCXPM@,$INCXPM,;t t -s,@SUPPORT_XPM@,$SUPPORT_XPM,;t t -s,@HAVE_XPM_TRUE@,$HAVE_XPM_TRUE,;t t -s,@HAVE_XPM_FALSE@,$HAVE_XPM_FALSE,;t t -s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t -s,@INCFREETYPE@,$INCFREETYPE,;t t -s,@LIBFREETYPE@,$LIBFREETYPE,;t t -s,@SUPPORT_FREETYPE@,$SUPPORT_FREETYPE,;t t -s,@HAVE_FREETYPE_TRUE@,$HAVE_FREETYPE_TRUE,;t t -s,@HAVE_FREETYPE_FALSE@,$HAVE_FREETYPE_FALSE,;t t -s,@GS@,$GS,;t t -s,@SUPPORT_PS@,$SUPPORT_PS,;t t -s,@HAVE_PS_TRUE@,$HAVE_PS_TRUE,;t t -s,@HAVE_PS_FALSE@,$HAVE_PS_FALSE,;t t -s,@PATH_RGB_TXT@,$PATH_RGB_TXT,;t t -s,@REQUIRES@,$REQUIRES,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +OCAMLC!$OCAMLC$ac_delim +OCAMLC_OPT!$OCAMLC_OPT$ac_delim +OCAMLOPT!$OCAMLOPT$ac_delim +OCAMLOPT_OPT!$OCAMLOPT_OPT$ac_delim +OCAMLDEP!$OCAMLDEP$ac_delim +OCAMLDEP_OPT!$OCAMLDEP_OPT$ac_delim +OCAMLCFLAGS!$OCAMLCFLAGS$ac_delim +OCAMLMKLIB!$OCAMLMKLIB$ac_delim +OCAMLMKLIB_OPT!$OCAMLMKLIB_OPT$ac_delim +OCAMLLIB!$OCAMLLIB$ac_delim +BUILD_NATIVE_TRUE!$BUILD_NATIVE_TRUE$ac_delim +BUILD_NATIVE_FALSE!$BUILD_NATIVE_FALSE$ac_delim +BUILD_BYTECODE_TRUE!$BUILD_BYTECODE_TRUE$ac_delim +BUILD_BYTECODE_FALSE!$BUILD_BYTECODE_FALSE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +WORD_SIZE!$WORD_SIZE$ac_delim +XMKMF!$XMKMF$ac_delim +X_CFLAGS!$X_CFLAGS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +X_PRE_LIBS!$X_PRE_LIBS$ac_delim +X_LIBS!$X_LIBS$ac_delim +X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim +PATH_OCAMLFIND!$PATH_OCAMLFIND$ac_delim +OCAMLSITELIBDIR!$OCAMLSITELIBDIR$ac_delim +HAVE_LABLGTK_TRUE!$HAVE_LABLGTK_TRUE$ac_delim +HAVE_LABLGTK_FALSE!$HAVE_LABLGTK_FALSE$ac_delim +LABLGTKDIR!$LABLGTKDIR$ac_delim +HAVE_LABLGTK2_TRUE!$HAVE_LABLGTK2_TRUE$ac_delim +HAVE_LABLGTK2_FALSE!$HAVE_LABLGTK2_FALSE$ac_delim +LABLGTK2DIR!$LABLGTK2DIR$ac_delim +LIBGIF!$LIBGIF$ac_delim +SUPPORT_GIF!$SUPPORT_GIF$ac_delim +HAVE_GIF_TRUE!$HAVE_GIF_TRUE$ac_delim +HAVE_GIF_FALSE!$HAVE_GIF_FALSE$ac_delim +LIBPNG!$LIBPNG$ac_delim +SUPPORT_PNG!$SUPPORT_PNG$ac_delim +HAVE_PNG_TRUE!$HAVE_PNG_TRUE$ac_delim +HAVE_PNG_FALSE!$HAVE_PNG_FALSE$ac_delim +LIBJPEG!$LIBJPEG$ac_delim +SUPPORT_JPEG!$SUPPORT_JPEG$ac_delim +HAVE_JPEG_TRUE!$HAVE_JPEG_TRUE$ac_delim +HAVE_JPEG_FALSE!$HAVE_JPEG_FALSE$ac_delim +LIBTIFF!$LIBTIFF$ac_delim +SUPPORT_TIFF!$SUPPORT_TIFF$ac_delim +HAVE_TIFF_TRUE!$HAVE_TIFF_TRUE$ac_delim +HAVE_TIFF_FALSE!$HAVE_TIFF_FALSE$ac_delim +LIBXPM!$LIBXPM$ac_delim +INCXPM!$INCXPM$ac_delim +SUPPORT_XPM!$SUPPORT_XPM$ac_delim +HAVE_XPM_TRUE!$HAVE_XPM_TRUE$ac_delim +HAVE_XPM_FALSE!$HAVE_XPM_FALSE$ac_delim +FREETYPE_CONFIG!$FREETYPE_CONFIG$ac_delim +INCFREETYPE!$INCFREETYPE$ac_delim +LIBFREETYPE!$LIBFREETYPE$ac_delim +SUPPORT_FREETYPE!$SUPPORT_FREETYPE$ac_delim +HAVE_FREETYPE_TRUE!$HAVE_FREETYPE_TRUE$ac_delim +HAVE_FREETYPE_FALSE!$HAVE_FREETYPE_FALSE$ac_delim +GS!$GS$ac_delim +SUPPORT_PS!$SUPPORT_PS$ac_delim +HAVE_PS_TRUE!$HAVE_PS_TRUE$ac_delim +HAVE_PS_FALSE!$HAVE_PS_FALSE$ac_delim +PATH_RGB_TXT!$PATH_RGB_TXT$ac_delim +REQUIRES!$REQUIRES$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def _ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs +rm -f conftest.defines conftest.tail +echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - rm -f $ac_file - mv $tmp/config.h $ac_file + mv "$tmp/config.h" $ac_file fi else - cat $tmp/config.h - rm -f $tmp/config.h + echo "/* $configure_input */" + cat "$ac_result" fi + rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do @@ -8882,135 +9564,39 @@ _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'`/stamp-h$_am_stamp_count -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -9020,92 +9606,123 @@ # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` else continue fi - grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF @@ -9141,7 +9758,8 @@ Language: $OCAMLVERSION Bytecode compiler: $OCAMLC Native compiler: $OCAMLOPT -Installed in: $OCAMLLIB +OCamlfind: $with_ocamlfind +Installed in: $OCAMLSITELIBDIR Lablgtk support: $SUPPORT_LABLGTK Lablgtk2 support: $SUPPORT_LABLGTK2 Freetype support: $SUPPORT_FREETYPE diff -Nru camlimages-3.0.1/configure.ac camlimages-4.0.1/configure.ac --- camlimages-3.0.1/configure.ac 2007-10-11 10:50:24.000000000 +0200 +++ camlimages-4.0.1/configure.ac 2011-06-22 20:04:32.000000000 +0200 @@ -1,7 +1,9 @@ # Process this file with autoconf to produce a configure script. +m4_include([ocaml.m4]) AC_PREREQ(2.59) -AC_INIT(camlimages, 3.0.1, Pierre.Weis@inria.fr) +AC_INIT(camlimages, 3.2.0, use-omake-to-be-supported@nowhere.com) AM_INIT_AUTOMAKE([foreign]) +AM_MAINTAINER_MODE # Check ocaml AC_PROG_OCAML([3.08]) @@ -76,6 +78,35 @@ SUPPORT_LABLGTK="false" LABLGTKDIR= +AC_PATH_PROG(PATH_OCAMLFIND, ocamlfind, no) + +if test "x$PATH_OCAMLFIND" = "x"; then + with_ocamlfind_default="no" +else + with_ocamlfind_default="yes" +fi + +AC_ARG_WITH( + ocamlfind, + AC_HELP_STRING( + [--with-ocamlfind], + [enable ocamlfind support (default: depends on ocamlfind)] + ), + [case "$withval" in + yes) with_ocamlfind=yes;; + no) with_ocamlfind=no;; + *) AC_MSG_ERROR([bad value $withval for --with-ocamlfind]);; + esac], + [with_ocamlfind=$with_ocamlfind_default] +) + +if test "$with_ocamlfind" = "no"; then + OCAMLSITELIBDIR=$OCAMLLIB/camlimages +else + OCAMLSITELIBDIR=$OCAMLLIB/site-lib/camlimages +fi +AC_SUBST(OCAMLSITELIBDIR) + AC_ARG_WITH( lablgtk, AC_HELP_STRING( @@ -512,7 +543,8 @@ Language: $OCAMLVERSION Bytecode compiler: $OCAMLC Native compiler: $OCAMLOPT -Installed in: $OCAMLLIB +OCamlfind: $with_ocamlfind +Installed in: $OCAMLSITELIBDIR Lablgtk support: $SUPPORT_LABLGTK Lablgtk2 support: $SUPPORT_LABLGTK2 Freetype support: $SUPPORT_FREETYPE diff -Nru camlimages-3.0.1/.cvsignore camlimages-4.0.1/.cvsignore --- camlimages-3.0.1/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,15 @@ +config.log +config.status +config.cache +config.h +Makefile.config +Makefile.build +customtop +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +configure +install-sh +missing +stamp-h1 diff -Nru camlimages-3.0.1/debian/changelog camlimages-4.0.1/debian/changelog --- camlimages-3.0.1/debian/changelog 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/changelog 2011-07-12 18:48:16.000000000 +0200 @@ -1,26 +1,39 @@ -camlimages (1:3.0.1-5build4) oneiric; urgency=low +camlimages (1:4.0.1-3) unstable; urgency=low - * Rebuild to pick up ocaml fixes on armel. + * Team upload + * Depends on libjpeg-dev instead of libjpeg62-dev (Closes: #633646) - -- Adam Conrad Wed, 24 Aug 2011 16:34:22 -0600 + -- Stéphane Glondu Tue, 12 Jul 2011 15:19:42 +0200 -camlimages (1:3.0.1-5build3) oneiric; urgency=low +camlimages (1:4.0.1-2) unstable; urgency=low - * Rebuild for OCaml 3.12.0. + * Team upload + * Fix compilation on bytecode architectures - -- Colin Watson Tue, 17 May 2011 08:24:04 +0100 + -- Stéphane Glondu Sun, 03 Jul 2011 15:57:28 +0200 -camlimages (1:3.0.1-5build2) lucid; urgency=low +camlimages (1:4.0.1-1) unstable; urgency=low - * No-change rebuild for OCaml 3.11.2 transition (LP: #527627). + * Team upload - -- Ilya Barygin Thu, 25 Feb 2010 20:53:34 +0300 + [ Stéphane Glondu ] + * New upstream release (Closes: #604636, #631852) + - remove patches: + + Integer-Overflows-tiffread.c applied upstream + + other patches obsoleted by new upstream build system + - add patch to fix building of mixed bytecode libraries + * debian/control: + - remove Stefano from Uploaders + - use libjpeg-dev in Build-Depends (Closes: #629959) + - bump Standards-Version to 3.9.2 + * Rewrite debian/rules using dh with overrides + * Bump debhelper compatibility level to 8 + * Update watch file -camlimages (1:3.0.1-5build1) lucid; urgency=low - - * No-change rebuild for liblablgtk2-ocaml transition. + [ Sylvain Le Gall ] + * Switch to dpkg-source 3.0 (quilt) format - -- Ilya Barygin Sun, 31 Jan 2010 10:30:57 +0300 + -- Stéphane Glondu Sat, 02 Jul 2011 20:22:34 +0200 camlimages (1:3.0.1-5) unstable; urgency=low @@ -44,7 +57,7 @@ camlimages (1:3.0.1-3) unstable; urgency=low - * Add a patch fix_more_integer_overflows to fix security issues, + * Add a patch fix_more_integer_overflows to fix security issues, (Closes: 540146) Fixes: CVE-2009-2660 @@ -151,7 +164,7 @@ * Set me as only uploaders, * Made debian/control a PHONY target, * Upgrade standards version to 3.7.2 (no change), - * Hijack the package, with the permission of the + * Hijack the package, with the permission of the Debian OCaml Maintainer group, -- Sylvain Le Gall Tue, 13 Jun 2006 19:09:31 +0200 @@ -235,7 +248,7 @@ - libcamlimages-ocaml-dev.dirs ( 3.07 -> 3.08 ) - libcamlimages-ocaml-dev.files ( 3.07 -> 3.08 ) - libcamlimages-ocaml.dirs ( 3.07 -> 3.08 ) - + -- Sylvain LE GALL Fri, 27 Jul 2004 23:44:56 +0200 camlimages (2.12-2) unstable; urgency=low diff -Nru camlimages-3.0.1/debian/clean camlimages-4.0.1/debian/clean --- camlimages-3.0.1/debian/clean 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/debian/clean 2011-07-02 18:03:59.000000000 +0200 @@ -0,0 +1,3 @@ +.omakedb +.omakedb.lock +config.h diff -Nru camlimages-3.0.1/debian/compat camlimages-4.0.1/debian/compat --- camlimages-3.0.1/debian/compat 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/compat 2011-07-02 18:03:59.000000000 +0200 @@ -1 +1 @@ -5 +8 diff -Nru camlimages-3.0.1/debian/control camlimages-4.0.1/debian/control --- camlimages-3.0.1/debian/control 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/control 2011-07-12 18:48:16.000000000 +0200 @@ -2,28 +2,25 @@ Section: devel Priority: optional Maintainer: Debian OCaml Maintainers -Uploaders: Ralf Treinen , - Stefano Zacchiroli , +Uploaders: + Ralf Treinen , Sylvain Le Gall , Mehdi Dogguy -Build-Depends: cdbs (>= 0.4.23), - debhelper (>= 5), - dpatch, - ocaml-nox (>= 3.11.1), - ocaml, +Build-Depends: + debhelper (>= 8), + ocaml (>= 3.11.1), ocaml-findlib (>> 1.2.5), - libpng12-dev, - libjpeg62-dev, - libtiff4-dev, - libxpm-dev, - libfreetype6-dev (>= 2.1.7), - libgif-dev, + libpng12-dev, + libjpeg-dev, + libtiff4-dev, + libxpm-dev, + libfreetype6-dev (>= 2.1.7), + libgif-dev, liblablgtk2-ocaml-dev (>> 2.12.0-3), - chrpath, - ghostscript, + ghostscript, dh-ocaml (>= 0.9), - automake1.9 -Standards-Version: 3.8.3 + omake +Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/camlimages.git Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/camlimages.git Homepage: http://gallium.inria.fr/camlimages/ @@ -44,7 +41,7 @@ various image file formats (hence providing a translation facility from format to format) . - * an interface with the Caml graphics library allows to display + * an interface with the Caml graphics library allows one to display images in the Graphics module screen and to mix them with Caml drawings . @@ -64,7 +61,7 @@ Depends: ${ocaml:Depends}, libpng12-dev, - libjpeg62-dev, + libjpeg-dev, libtiff4-dev, libxpm-dev, libfreetype6-dev, @@ -73,6 +70,8 @@ ${misc:Depends} Provides: ${ocaml:Provides} +Suggests: + ocaml-findlib Description: OCaml image processing library (Development package) CamlImages is an image processing library for OCaml, which provides: . @@ -80,7 +79,7 @@ various image file formats (hence providing a translation facility from format to format) . - * an interface with the Caml graphics library allows to display + * an interface with the Caml graphics library allows one to display images in the Graphics module screen and to mix them with Caml drawings . @@ -100,7 +99,8 @@ Section: doc Suggests: libcamlimages-ocaml-dev Depends: ${misc:Depends} -Conflicts: libcamlimages-ocaml-dev (<< 1:3.0.1-2) +Breaks: libcamlimages-ocaml-dev (<< 1:3.0.1-2) +Replaces: libcamlimages-ocaml-dev (<< 1:3.0.1-2) Description: OCaml CamlImages library documentation This package provides documentation for the OCaml CamlImages library. diff -Nru camlimages-3.0.1/debian/copyright camlimages-4.0.1/debian/copyright --- camlimages-3.0.1/debian/copyright 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/copyright 2011-07-02 18:03:59.000000000 +0200 @@ -25,7 +25,7 @@ On Debian systems, the complete text of the GNU Library General Public License version 2 can be found in '/usr/share/common-licenses/LGPL-2'. - + Files: debian/* Copyright: © 2004-2008 Sylvain Le Gall © 2002-2008 Stefano Zacchiroli diff -Nru camlimages-3.0.1/debian/libcamlimages-ocaml-dev.dirs.in camlimages-4.0.1/debian/libcamlimages-ocaml-dev.dirs.in --- camlimages-3.0.1/debian/libcamlimages-ocaml-dev.dirs.in 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/libcamlimages-ocaml-dev.dirs.in 1970-01-01 02:00:00.000000000 +0200 @@ -1 +0,0 @@ -@OCamlStdlibDir@ diff -Nru camlimages-3.0.1/debian/libcamlimages-ocaml-dev.install.in camlimages-4.0.1/debian/libcamlimages-ocaml-dev.install.in --- camlimages-3.0.1/debian/libcamlimages-ocaml-dev.install.in 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/libcamlimages-ocaml-dev.install.in 2011-07-02 18:03:59.000000000 +0200 @@ -1 +1 @@ -debian/tmp/usr/lib/ocaml/site-lib/camlimages @OCamlStdlibDir@ +@OCamlStdlibDir@/camlimages diff -Nru camlimages-3.0.1/debian/libcamlimages-ocaml.dirs.in camlimages-4.0.1/debian/libcamlimages-ocaml.dirs.in --- camlimages-3.0.1/debian/libcamlimages-ocaml.dirs.in 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/libcamlimages-ocaml.dirs.in 1970-01-01 02:00:00.000000000 +0200 @@ -1 +0,0 @@ -@OCamlDllDir@ diff -Nru camlimages-3.0.1/debian/libcamlimages-ocaml-doc.doc-base.1 camlimages-4.0.1/debian/libcamlimages-ocaml-doc.doc-base.1 --- camlimages-3.0.1/debian/libcamlimages-ocaml-doc.doc-base.1 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/libcamlimages-ocaml-doc.doc-base.1 2011-07-02 18:03:59.000000000 +0200 @@ -5,5 +5,5 @@ Section: Programming/OCaml Format: HTML -Index: /usr/share/doc/libcamlimages-ocaml-doc/doc/eng.html -Files: /usr/share/doc/libcamlimages-ocaml-doc/doc/* +Index: /usr/share/doc/libcamlimages-ocaml-doc/doc/old/eng.htm +Files: /usr/share/doc/libcamlimages-ocaml-doc/doc/old/* diff -Nru camlimages-3.0.1/debian/libcamlimages-ocaml-doc.ocamldoc.in camlimages-4.0.1/debian/libcamlimages-ocaml-doc.ocamldoc.in --- camlimages-3.0.1/debian/libcamlimages-ocaml-doc.ocamldoc.in 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/libcamlimages-ocaml-doc.ocamldoc.in 2011-07-02 18:03:59.000000000 +0200 @@ -1,2 +1,2 @@ -package lablgtk2 ---include debian/tmp/@OCamlStdlibDir@/site-lib/camlimages/ +--include debian/tmp/@OCamlStdlibDir@/camlimages/ diff -Nru camlimages-3.0.1/debian/libcamlimages-ocaml.install.in camlimages-4.0.1/debian/libcamlimages-ocaml.install.in --- camlimages-3.0.1/debian/libcamlimages-ocaml.install.in 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/debian/libcamlimages-ocaml.install.in 2011-07-02 18:03:59.000000000 +0200 @@ -0,0 +1 @@ +@OCamlDllDir@/*.so diff -Nru camlimages-3.0.1/debian/patches/0001-Add-missing-cclib-in-ocamlc-a.patch camlimages-4.0.1/debian/patches/0001-Add-missing-cclib-in-ocamlc-a.patch --- camlimages-3.0.1/debian/patches/0001-Add-missing-cclib-in-ocamlc-a.patch 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/debian/patches/0001-Add-missing-cclib-in-ocamlc-a.patch 2011-07-02 18:03:59.000000000 +0200 @@ -0,0 +1,31 @@ +From: Stephane Glondu +Date: Sat, 2 Jul 2011 17:56:41 +0200 +Subject: Add missing -cclib in ocamlc -a + +This allows simple linking with -custom by naming only .cma files +(used by advi). + +Remark: runtime support libraries (dll*.so, lib*.a) and the OCaml +archives (*.cma, *.cmxa) are built in an ad-hoc way using ocamlmklib, +ocamlc -a and ocamlopt -a. It would be better (but more intrusive) to +use only ocamlmklib. + +Signed-off-by: Stephane Glondu +--- + src/OMakefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/OMakefile b/src/OMakefile +index e198fa1..013164f 100644 +--- a/src/OMakefile ++++ b/src/OMakefile +@@ -225,7 +225,7 @@ MakeLibOCaml(name) = + $(LIBRARY_PREFIX)_$(name).cma $(LIBRARY_PREFIX)_$(name).cmxa: $(MakeLibC $(name)) + # OCAML_{BYTE,NATIVE}_LINK_FLAGS do not work for OCamlLibrary + # Bit dirty workaround +- OCAMLCFLAGS+=-dllib -l$(LIBRARY_PREFIX)_$(name) ++ OCAMLCFLAGS+=-dllib -l$(LIBRARY_PREFIX)_$(name) -cclib -l$(LIBRARY_PREFIX)_$(name) + OCAMLOPTFLAGS+=-cclib -l$(LIBRARY_PREFIX)_$(name) + # use mapprefix instead of addprefix, otherwise "-cclib -lgif" + # is considered one option. +-- diff -Nru camlimages-3.0.1/debian/patches/00list camlimages-4.0.1/debian/patches/00list --- camlimages-3.0.1/debian/patches/00list 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/patches/00list 1970-01-01 02:00:00.000000000 +0200 @@ -1,4 +0,0 @@ -fix_3_0_1_release -fix_integer_overflows -fix_more_integer_overflows -tiffread diff -Nru camlimages-3.0.1/debian/patches/fix_3_0_1_release.dpatch camlimages-4.0.1/debian/patches/fix_3_0_1_release.dpatch --- camlimages-3.0.1/debian/patches/fix_3_0_1_release.dpatch 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/patches/fix_3_0_1_release.dpatch 1970-01-01 02:00:00.000000000 +0200 @@ -1,97 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix_3_0_1_release.dpatch by Sylvain Le Gall -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Fix bugs in the release 3.0.1 for OCaml 3.11 migration - -@DPATCH@ -diff -urNad camlimages~/examples/liv/liv.ml camlimages/examples/liv/liv.ml ---- camlimages~/examples/liv/liv.ml 2009-03-17 22:47:59.000000000 +0100 -+++ camlimages/examples/liv/liv.ml 2009-03-17 22:49:11.000000000 +0100 -@@ -12,6 +12,9 @@ - - (* $Id: liv.ml,v 1.7 2006/09/29 13:21:41 rousse Exp $ *) - -+module D = Display -+open D -+ - open Images;; - open OImages;; - -@@ -21,14 +24,13 @@ - - open Livmisc;; - open Gui;; --open Display;; - open Tout;; - - open Gc;; - - exception Skipped;; - --let base_filters = ref ([] : Display.filter list);; -+let base_filters = ref ([] : D.filter list);; - - let r = Gc.get () in - r.max_overhead <- 0; Gc.set r; -@@ -52,15 +54,15 @@ - "-root", - Arg.String - (function -- | "center" -> Display.root_mode := `CENTER -- | "random" -> Display.root_mode := `RANDOM -+ | "center" -> D.root_mode := `CENTER -+ | "random" -> D.root_mode := `RANDOM - | _ -> raise (Failure "root mode")), - ": on root [center|random]"; - "-transition", - Arg.String - (function -- | "myst" -> Display.transition := `MYST -- | "transparent" -> Display.transition := `TRANSPARENT -+ | "myst" -> D.transition := `MYST -+ | "transparent" -> D.transition := `TRANSPARENT - | _ -> raise (Failure "transition")), - ": transition [myst|transparent]"; - "-transparentborder", -diff -urNad camlimages~/src/Makefile.am camlimages/src/Makefile.am ---- camlimages~/src/Makefile.am 2009-03-17 22:47:59.000000000 +0100 -+++ camlimages/src/Makefile.am 2009-03-17 22:49:11.000000000 +0100 -@@ -85,6 +85,7 @@ - oColor.mli \ - oImages.mli \ - reduce.mli \ -+ geometry.mli \ - blend.mli \ - graphic_image.mli \ - bmp.mli \ -diff -urNad camlimages~/src/Makefile.in camlimages/src/Makefile.in ---- camlimages~/src/Makefile.in 2009-03-17 22:47:59.000000000 +0100 -+++ camlimages/src/Makefile.in 2009-03-17 22:49:11.000000000 +0100 -@@ -341,6 +341,7 @@ - images.mli \ - oColor.mli \ - oImages.mli \ -+ geometry.mli \ - reduce.mli \ - blend.mli \ - graphic_image.mli \ -diff -urNad camlimages~/src/geometry.mli camlimages/src/geometry.mli ---- camlimages~/src/geometry.mli 1970-01-01 01:00:00.000000000 +0100 -+++ camlimages/src/geometry.mli 2009-03-17 22:49:26.000000000 +0100 -@@ -0,0 +1,15 @@ -+type size = Scale of float | Pixel of int | Guess -+type aspect_opts = Keep_at_most | Keep_at_least | Dont_keep -+type resize_switch = Always | Bigger_only | Smaller_only -+type from = TopLeft | BottomRight | Center -+type position = AtPixel of from * int | AtScale of from * float -+type t = { geom_width : int; geom_height : int; geom_x : int; geom_y : int; } -+type spec = { -+ spec_width : size; -+ spec_height : size; -+ spec_aspect : aspect_opts; -+ spec_switch : resize_switch; -+ spec_x : int; -+ spec_y : int; -+} -+val compute : spec -> int -> int -> t diff -Nru camlimages-3.0.1/debian/patches/fix_integer_overflows.dpatch camlimages-4.0.1/debian/patches/fix_integer_overflows.dpatch --- camlimages-3.0.1/debian/patches/fix_integer_overflows.dpatch 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/patches/fix_integer_overflows.dpatch 1970-01-01 02:00:00.000000000 +0200 @@ -1,89 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix_integer_overflows.dpatch by Mehdi Dogguy -## -## DP: Fix multiple integer overflows. -## DP: http://www.ocert.org/advisories/ocert-2009-009.html - -@DPATCH@ -diff -urNad camlimages~/src/pngread.c camlimages/src/pngread.c ---- camlimages~/src/pngread.c 2009-06-23 11:22:20.000000000 +0200 -+++ camlimages/src/pngread.c 2009-07-03 17:51:31.000000000 +0200 -@@ -15,6 +15,8 @@ - #include "config.h" - #endif - -+#include -+ - #include - - #include -@@ -26,6 +28,12 @@ - #define PNG_TAG_INDEX16 2 - #define PNG_TAG_INDEX4 3 - -+/* Test if x or y are negative, or if multiplying x * y would cause an -+ * arithmetic overflow. -+ */ -+#define oversized(x, y) \ -+ ((x) < 0 || (y) < 0 || ((y) != 0 && (x) > INT_MAX / (y))) -+ - value read_png_file_as_rgb24( name ) - value name; - { -@@ -81,6 +89,9 @@ - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); - -+ if (oversized (width, height)) -+ failwith ("png error: image contains oversized or bogus width and height"); -+ - if ( color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { - png_set_gray_to_rgb(png_ptr); -@@ -102,10 +113,16 @@ - - rowbytes = png_get_rowbytes(png_ptr, info_ptr); - -+ if (oversized (rowbytes, height)) -+ failwith ("png error: image contains oversized or bogus rowbytes and height"); -+ - { - int i; - png_bytep *row_pointers; - -+ if (oversized (sizeof (png_bytep), height)) -+ failwith ("png error: image contains oversized or bogus height"); -+ - row_pointers = (png_bytep*) stat_alloc(sizeof(png_bytep) * height); - - res = alloc_tuple(3); -@@ -235,6 +252,9 @@ - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); - -+ if (oversized (width, height)) -+ failwith ("png error: image contains oversized or bogus width and height"); -+ - if ( color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { - png_set_gray_to_rgb(png_ptr); -@@ -251,6 +271,9 @@ - - rowbytes = png_get_rowbytes(png_ptr, info_ptr); - -+ if (oversized (rowbytes, height)) -+ failwith ("png error: image contains oversized or bogus rowbytes and height"); -+ - /* - fprintf(stderr, "pngread.c: actual loading\n"); fflush(stderr); - */ -@@ -259,6 +282,9 @@ - png_bytep *row_pointers; - char mesg[256]; - -+ if (oversized (sizeof (png_bytep), height)) -+ failwith ("png error: image contains oversized or bogus height"); -+ - row_pointers = (png_bytep*)stat_alloc(sizeof(png_bytep) * height); - res = alloc_tuple(3); - diff -Nru camlimages-3.0.1/debian/patches/fix_more_integer_overflows.dpatch camlimages-4.0.1/debian/patches/fix_more_integer_overflows.dpatch --- camlimages-3.0.1/debian/patches/fix_more_integer_overflows.dpatch 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/patches/fix_more_integer_overflows.dpatch 1970-01-01 02:00:00.000000000 +0200 @@ -1,167 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix_more_integer_overflows.dpatch by Sylvain Le Gall -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Fix multiple integer overflows round 2. -## DP: http://security-tracker.debian.net/tracker/CVE-2009-2660 - -@DPATCH@ -diff -urNad camlimages~/src/gifread.c camlimages/src/gifread.c ---- camlimages~/src/gifread.c 2009-07-31 22:57:24.000000000 +0200 -+++ camlimages/src/gifread.c 2009-08-07 23:45:01.000000000 +0200 -@@ -20,6 +20,8 @@ - #include - #include - -+#include "oversized.h" -+ - #include - #include - -@@ -191,6 +193,9 @@ - - GifFileType *GifFile = (GifFileType*) hdl; - -+ if( oversized( GifFile->Image.Width, sizeof(GifPixelType) ) ){ -+ failwith_oversized("gif"); -+ } - buf = alloc_string( GifFile->Image.Width * sizeof(GifPixelType) ); - - if( DGifGetLine(GifFile, String_val(buf), GifFile->Image.Width ) -diff -urNad camlimages~/src/jpegread.c camlimages/src/jpegread.c ---- camlimages~/src/jpegread.c 2009-07-31 22:57:24.000000000 +0200 -+++ camlimages/src/jpegread.c 2009-08-07 23:45:01.000000000 +0200 -@@ -20,6 +20,8 @@ - #include - #include - -+#include "oversized.h" -+ - #include - #include - -@@ -156,6 +158,12 @@ - */ - /* JSAMPLEs per row in output buffer */ - -+ if( oversized(cinfo.output_width, cinfo.output_components) ){ -+ jpeg_destroy_decompress(&cinfo); -+ fclose(infile); -+ failwith_oversized("jpeg"); -+ } -+ - row_stride = cinfo.output_width * cinfo.output_components; - - /* Make a one-row-high sample array that will go away when done with image */ -@@ -177,6 +185,12 @@ - jpeg_read_scanlines(&cinfo, buffer + cinfo.output_scanline, 1); - } - -+ if( oversized(row_stride, cinfo.output_height) ){ -+ jpeg_destroy_decompress(&cinfo); -+ fclose(infile); -+ failwith_oversized("jpeg"); -+ } -+ - { - CAMLlocalN(r,3); - r[0] = Val_int(cinfo.output_width); -@@ -352,6 +366,7 @@ - - { - CAMLlocalN(r,3); -+ // CR jfuruse: integer overflow - r[0] = Val_int(cinfop->output_width); - r[1] = Val_int(cinfop->output_height); - r[2] = alloc_tuple(3); -diff -urNad camlimages~/src/oversized.h camlimages/src/oversized.h ---- camlimages~/src/oversized.h 1970-01-01 01:00:00.000000000 +0100 -+++ camlimages/src/oversized.h 2009-08-07 23:45:01.000000000 +0200 -@@ -0,0 +1,9 @@ -+#include -+/* Test if x or y are negative, or if multiplying x * y would cause an -+ * arithmetic overflow. -+ */ -+#define oversized(x, y) \ -+ ((x) < 0 || (y) < 0 || ((y) != 0 && (x) > INT_MAX / (y))) -+ -+#define failwith_oversized(lib) \ -+ failwith("#lib error: image contains oversized or bogus width and height"); -diff -urNad camlimages~/src/pngread.c camlimages/src/pngread.c ---- camlimages~/src/pngread.c 2009-08-07 23:44:02.000000000 +0200 -+++ camlimages/src/pngread.c 2009-08-07 23:51:15.000000000 +0200 -@@ -19,6 +19,8 @@ - - #include - -+#include "oversized.h" -+ - #include - #include - #include -@@ -28,12 +30,6 @@ - #define PNG_TAG_INDEX16 2 - #define PNG_TAG_INDEX4 3 - --/* Test if x or y are negative, or if multiplying x * y would cause an -- * arithmetic overflow. -- */ --#define oversized(x, y) \ -- ((x) < 0 || (y) < 0 || ((y) != 0 && (x) > INT_MAX / (y))) -- - value read_png_file_as_rgb24( name ) - value name; - { -@@ -90,7 +86,7 @@ - &interlace_type, NULL, NULL); - - if (oversized (width, height)) -- failwith ("png error: image contains oversized or bogus width and height"); -+ failwith_oversized("png"); - - if ( color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { -@@ -114,14 +110,14 @@ - rowbytes = png_get_rowbytes(png_ptr, info_ptr); - - if (oversized (rowbytes, height)) -- failwith ("png error: image contains oversized or bogus rowbytes and height"); -+ failwith_oversized("png"); - - { - int i; - png_bytep *row_pointers; - - if (oversized (sizeof (png_bytep), height)) -- failwith ("png error: image contains oversized or bogus height"); -+ failwith_oversized("png"); - - row_pointers = (png_bytep*) stat_alloc(sizeof(png_bytep) * height); - -@@ -253,7 +249,7 @@ - &interlace_type, NULL, NULL); - - if (oversized (width, height)) -- failwith ("png error: image contains oversized or bogus width and height"); -+ failwith_oversized("png"); - - if ( color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { -@@ -272,7 +268,7 @@ - rowbytes = png_get_rowbytes(png_ptr, info_ptr); - - if (oversized (rowbytes, height)) -- failwith ("png error: image contains oversized or bogus rowbytes and height"); -+ failwith_oversized("png"); - - /* - fprintf(stderr, "pngread.c: actual loading\n"); fflush(stderr); -@@ -283,7 +279,7 @@ - char mesg[256]; - - if (oversized (sizeof (png_bytep), height)) -- failwith ("png error: image contains oversized or bogus height"); -+ failwith_oversized("png"); - - row_pointers = (png_bytep*)stat_alloc(sizeof(png_bytep) * height); - res = alloc_tuple(3); diff -Nru camlimages-3.0.1/debian/patches/series camlimages-4.0.1/debian/patches/series --- camlimages-3.0.1/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/debian/patches/series 2011-07-02 18:03:59.000000000 +0200 @@ -0,0 +1 @@ +0001-Add-missing-cclib-in-ocamlc-a.patch diff -Nru camlimages-3.0.1/debian/patches/tiffread.dpatch camlimages-4.0.1/debian/patches/tiffread.dpatch --- camlimages-3.0.1/debian/patches/tiffread.dpatch 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/patches/tiffread.dpatch 1970-01-01 02:00:00.000000000 +0200 @@ -1,30 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## tiffread.dpatch by Mehdi Dogguy -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Fix integer overflows in tiffread.c (CVE-2009-3296) - -@DPATCH@ -diff -urNad camlimages~/src/tiffread.c camlimages/src/tiffread.c ---- camlimages~/src/tiffread.c 2009-10-31 21:47:57.000000000 +0100 -+++ camlimages/src/tiffread.c 2009-11-01 13:51:58.000000000 +0100 -@@ -21,6 +21,8 @@ - #include - #include - -+#include "oversized.h" -+ - /* These are defined in caml/config.h */ - #define int16 int16tiff - #define uint16 uint16tiff -@@ -64,6 +66,10 @@ - TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres); - TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric); - -+ if (oversized (imagewidth, imagelength)) { -+ failwith_oversized("tiff"); -+ } -+ - if( imagesample == 3 && photometric == PHOTOMETRIC_RGB ){ - if( imagebits != 8 ){ - failwith("Sorry, tiff rgb file must be 24bit-color"); diff -Nru camlimages-3.0.1/debian/README.source camlimages-4.0.1/debian/README.source --- camlimages-3.0.1/debian/README.source 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/README.source 1970-01-01 02:00:00.000000000 +0200 @@ -1,5 +0,0 @@ -This package use dpatch for patching the source. - -Please consider reading dpatch manpage to patch the source. - - -- Sylvain Le Gall Sun, 22 Jun 2008 23:26:52 +0200 diff -Nru camlimages-3.0.1/debian/rules camlimages-4.0.1/debian/rules --- camlimages-3.0.1/debian/rules 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/rules 2011-07-03 15:56:13.000000000 +0200 @@ -1,51 +1,45 @@ #!/usr/bin/make -f -# debian/rules for camlimages package -# Copyright (C) 2006-2008 Sylvain Le Gall -# -# This program 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, 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -# MA 02110-1301, USA. - -include /usr/share/cdbs/1/rules/dpatch.mk -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/autotools.mk -include /usr/share/cdbs/1/rules/ocaml.mk - -PACKAGE := libcamlimages-ocaml -DESTDIR := $(CURDIR)/debian/$(PACKAGE) - -PACKAGE_DEV := libcamlimages-ocaml-dev -DESTDIR_DEV := $(CURDIR)/debian/$(PACKAGE_DEV) - -PACKAGE_DOC := libcamlimages-ocaml-doc -DESTDIR_DOC := $(CURDIR)/debian/$(PACKAGE_DOC) - -LABLGTK2_DIR := $(shell ocamlfind query lablgtk2) - -DEB_CONFIGURE_EXTRA_FLAGS := --with-lablgtk2 --without-lablgtk - -DEB_MAKE_CLEAN_TARGET := distclean - -DEB_INSTALL_EXAMPLES_libcamlimages-ocaml-doc := -X Makefile -X .depend -DEB_DH_INSTALL_ARGS := -X LICENSE -X README -X INSTALL -X Makefile - -OCAML_OCAMLDOC_FLAGS := $(shell ocamlfind query -i-format lablgtk2) - -install/libcamlimages-ocaml-doc:: - $(MAKE) -C '$(CURDIR)/examples' clean - -install/libcamlimages-ocaml-dev:: - mv '$(CURDIR)/debian/tmp/usr/lib/ocaml/stublibs/dllcamlimages.so' \ - '$(DESTDIR)/$(OCAML_DLL_DIR)/' - chrpath -d $(DESTDIR)/$(OCAML_DLL_DIR)/*.so +# -*- makefile -*- + +include /usr/share/ocaml/ocamlvars.mk + +OMAKE=omake --verbose +DESTDIR=$(CURDIR)/debian/tmp +OCAMLFIND_DESTDIR=$(DESTDIR)$(OCAML_STDLIB_DIR) +export OCAMLFIND_DESTDIR + +%: + dh $@ --with ocaml + +.PHONY: override_dh_auto_configure +override_dh_auto_configure: +ifeq ($(OCAML_HAVE_OCAMLOPT),no) + sed -i 's/NATIVE_ENABLED=./NATIVE_ENABLED=0/' OMakefile +endif + +.PHONY: override_dh_auto_build +override_dh_auto_build: + $(OMAKE) + +.PHONY: override_dh_auto_install +override_dh_auto_install: + mkdir -p $(OCAMLFIND_DESTDIR) $(DESTDIR)$(OCAML_DLL_DIR) + $(OMAKE) install + +.PHONY: override_dh_auto_clean +override_dh_auto_clean: + $(OMAKE) clean + find -name '*.omc' -delete + sed -i 's/NATIVE_ENABLED=./NATIVE_ENABLED=1/' OMakefile + +.PHONY: override_dh_install +override_dh_install: + dh_install --fail-missing -X.so.owner + +.PHONY: override_dh_installexamples +override_dh_installexamples: + dh_installexamples -X'.cm*' -X.o -Xliv-furuse -X.cvsignore + +.PHONY: override_dh_compress +override_dh_compress: + dh_compress -Xexamples diff -Nru camlimages-3.0.1/debian/source/format camlimages-4.0.1/debian/source/format --- camlimages-3.0.1/debian/source/format 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/debian/source/format 2011-07-02 18:03:59.000000000 +0200 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru camlimages-3.0.1/debian/watch camlimages-4.0.1/debian/watch --- camlimages-3.0.1/debian/watch 2011-09-04 23:44:07.000000000 +0200 +++ camlimages-4.0.1/debian/watch 2011-07-02 18:03:59.000000000 +0200 @@ -1,3 +1,2 @@ version=3 -http://gallium.inria.fr/camlimages/ camlimages-(.*)\.tar\.gz - +http://cristal.inria.fr/camlimages/ .*/v(.*)\.tar\.gz Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/crop-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/crop-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/crop.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/crop.jpg differ diff -Nru camlimages-3.0.1/doc/.cvsignore camlimages-4.0.1/doc/.cvsignore --- camlimages-3.0.1/doc/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/doc/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,2 @@ +Makefile +Makefile.in Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/edge-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/edge-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/edge.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/edge.jpg differ diff -Nru camlimages-3.0.1/doc/eng.html.in camlimages-4.0.1/doc/eng.html.in --- camlimages-3.0.1/doc/eng.html.in 2007-10-11 11:01:37.000000000 +0200 +++ camlimages-4.0.1/doc/eng.html.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,237 +0,0 @@ - - - - - -CamlImages - - - - -

Contact the authors Jun.Furuse@inria.fr and -Pierre.Weis@inria.fr. - -
Created the 7th of February 2000. -
Last update on Fri Oct 11 2007. - -

CamlImages

-

Version @VERSION@

-
- -

Objective Caml image processing library

- -

-Note: this library is currently(=always) under development. - -

- -
- -

0. What is CamlImages ?

- -

CamlImages is an image processing library, which provides - -

    -
  • Basic functions for image processing and loading/saving various image -file formats (hence providing a translation facility from format to format), -
  • An interface with the Caml graphics library allows to display -images in the Graphics module screen and to mix them with Caml -drawings, -
  • A freetype interface, integrated into the library: -you can draw texts into images using any truetype fonts. -
- -

In addition, the library can handle huge images that -cannot be (or can hardly be) stored into the main memory (the library -then automatically creates swap files and escapes them to reduce the -memory usage). - -

Additional example programs are supplied in the -examples directory of the library: -

-
converter: -
a convertion program, that converts image from formats to formats. - -
crop: -
a ``cropping'' program, that cuts an image to its edges.
- - -
edgedetect: -
a program to detect edges into an image.
- - -
gifanim: -
an animation program for gif encoded series of images. - -
liv: -
an extension of the Unix ls command - to view a set of images. (Also considered as a light version of -xv with nice slide show capabilities.)
- - -
monochrome: -
converts a color image to monochrome. - -
normalize: -
normalizes the colormap of an image. This -program anlyzes the colormap information of the image to normalize its -brightness over the full range available. - -
resize: -
a program to resize an image. - -
tiffps: -
a program to output a postscript version of a tiff image (for -instance to print it). - -
ttfimg: -
true type font dump program. It can be used to create fancy -banners or buttons.
-Try for instance ttfimg ../../test/micap.ttf -message Bonjour -fg red -bg -black. Visualize with liv (of course). -ttfimg also creates some sample images of true type fonts. -Try ttfimg -o sample_micap.jpg ../../test/micap.ttf.
- -
- - -

1. Installation

- -

Get the source -tar ball, decompress it, -and read the file INSTALL. -
You can also access the read-only - -CVS repository which contains the latest developing (but not yet -released) version. - -

2. Using CamlImages

- -

2.1 Color models

-

CamlImages supports the following color models: - -

    -
  • Rgb24: 24bit depth full color image. -
  • Index8: 8bit depth indexed image with transparent -information. -
  • Index16: 16bit depth indexed image with transparent. -
  • Rgba32: 32bit depth full color image, with the alpha channel. -
  • Cmyk32: 32bit Cyan Magenta Yellow and blacK image. - (Unfortunatelly, beautiful conversion between RGB and CMYK is not supported.) -
- -For each color model, a corresponding module is provided. For example, -use the module Rgb24 if you want to access 24bit depth -full color images. - -

2.2 Load/Save image files and other fancy features

- -

CamlImages supports loading and saving of the following file formats: - -

    -
  • Bitmap, windows bitmap format (.bmp). -
  • Gif, graphics interchange format (.gif) (not recommended). -
  • Jpeg, joint photographic experts group (.jpeg or .jpg). -
  • Png, portable network graphics (.png). -
  • Tiff, tagged image file format (.tiff or .tif). (Color only.) -
  • X pixmaps (.xpm). (Loading only.) -
  • Encapsulated Postscript (using ghostscript) -
  • xv thumbnail files (see xvthumb directory). -
- -

For each image format, we provide a separate module. For instance, -use the Tiff module to load and save images stored in the tiff file -format. - -
If you do not want to specify the file format, you can use -Image.load: this function automatically analyses the -header of the image file at hand and loads the image into the memory, -if the library supports this format. - -

CamlImages also provides an interface to the internal image format of -O'Caml's Graphics library (this way you can draw your image files into -the Graphics window). - -

You can also draw strings on images using the Freetype library, which -is an external library to load and render TrueType fonts. - -

2.3 Class interface

- -

The modules with names beginning with the letter 'o' contains the object -class interface for CamlImages. - -

2.4 Image swap

- -

When you create/load a huge image, the computer memory may not be -sufficient to contain all the data. (For example, this may happen if -you are working with a scanned image of A4, 720dpi, 24bit fullcolor, -even if you have up to 128Mb of memory!) To work with such huge -images, CamlImages provides image swaps, which can escape part of the -images into files stored on the hard disk. A huge image is thus -partitioned into several blocks and if there is not enough free -memory, the blocks which have not been accessed recently are swapped -to temporary files. If a program requests to access to such a swapped -block, the library silently loads it back into memory. - -
By default, image swapping is disabled, because it slows down the -programs. To activate this function, you have to modify -Bitmap.maximum_live and -Bitmap.maximum_block_size: -

    -
  • Bitmap.maximum_live -is the maximum heap live data size of the program (in words) -
  • Bitmap.maximum_block_size is the maximum size of swap -blocks (in words). -
- -
For example, if you do not want to use more than 10M words (that -is 40Mb for a 32bit architecture or 80Mb for a 64bit architecture), -set Bitmap.maximum_live to 10000000. You may (and you should) enable -heap compaction, look at the GC interface file, gc.mli, in the -standard library for more details (you should change the compaction -configuration). - -
Bitmap.maximum_block_size affects the speed and frequency of -image block swapping. If it is larger, each swapping becomes -slower. If it is smaller, more swappings will occur. Too large and too -small maximum_block_size, both may make the program -slower. I suggest to have maximum_block_size set to -!Bitmap.maximum_live / 10. - -
If you activated image swapping, cache files for unused swapped -blocks will be removed automatically by Caml GC finalization, -but you may free them explicitly by hand also. The functions and methods -named "destroy" will free those blocks. - -
The swap files are usually created in the /tmp -directory. If you set the environment variable -"CAMLIMAGESTMPDIR", then its value replaces the default -"/tmp" directory. The temporary files are erased when the -program exits successfully. In other situations, for instance in case -of spurious exception, you may need to erase temporary files manually. - -

3. Miscellaneous

- -

3.1 Examples of use of the library ?

- -You can find some examples in the examples directory including -image auto-cropping, resizing and an image viewer with the lablgtk library. - -

3.2 How do I organize my Makefile to use the library ?

- -Put the following line at the top of your Makefile: -
-	include /usr/local/lib/ocaml/camlimages/Makefile.config
-
- -The library directory can be different, if the library is installed -somewhere else. The variables COMPFLAGS_CAMLIMAGES and -LINKFLAGS_CAMLIMAGES are defined in -Makefile.config; you should add them to the compiler and -linker options. A sample Makefile is available as -sample/Makefile.sample. - - - Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/fumicaml2-small.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/fumicaml2-small.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/lvdemo-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/lvdemo-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/lvdemo.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/lvdemo.jpg differ diff -Nru camlimages-3.0.1/doc/Makefile.am camlimages-4.0.1/doc/Makefile.am --- camlimages-3.0.1/doc/Makefile.am 2007-01-08 18:44:30.000000000 +0200 +++ camlimages-4.0.1/doc/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,36 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 2004 Institut National de Recherche en Informatique et # -# en Automatique. Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.2 2007/01/08 16:44:30 rousse Exp $ *) - -noinst_DATA = eng.html - -CLEANFILES = eng.html - -EXTRA_DIST = eng.html.in \ - crop-icon.jpg \ - crop.jpg \ - edge-icon.jpg \ - edge.jpg \ - fumicaml2-small.jpg \ - lvdemo-icon.jpg \ - lvdemo.jpg \ - test.jpg \ - test-small.jpg \ - ttfimg-icon.jpg \ - ttfimg.jpg - -eng.html: $(top_srcdir)/config.status eng.html.in - rm -f eng.html eng.html.tmp - sed \ - -e 's,@VERSION\@,$(VERSION),g' \ - $(srcdir)/eng.html.in > eng.html.tmp - mv eng.html.tmp eng.html diff -Nru camlimages-3.0.1/doc/Makefile.in camlimages-4.0.1/doc/Makefile.in --- camlimages-3.0.1/doc/Makefile.in 2007-10-11 10:50:42.000000000 +0200 +++ camlimages-4.0.1/doc/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,365 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 2004 Institut National de Recherche en Informatique et # -# en Automatique. Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.2 2007/01/08 16:44:30 rousse Exp $ *) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DATA = $(noinst_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -noinst_DATA = eng.html -CLEANFILES = eng.html -EXTRA_DIST = eng.html.in \ - crop-icon.jpg \ - crop.jpg \ - edge-icon.jpg \ - edge.jpg \ - fumicaml2-small.jpg \ - lvdemo-icon.jpg \ - lvdemo.jpg \ - test.jpg \ - test-small.jpg \ - ttfimg-icon.jpg \ - ttfimg.jpg - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - - -eng.html: $(top_srcdir)/config.status eng.html.in - rm -f eng.html eng.html.tmp - sed \ - -e 's,@VERSION\@,$(VERSION),g' \ - $(srcdir)/eng.html.in > eng.html.tmp - mv eng.html.tmp eng.html -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/crop-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/crop-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/crop.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/crop.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/edge-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/edge-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/edge.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/edge.jpg differ diff -Nru camlimages-3.0.1/doc/old/eng.htm camlimages-4.0.1/doc/old/eng.htm --- camlimages-3.0.1/doc/old/eng.htm 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/doc/old/eng.htm 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,239 @@ + + + + + +CamlImages + + + + +

Contact the authors jun.furuse@gmail.com and +Pierre.Weis@inria.fr. + +
Created the 7th of February 2000. +
Last update on Fri Oct 26 2009. + +

CamlImages

+ +

Version 3.0.2

+ +
+ +

Objective Caml image processing library

+ +

+Note: this library is currently(=always) under development. + +

+ +
+ +

0. What is CamlImages ?

+ +

CamlImages is an image processing library, which provides + +

    +
  • Basic functions for image processing and loading/saving various image +file formats (hence providing a translation facility from format to format), +
  • An interface with the Caml graphics library allows to display +images in the Graphics module screen and to mix them with Caml +drawings, +
  • A freetype interface, integrated into the library: +you can draw texts into images using any truetype fonts. +
+ +

In addition, the library can handle huge images that +cannot be (or can hardly be) stored into the main memory (the library +then automatically creates swap files and escapes them to reduce the +memory usage). + +

Additional example programs are supplied in the +examples directory of the library: +

+
converter: +
a convertion program, that converts image from formats to formats. + +
crop: +
a ``cropping'' program, that cuts an image to its edges.
+ + +
edgedetect: +
a program to detect edges into an image.
+ + +
gifanim: +
an animation program for gif encoded series of images. + +
liv: +
an extension of the Unix ls command + to view a set of images. (Also considered as a light version of +xv with nice slide show capabilities.)
+ + +
monochrome: +
converts a color image to monochrome. + +
normalize: +
normalizes the colormap of an image. This +program anlyzes the colormap information of the image to normalize its +brightness over the full range available. + +
resize: +
a program to resize an image. + +
tiffps: +
a program to output a postscript version of a tiff image (for +instance to print it). + +
ttfimg: +
true type font dump program. It can be used to create fancy +banners or buttons.
+Try for instance ttfimg ../../test/micap.ttf -message Bonjour -fg red -bg +black. Visualize with liv (of course). +ttfimg also creates some sample images of true type fonts. +Try ttfimg -o sample_micap.jpg ../../test/micap.ttf.
+ +
+ + +

1. Installation

+ +

Get the source tarball, +decompress it, +and read the file INSTALL. +
You can also access the read-only + +CVS repository which contains the latest developing (but not yet +released) version. + +

2. Using CamlImages

+ +

2.1 Color models

+

CamlImages supports the following color models: + +

    +
  • Rgb24: 24bit depth full color image. +
  • Index8: 8bit depth indexed image with transparent +information. +
  • Index16: 16bit depth indexed image with transparent. +
  • Rgba32: 32bit depth full color image, with the alpha channel. +
  • Cmyk32: 32bit Cyan Magenta Yellow and blacK image. + (Unfortunatelly, beautiful conversion between RGB and CMYK is not supported.) +
+ +For each color model, a corresponding module is provided. For example, +use the module Rgb24 if you want to access 24bit depth +full color images. + +

2.2 Load/Save image files and other fancy features

+ +

CamlImages supports loading and saving of the following file formats: + +

    +
  • Bitmap, windows bitmap format (.bmp). +
  • Gif, graphics interchange format (.gif) (not recommended). +
  • Jpeg, joint photographic experts group (.jpeg or .jpg). +
  • Png, portable network graphics (.png). +
  • Tiff, tagged image file format (.tiff or .tif). (Color only.) +
  • X pixmaps (.xpm). (Loading only.) +
  • Encapsulated Postscript (using ghostscript) +
  • xv thumbnail files (see xvthumb directory). +
+ +

For each image format, we provide a separate module. For instance, +use the Tiff module to load and save images stored in the tiff file +format. + +
If you do not want to specify the file format, you can use +Image.load: this function automatically analyses the +header of the image file at hand and loads the image into the memory, +if the library supports this format. + +

CamlImages also provides an interface to the internal image format of +O'Caml's Graphics library (this way you can draw your image files into +the Graphics window). + +

You can also draw strings on images using the Freetype library, which +is an external library to load and render TrueType fonts. + +

2.3 Class interface

+ +

The modules with names beginning with the letter 'o' contains the object +class interface for CamlImages. + +

2.4 Image swap

+ +

When you create/load a huge image, the computer memory may not be +sufficient to contain all the data. (For example, this may happen if +you are working with a scanned image of A4, 720dpi, 24bit fullcolor, +even if you have up to 128Mb of memory!) To work with such huge +images, CamlImages provides image swaps, which can escape part of the +images into files stored on the hard disk. A huge image is thus +partitioned into several blocks and if there is not enough free +memory, the blocks which have not been accessed recently are swapped +to temporary files. If a program requests to access to such a swapped +block, the library silently loads it back into memory. + +
By default, image swapping is disabled, because it slows down the +programs. To activate this function, you have to modify +Bitmap.maximum_live and +Bitmap.maximum_block_size: +

    +
  • Bitmap.maximum_live +is the maximum heap live data size of the program (in words) +
  • Bitmap.maximum_block_size is the maximum size of swap +blocks (in words). +
+ +
For example, if you do not want to use more than 10M words (that +is 40Mb for a 32bit architecture or 80Mb for a 64bit architecture), +set Bitmap.maximum_live to 10000000. You may (and you should) enable +heap compaction, look at the GC interface file, gc.mli, in the +standard library for more details (you should change the compaction +configuration). + +
Bitmap.maximum_block_size affects the speed and frequency of +image block swapping. If it is larger, each swapping becomes +slower. If it is smaller, more swappings will occur. Too large and too +small maximum_block_size, both may make the program +slower. I suggest to have maximum_block_size set to +!Bitmap.maximum_live / 10. + +
If you activated image swapping, cache files for unused swapped +blocks will be removed automatically by Caml GC finalization, +but you may free them explicitly by hand also. The functions and methods +named "destroy" will free those blocks. + +
The swap files are usually created in the /tmp +directory. If you set the environment variable +"CAMLIMAGESTMPDIR", then its value replaces the default +"/tmp" directory. The temporary files are erased when the +program exits successfully. In other situations, for instance in case +of spurious exception, you may need to erase temporary files manually. + +

3. Miscellaneous

+ +

3.1 Examples of use of the library ?

+ +You can find some examples in the examples directory including +image auto-cropping, resizing and an image viewer with the lablgtk library. + +

3.2 How do I organize my Makefile to use the library ?

+ +Put the following line at the top of your Makefile: +
+	include /usr/local/lib/ocaml/camlimages/Makefile.config
+
+ +The library directory can be different, if the library is installed +somewhere else. The variables COMPFLAGS_CAMLIMAGES and +LINKFLAGS_CAMLIMAGES are defined in +Makefile.config; you should add them to the compiler and +linker options. A sample Makefile is available as +sample/Makefile.sample. + + + diff -Nru camlimages-3.0.1/doc/old/eng.html.in camlimages-4.0.1/doc/old/eng.html.in --- camlimages-3.0.1/doc/old/eng.html.in 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/doc/old/eng.html.in 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,237 @@ + + + + + +CamlImages + + + + +

Contact the authors jun.furuse@gmail.com and +Pierre.Weis@inria.fr. + +
Created the 7th of February 2000. +
Last update on Oct 26 2009. + +

CamlImages

+

Version @VERSION@

+
+ +

Objective Caml image processing library

+ +

+Note: this library is currently(=always) under development. + +

+ +
+ +

0. What is CamlImages ?

+ +

CamlImages is an image processing library, which provides + +

    +
  • Basic functions for image processing and loading/saving various image +file formats (hence providing a translation facility from format to format), +
  • An interface with the Caml graphics library allows to display +images in the Graphics module screen and to mix them with Caml +drawings, +
  • A freetype interface, integrated into the library: +you can draw texts into images using any truetype fonts. +
+ +

In addition, the library can handle huge images that +cannot be (or can hardly be) stored into the main memory (the library +then automatically creates swap files and escapes them to reduce the +memory usage). + +

Additional example programs are supplied in the +examples directory of the library: +

+
converter: +
a convertion program, that converts image from formats to formats. + +
crop: +
a ``cropping'' program, that cuts an image to its edges.
+ + +
edgedetect: +
a program to detect edges into an image.
+ + +
gifanim: +
an animation program for gif encoded series of images. + +
liv: +
an extension of the Unix ls command + to view a set of images. (Also considered as a light version of +xv with nice slide show capabilities.)
+ + +
monochrome: +
converts a color image to monochrome. + +
normalize: +
normalizes the colormap of an image. This +program anlyzes the colormap information of the image to normalize its +brightness over the full range available. + +
resize: +
a program to resize an image. + +
tiffps: +
a program to output a postscript version of a tiff image (for +instance to print it). + +
ttfimg: +
true type font dump program. It can be used to create fancy +banners or buttons.
+Try for instance ttfimg ../../test/micap.ttf -message Bonjour -fg red -bg +black. Visualize with liv (of course). +ttfimg also creates some sample images of true type fonts. +Try ttfimg -o sample_micap.jpg ../../test/micap.ttf.
+ +
+ + +

1. Installation

+ +

Get the source +tar ball, decompress it, +and read the file INSTALL. +
You can also access the read-only + +CVS repository which contains the latest developing (but not yet +released) version. + +

2. Using CamlImages

+ +

2.1 Color models

+

CamlImages supports the following color models: + +

    +
  • Rgb24: 24bit depth full color image. +
  • Index8: 8bit depth indexed image with transparent +information. +
  • Index16: 16bit depth indexed image with transparent. +
  • Rgba32: 32bit depth full color image, with the alpha channel. +
  • Cmyk32: 32bit Cyan Magenta Yellow and blacK image. + (Unfortunatelly, beautiful conversion between RGB and CMYK is not supported.) +
+ +For each color model, a corresponding module is provided. For example, +use the module Rgb24 if you want to access 24bit depth +full color images. + +

2.2 Load/Save image files and other fancy features

+ +

CamlImages supports loading and saving of the following file formats: + +

    +
  • Bitmap, windows bitmap format (.bmp). +
  • Gif, graphics interchange format (.gif) (not recommended). +
  • Jpeg, joint photographic experts group (.jpeg or .jpg). +
  • Png, portable network graphics (.png). +
  • Tiff, tagged image file format (.tiff or .tif). (Color only.) +
  • X pixmaps (.xpm). (Loading only.) +
  • Encapsulated Postscript (using ghostscript) +
  • xv thumbnail files (see xvthumb directory). +
+ +

For each image format, we provide a separate module. For instance, +use the Tiff module to load and save images stored in the tiff file +format. + +
If you do not want to specify the file format, you can use +Image.load: this function automatically analyses the +header of the image file at hand and loads the image into the memory, +if the library supports this format. + +

CamlImages also provides an interface to the internal image format of +O'Caml's Graphics library (this way you can draw your image files into +the Graphics window). + +

You can also draw strings on images using the Freetype library, which +is an external library to load and render TrueType fonts. + +

2.3 Class interface

+ +

The modules with names beginning with the letter 'o' contains the object +class interface for CamlImages. + +

2.4 Image swap

+ +

When you create/load a huge image, the computer memory may not be +sufficient to contain all the data. (For example, this may happen if +you are working with a scanned image of A4, 720dpi, 24bit fullcolor, +even if you have up to 128Mb of memory!) To work with such huge +images, CamlImages provides image swaps, which can escape part of the +images into files stored on the hard disk. A huge image is thus +partitioned into several blocks and if there is not enough free +memory, the blocks which have not been accessed recently are swapped +to temporary files. If a program requests to access to such a swapped +block, the library silently loads it back into memory. + +
By default, image swapping is disabled, because it slows down the +programs. To activate this function, you have to modify +Bitmap.maximum_live and +Bitmap.maximum_block_size: +

    +
  • Bitmap.maximum_live +is the maximum heap live data size of the program (in words) +
  • Bitmap.maximum_block_size is the maximum size of swap +blocks (in words). +
+ +
For example, if you do not want to use more than 10M words (that +is 40Mb for a 32bit architecture or 80Mb for a 64bit architecture), +set Bitmap.maximum_live to 10000000. You may (and you should) enable +heap compaction, look at the GC interface file, gc.mli, in the +standard library for more details (you should change the compaction +configuration). + +
Bitmap.maximum_block_size affects the speed and frequency of +image block swapping. If it is larger, each swapping becomes +slower. If it is smaller, more swappings will occur. Too large and too +small maximum_block_size, both may make the program +slower. I suggest to have maximum_block_size set to +!Bitmap.maximum_live / 10. + +
If you activated image swapping, cache files for unused swapped +blocks will be removed automatically by Caml GC finalization, +but you may free them explicitly by hand also. The functions and methods +named "destroy" will free those blocks. + +
The swap files are usually created in the /tmp +directory. If you set the environment variable +"CAMLIMAGESTMPDIR", then its value replaces the default +"/tmp" directory. The temporary files are erased when the +program exits successfully. In other situations, for instance in case +of spurious exception, you may need to erase temporary files manually. + +

3. Miscellaneous

+ +

3.1 Examples of use of the library ?

+ +You can find some examples in the examples directory including +image auto-cropping, resizing and an image viewer with the lablgtk library. + +

3.2 How do I organize my Makefile to use the library ?

+ +Put the following line at the top of your Makefile: +
+	include /usr/local/lib/ocaml/camlimages/Makefile.config
+
+ +The library directory can be different, if the library is installed +somewhere else. The variables COMPFLAGS_CAMLIMAGES and +LINKFLAGS_CAMLIMAGES are defined in +Makefile.config; you should add them to the compiler and +linker options. A sample Makefile is available as +sample/Makefile.sample. + + + Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/fumicaml2-small.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/fumicaml2-small.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/lvdemo-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/lvdemo-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/lvdemo.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/lvdemo.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/test.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/test.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/test-small.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/test-small.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/ttfimg-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/ttfimg-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/old/ttfimg.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/old/ttfimg.jpg differ diff -Nru camlimages-3.0.1/doc/sphinx/0RELEASE.sh camlimages-4.0.1/doc/sphinx/0RELEASE.sh --- camlimages-3.0.1/doc/sphinx/0RELEASE.sh 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/doc/sphinx/0RELEASE.sh 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,2 @@ +make html +scp -r _build/html/* furuse@yquem.inria.fr:/net/yquem/infosystems/www/gallium/camlimages/ diff -Nru camlimages-3.0.1/doc/sphinx/conf.py camlimages-4.0.1/doc/sphinx/conf.py --- camlimages-3.0.1/doc/sphinx/conf.py 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/doc/sphinx/conf.py 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,194 @@ +# -*- coding: utf-8 -*- +# +# CamlImages documentation build configuration file, created by +# sphinx-quickstart on Tue Jan 25 22:34:37 2011. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.append(os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'CamlImages' +copyright = u'2011, Jun FURUSE and Pierre WEIS' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '4.0.0' +# The full version, including alpha/beta/rc tags. +release = '4.0.0' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directory, that shouldn't be searched +# for source files. +exclude_trees = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_use_modindex = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'CamlImagesdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'CamlImages.tex', u'CamlImages Documentation', + u'Jun FURUSE and Pierre WEIS', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_use_modindex = True diff -Nru camlimages-3.0.1/doc/sphinx/index.rst camlimages-4.0.1/doc/sphinx/index.rst --- camlimages-3.0.1/doc/sphinx/index.rst 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/doc/sphinx/index.rst 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,135 @@ +.. CamlImages documentation master file, created by + sphinx-quickstart on Tue Jan 25 22:34:37 2011. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +====================================== +CamlImages v4.0.1 +====================================== +*Objective Caml image processing library* + +.. toctree:: + :numbered: + +What is CamlImages ? +====================================== + +CamlImages is an image processing library, which provides + +* Basic functions for image processing and loading/saving various image file formats (hence providing a translation facility from format to format), +* Interfaces with the Caml graphics library and LablGtk2 allows to display images in GUI environments +* A freetype interface, integrated into the library: you can draw texts into images using any truetype fonts. + +In addition, the library can handle huge images that cannot be (or can hardly be) stored into the main memory (the library then automatically creates swap files and escapes them to reduce the memory usage). + +Additional example programs are supplied in the examples directory of the library: + +converter + Conversion program, that converts image from formats to formats. +crop + `Cropping' program, that cuts an image to its edges. +edgedetect + Program to detect edges into an image. +gifanim + Animation program for gif encoded series of images. +liv + Image viewer using LablGtk. +monochrome + Converts a color image to monochrome. +normalize + Normalizes the colormap of an image. This program analyzes the colormap information of the image to normalize its brightness over the full range available. +resize + Program to resize an image. +tiffps + Program to output a postscript version of a tiff image (for instance to print it). +ttfimg + True-type font dump program. It can be used to create fancy banners or buttons. + Try for instance ``ttfimg ../../test/micap.ttf -message Bonjour -fg red -bg black``. Visualize with liv (of course). ttfimg also creates some sample images of true type fonts. Try ``ttfimg -o sample_micap.jpg ../../test/micap.ttf``. + +Download and Installation +-------------------------- + +Get the source tar ball, decompress it, and read the file INSTALL. +You can also access the read-only repository which contains the latest developing (but not yet released) version. + +Source download + https://bitbucket.org/camlspotter/camlimages/get/v4.0.1.tar.gz + +Repository + hg clone https://bitbucket.org/camlspotter/camlimages + +Using CamlImages +------------------- + +Color models +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +CamlImages supports the following color models: + +* Rgb24: 24bit depth full color image. +* Index8: 8bit depth indexed image with transparent information. +* Index16: 16bit depth indexed image with transparent. +* Rgba32: 32bit depth full color image, with the alpha channel. +* Cmyk32: 32bit Cyan Magenta Yellow and black image. (Unfortunately, beautiful conversion between RGB and CMYK is not supported.) + +For each color model, a corresponding module is provided. For example, use the module Rgb24 if you want to access 24bit depth full color images. + +Load/Save image files and other fancy features +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +CamlImages supports loading and saving of the following file formats: + +* Bitmap, windows bitmap format (.bmp). +* Gif, graphics interchange format (.gif) (not recommended). +* Jpeg, joint photographic experts group (.jpeg or .jpg). +* Png, portable network graphics (.png). +* Tiff, tagged image file format (.tiff or .tif). (Color only.) +* X pixmaps (.xpm). (Loading only.) +* Encapsulated Postscript (using ghostscript) +* xv thumbnail files (see xvthumb directory). + +For each image format, we provide a separate module. For instance, use the Tiff module to load and save images stored in the tiff file format. +If you do not want to specify the file format, you can use Image.load: this function automatically analyzes the header of the image file at hand and loads the image into the memory, if the library supports this format. + +CamlImages also provides an interface to the internal image format of O'Caml's Graphics library (this way you can draw your image files into the Graphics window). + +You can also draw strings on images using the Freetype library, which is an external library to load and render TrueType fonts. + +Class interface +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The modules with names beginning with the letter 'o' contains the object class interface for CamlImages. + +Image swap +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When you create/load a huge image, the computer memory may not be sufficient to contain all the data. (For example, this may happen if you are working with a scanned image of A4, 720dpi, 24bit fullcolor, even if you have up to 128Mb of memory!) To work with such huge images, CamlImages provides image swaps, which can escape part of the images into files stored on the hard disk. A huge image is thus partitioned into several blocks and if there is not enough free memory, the blocks which have not been accessed recently are swapped to temporary files. If a program requests to access to such a swapped block, the library silently loads it back into memory. +By default, image swapping is disabled, because it slows down the programs. To activate this function, you have to modify Bitmap.maximum_live and Bitmap.maximum_block_size: + +* Bitmap.maximum_live is the maximum heap live data size of the program (in words) +* Bitmap.maximum_block_size is the maximum size of swap blocks (in words). + + +For example, if you do not want to use more than 10M words (that is 40Mb for a 32bit architecture or 80Mb for a 64bit architecture), set Bitmap.maximum_live to 10000000. You may (and you should) enable heap compaction, look at the GC interface file, gc.mli, in the standard library for more details (you should change the compaction configuration). +Bitmap.maximum_block_size affects the speed and frequency of image block swapping. If it is larger, each swapping becomes slower. If it is smaller, more swappings will occur. Too large and too small maximum_block_size, both may make the program slower. I suggest to have maximum_block_size set to !Bitmap.maximum_live / 10. +If you activated image swapping, cache files for unused swapped blocks will be removed automatically by Caml GC finalization, but you may free them explicitly by hand also. The functions and methods named "destroy" will free those blocks. +The swap files are usually created in the /tmp directory. If you set the environment variable "CAMLIMAGESTMPDIR", then its value replaces the default "/tmp" directory. The temporary files are erased when the program exits successfully. In other situations, for instance in case of spurious exception, you may need to erase temporary files manually. + +Miscellaneous +----------------- + +Examples of use of the library ? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can find some examples in the examples directory including image auto-cropping, resizing and an image viewer with the lablgtk library. + +How do I organize my Makefile to use the library ? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +From v4.0.0, CamlImages use the `OMake build system `_ and you need to write OMakefile instead of Makefile. You can see such an example of OMakefile at: + + examples/converter-external/OMakefile + +Issue tracker +---------------------- +http://modulogic.inria.fr/bugtracker/view_all_bug_page.php diff -Nru camlimages-3.0.1/doc/sphinx/make.bat camlimages-4.0.1/doc/sphinx/make.bat --- camlimages-3.0.1/doc/sphinx/make.bat 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/doc/sphinx/make.bat 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,113 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +set SPHINXBUILD=sphinx-build +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\CamlImages.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\CamlImages.ghc + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +:end Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/test.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/test.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/test-small.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/test-small.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/ttfimg-icon.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/ttfimg-icon.jpg differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/doc/ttfimg.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/doc/ttfimg.jpg differ diff -Nru camlimages-3.0.1/examples/converter/.cvsignore camlimages-4.0.1/examples/converter/.cvsignore --- camlimages-3.0.1/examples/converter/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/converter/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,4 @@ +converter +converter.byt +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/converter/Makefile.am camlimages-4.0.1/examples/converter/Makefile.am --- camlimages-3.0.1/examples/converter/Makefile.am 2007-05-21 20:54:32.000000000 +0200 +++ camlimages-4.0.1/examples/converter/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,43 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:00 rousse Exp $ *) - -OCAMLSOURCES = converter.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += converter.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += converter.byt -endif - -converter_opt_SOURCES = $(OCAMLSOURCES) -converter_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -converter.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o converter.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - - -converter.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o converter.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/converter/Makefile.in camlimages-4.0.1/examples/converter/Makefile.in --- camlimages-3.0.1/examples/converter/Makefile.in 2007-10-11 10:50:42.000000000 +0200 +++ camlimages-4.0.1/examples/converter/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:00 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(converter_byt_SOURCES) $(converter_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = converter.opt -@BUILD_BYTECODE_TRUE@am__append_2 = converter.byt -DIST_COMMON = $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/converter -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = converter.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = converter.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_converter_byt_OBJECTS = $(am__objects_1) -converter_byt_OBJECTS = $(am_converter_byt_OBJECTS) -converter_byt_LDADD = $(LDADD) -am_converter_opt_OBJECTS = $(am__objects_1) -converter_opt_OBJECTS = $(am_converter_opt_OBJECTS) -converter_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(converter_byt_SOURCES) $(converter_opt_SOURCES) -DIST_SOURCES = $(converter_byt_SOURCES) $(converter_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = converter.ml -converter_opt_SOURCES = $(OCAMLSOURCES) -converter_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/converter/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/converter/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -converter.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o converter.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -converter.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o converter.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/converter/OMakefile camlimages-4.0.1/examples/converter/OMakefile --- camlimages-3.0.1/examples/converter/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/converter/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(converter, converter, all) diff -Nru camlimages-3.0.1/examples/converter-external/converter.ml camlimages-4.0.1/examples/converter-external/converter.ml --- camlimages-3.0.1/examples/converter-external/converter.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/converter-external/converter.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,38 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: converter.ml,v 1.1.2.1 2010/05/13 13:14:47 furuse Exp $ *) + +open Images;; +open OImages;; +open Info;; + +let files = ref [] in +Arg.parse [] (fun s -> files := s :: !files) "converter src dst"; +let src, dst = + match List.rev !files with + | [src; dst] -> src, dst + | _ -> invalid_arg "you need two arguments" in + +let src = OImages.load src [] in + +let saver src = src#save dst None [] in +try saver src with +| Wrong_image_type -> + (* try to use another color model *) + let src' = + match OImages.tag src with + | Rgb24 img -> invalid_arg "Sorry! No color reduction is implemented" + | Index8 img -> img#to_rgb24#coerce + | Index16 img -> img#to_rgb24#coerce + | _ -> invalid_arg "not supported" in + saver src';; diff -Nru camlimages-3.0.1/examples/converter-external/OMakefile camlimages-4.0.1/examples/converter-external/OMakefile --- camlimages-3.0.1/examples/converter-external/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/converter-external/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,45 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.3 2010/05/16 01:45:54 furuse Exp $ *) + +.PHONY: all clean + +BYTE_ENABLED = true +NATIVE_ENABLED = true + +USE_OCAMLFIND = true + +if $(not $(OCAMLFIND_EXISTS)) + eprintln(This project requires ocamlfind, but is was not found.) + eprintln(You need to install ocamlfind and run "omake --configure".) + exit 1 + +FILES[]= + converter + +# If you are only interested in some parts of image formats, +# for example, gif and jpeg, say camlimages.gif camlimages.jpeg +# instead of camlimages.all_formats. + +OCAMLPACKS[]= + camlimages.all_formats + +# the library is created with -dllib: no -custom required +public.OCAML_BYTE_LINK_FLAGS = + +.DEFAULT: $(OCamlProgram converter, $(FILES)) + +clean: + rm -f $(filter-proper-targets $(ls R, .)) diff -Nru camlimages-3.0.1/examples/converter-external/OMakeroot camlimages-4.0.1/examples/converter-external/OMakeroot --- camlimages-3.0.1/examples/converter-external/OMakeroot 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/converter-external/OMakeroot 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,45 @@ +######################################################################## +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this file, to deal in the File without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the File, and to permit persons to whom the +# File is furnished to do so, subject to the following condition: +# +# THE FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE FILE OR +# THE USE OR OTHER DEALINGS IN THE FILE. + +######################################################################## +# The standard OMakeroot file. +# You will not normally need to modify this file. +# By default, your changes should be placed in the +# OMakefile in this directory. +# +# If you decide to modify this file, note that it uses exactly +# the same syntax as the OMakefile. +# + +# +# Include the standard installed configuration files. +# Any of these can be deleted if you are not using them, +# but you probably want to keep the Common file. +# +open build/C +open build/OCaml +open build/LaTeX + +# +# The command-line variables are defined *after* the +# standard configuration has been loaded. +# +DefineCommandVars() + +# +# Include the OMakefile in this directory. +# +.SUBDIRS: . diff -Nru camlimages-3.0.1/examples/crop/.cvsignore camlimages-4.0.1/examples/crop/.cvsignore --- camlimages-3.0.1/examples/crop/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/crop/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,4 @@ +crop.byt +crop +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/crop/Makefile.am camlimages-4.0.1/examples/crop/Makefile.am --- camlimages-3.0.1/examples/crop/Makefile.am 2007-05-21 20:54:32.000000000 +0200 +++ camlimages-4.0.1/examples/crop/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,44 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:02 rousse Exp $ *) - -OCAMLSOURCES = crop.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += crop.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += crop.byt -endif - -crop_opt_SOURCES = $(OCAMLSOURCES) -crop_byt_SOURCES = $(OCAMLSOURCES) - -OTHER_LIBS = unix.cma - -include ../../Makefile.variables - -crop.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o crop.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -crop.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o crop.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/crop/Makefile.in camlimages-4.0.1/examples/crop/Makefile.in --- camlimages-3.0.1/examples/crop/Makefile.in 2007-10-11 10:50:42.000000000 +0200 +++ camlimages-4.0.1/examples/crop/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,467 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:02 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(crop_byt_SOURCES) $(crop_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = crop.opt -@BUILD_BYTECODE_TRUE@am__append_2 = crop.byt -DIST_COMMON = README $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/crop -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = crop.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = crop.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_crop_byt_OBJECTS = $(am__objects_1) -crop_byt_OBJECTS = $(am_crop_byt_OBJECTS) -crop_byt_LDADD = $(LDADD) -am_crop_opt_OBJECTS = $(am__objects_1) -crop_opt_OBJECTS = $(am_crop_opt_OBJECTS) -crop_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(crop_byt_SOURCES) $(crop_opt_SOURCES) -DIST_SOURCES = $(crop_byt_SOURCES) $(crop_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = crop.ml -crop_opt_SOURCES = $(OCAMLSOURCES) -crop_byt_SOURCES = $(OCAMLSOURCES) -OTHER_LIBS = unix.cma -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/crop/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/crop/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -crop.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o crop.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -crop.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o crop.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/crop/OMakefile camlimages-4.0.1/examples/crop/OMakefile --- camlimages-3.0.1/examples/crop/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/crop/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,19 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +OCAMLPACKS[]= unix + +BuildExample(crop, crop, all) diff -Nru camlimages-3.0.1/examples/.cvsignore camlimages-4.0.1/examples/.cvsignore --- camlimages-3.0.1/examples/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/edgedetect/.cvsignore camlimages-4.0.1/examples/edgedetect/.cvsignore --- camlimages-3.0.1/examples/edgedetect/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/edgedetect/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,4 @@ +edge +edge.byt +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/edgedetect/Makefile.am camlimages-4.0.1/examples/edgedetect/Makefile.am --- camlimages-3.0.1/examples/edgedetect/Makefile.am 2007-05-21 20:54:32.000000000 +0200 +++ camlimages-4.0.1/examples/edgedetect/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,42 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:04 rousse Exp $ *) - -OCAMLSOURCES = edge.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += edge.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += edge.byt -endif - -edge_opt_SOURCES = $(OCAMLSOURCES) -edge_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -edge.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o edge.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -edge.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o edge.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/edgedetect/Makefile.in camlimages-4.0.1/examples/edgedetect/Makefile.in --- camlimages-3.0.1/examples/edgedetect/Makefile.in 2007-10-11 10:50:42.000000000 +0200 +++ camlimages-4.0.1/examples/edgedetect/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:04 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(edge_byt_SOURCES) $(edge_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = edge.opt -@BUILD_BYTECODE_TRUE@am__append_2 = edge.byt -DIST_COMMON = README $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/edgedetect -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = edge.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = edge.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_edge_byt_OBJECTS = $(am__objects_1) -edge_byt_OBJECTS = $(am_edge_byt_OBJECTS) -edge_byt_LDADD = $(LDADD) -am_edge_opt_OBJECTS = $(am__objects_1) -edge_opt_OBJECTS = $(am_edge_opt_OBJECTS) -edge_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(edge_byt_SOURCES) $(edge_opt_SOURCES) -DIST_SOURCES = $(edge_byt_SOURCES) $(edge_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = edge.ml -edge_opt_SOURCES = $(OCAMLSOURCES) -edge_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/edgedetect/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/edgedetect/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -edge.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o edge.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -edge.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o edge.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/edgedetect/OMakefile camlimages-4.0.1/examples/edgedetect/OMakefile --- camlimages-3.0.1/examples/edgedetect/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/edgedetect/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(edge, edge, all) diff -Nru camlimages-3.0.1/examples/gifanim/.cvsignore camlimages-4.0.1/examples/gifanim/.cvsignore --- camlimages-3.0.1/examples/gifanim/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/gifanim/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,5 @@ +.depend +gifanim +gifanim.byt +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/gifanim/.depend camlimages-4.0.1/examples/gifanim/.depend --- camlimages-3.0.1/examples/gifanim/.depend 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/gifanim/.depend 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,6 @@ +guienv.cmo: +guienv.cmx: +usleep.cmo: +usleep.cmx: +gifanim.cmo: guienv.cmo +gifanim.cmx: guienv.cmx diff -Nru camlimages-3.0.1/examples/gifanim/gifanim.ml camlimages-4.0.1/examples/gifanim/gifanim.ml --- camlimages-3.0.1/examples/gifanim/gifanim.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/gifanim/gifanim.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: gifanim.ml,v 1.12 2004/09/23 06:56:23 weis Exp $ *) +(* $Id: gifanim.ml,v 1.12.2.1 2010/05/13 13:36:09 furuse Exp $ *) open Images;; open Ximage;; @@ -58,7 +58,7 @@ begin match mask with | Some bmp -> Gdk.GC.set_clip_origin gc ~x: frame.frame_left ~y: frame.frame_top; - Gdk.GC.set_clip_mask gc (Obj.magic bmp : [`bitmap] Gdk.drawable) + Gdk.GC.set_clip_mask gc bmp | None -> Gdk.GC.set_clip_origin gc ~x: 0 ~y: 0; Gdk.GC.set_clip_rectangle gc rect diff -Nru camlimages-3.0.1/examples/gifanim/guienv.ml camlimages-4.0.1/examples/gifanim/guienv.ml --- camlimages-3.0.1/examples/gifanim/guienv.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/gifanim/guienv.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: guienv.ml,v 1.6 2004/09/23 06:56:23 weis Exp $ *) +(* $Id: guienv.ml,v 1.6.2.1 2010/05/13 13:36:09 furuse Exp $ *) open Gdk;; open GDraw;; @@ -19,7 +19,7 @@ GtkMain.Main.init ();; let window = GWindow.window ~title: "gifanim" - ~auto_shrink: true +(* ~auto_shrink: true *) ~allow_shrink: true ~allow_grow: true ();; diff -Nru camlimages-3.0.1/examples/gifanim/Makefile.am camlimages-4.0.1/examples/gifanim/Makefile.am --- camlimages-3.0.1/examples/gifanim/Makefile.am 2007-05-21 20:54:32.000000000 +0200 +++ camlimages-4.0.1/examples/gifanim/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,50 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:05 rousse Exp $ *) - -OCAMLSOURCES = guienv.ml usleep.ml gifanim.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += gifanim.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += gifanim.byt -endif - -gifanim_opt_SOURCES = $(OCAMLSOURCES) -gifanim_byt_SOURCES = $(OCAMLSOURCES) - -OTHER_LIBS = unix.cma - -include ../../Makefile.variables - -all: byt opt - -byt: gifanim.byt - -opt: gifanim.opt - -gifanim.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o gifanim.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -gifanim.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o gifanim.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/gifanim/Makefile.in camlimages-4.0.1/examples/gifanim/Makefile.in --- camlimages-3.0.1/examples/gifanim/Makefile.in 2007-10-11 10:50:43.000000000 +0200 +++ camlimages-4.0.1/examples/gifanim/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,473 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:05 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(gifanim_byt_SOURCES) $(gifanim_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = gifanim.opt -@BUILD_BYTECODE_TRUE@am__append_2 = gifanim.byt -DIST_COMMON = README $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/gifanim -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = gifanim.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = gifanim.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_gifanim_byt_OBJECTS = $(am__objects_1) -gifanim_byt_OBJECTS = $(am_gifanim_byt_OBJECTS) -gifanim_byt_LDADD = $(LDADD) -am_gifanim_opt_OBJECTS = $(am__objects_1) -gifanim_opt_OBJECTS = $(am_gifanim_opt_OBJECTS) -gifanim_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(gifanim_byt_SOURCES) $(gifanim_opt_SOURCES) -DIST_SOURCES = $(gifanim_byt_SOURCES) $(gifanim_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = guienv.ml usleep.ml gifanim.ml -gifanim_opt_SOURCES = $(OCAMLSOURCES) -gifanim_byt_SOURCES = $(OCAMLSOURCES) -OTHER_LIBS = unix.cma -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/gifanim/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/gifanim/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -all: byt opt - -byt: gifanim.byt - -opt: gifanim.opt - -gifanim.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o gifanim.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -gifanim.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o gifanim.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/gifanim/OMakefile camlimages-4.0.1/examples/gifanim/OMakefile --- camlimages-3.0.1/examples/gifanim/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/gifanim/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,19 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +OCAMLPACKS[] = lablgtk2 unix + +BuildExample(gifanim, gifanim guienv usleep, gif lablgtk2) diff -Nru camlimages-3.0.1/examples/imgstat/.cvsignore camlimages-4.0.1/examples/imgstat/.cvsignore --- camlimages-3.0.1/examples/imgstat/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/imgstat/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,4 @@ +imgstat +imgstat.byt +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/imgstat/Makefile.am camlimages-4.0.1/examples/imgstat/Makefile.am --- camlimages-3.0.1/examples/imgstat/Makefile.am 2007-05-21 20:54:32.000000000 +0200 +++ camlimages-4.0.1/examples/imgstat/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,42 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.7 2007/02/20 21:19:06 rousse Exp $ *) - -OCAMLSOURCES = imgstat.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += imgstat.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += imgstat.byt -endif - -imgstat_opt_SOURCES = $(OCAMLSOURCES) -imgstat_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -imgstat.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o imgstat.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -imgstat.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o imgstat.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/imgstat/Makefile.in camlimages-4.0.1/examples/imgstat/Makefile.in --- camlimages-3.0.1/examples/imgstat/Makefile.in 2007-10-11 10:50:43.000000000 +0200 +++ camlimages-4.0.1/examples/imgstat/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.7 2007/02/20 21:19:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(imgstat_byt_SOURCES) $(imgstat_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = imgstat.opt -@BUILD_BYTECODE_TRUE@am__append_2 = imgstat.byt -DIST_COMMON = README $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/imgstat -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = imgstat.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = imgstat.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_imgstat_byt_OBJECTS = $(am__objects_1) -imgstat_byt_OBJECTS = $(am_imgstat_byt_OBJECTS) -imgstat_byt_LDADD = $(LDADD) -am_imgstat_opt_OBJECTS = $(am__objects_1) -imgstat_opt_OBJECTS = $(am_imgstat_opt_OBJECTS) -imgstat_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(imgstat_byt_SOURCES) $(imgstat_opt_SOURCES) -DIST_SOURCES = $(imgstat_byt_SOURCES) $(imgstat_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = imgstat.ml -imgstat_opt_SOURCES = $(OCAMLSOURCES) -imgstat_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/imgstat/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/imgstat/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -imgstat.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o imgstat.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -imgstat.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o imgstat.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/imgstat/OMakefile camlimages-4.0.1/examples/imgstat/OMakefile --- camlimages-3.0.1/examples/imgstat/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/imgstat/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(imgstat, imgstat, all) diff -Nru camlimages-3.0.1/examples/liv/cache.ml camlimages-4.0.1/examples/liv/cache.ml --- camlimages-3.0.1/examples/liv/cache.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/cache.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,11 +10,12 @@ (* *) (***********************************************************************) -(* $Id: cache.ml,v 1.4 2004/09/24 10:55:05 weis Exp $ *) +(* $Id: cache.ml,v 1.5 2008/06/16 22:35:42 furuse Exp $ *) type ('a, 'b) elt = { key : 'a; data : 'b; + at_remove : 'b -> unit; time : float; };; @@ -66,10 +67,13 @@ | Some (i, _) -> i | None -> raise Not_found;; -let add t key data = +let add t key data at_remove = let slot = - try find_pos t key with - | Not_found -> - try find_empty_or_eldest t with - | Not_found -> 0 in - t.(slot) <- Some {key = key; data = data; time = Unix.time ()};; + try find_pos t key with Not_found -> + try find_empty_or_eldest t with Not_found -> 0 + in + begin match t.(slot) with + | Some elt -> elt.at_remove elt.data + | None -> () + end; + t.(slot) <- Some {key = key; data = data; at_remove= at_remove; time = Unix.time ()};; diff -Nru camlimages-3.0.1/examples/liv/cache.mli camlimages-4.0.1/examples/liv/cache.mli --- camlimages-3.0.1/examples/liv/cache.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv/cache.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,23 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: cache.mli,v 1.4 2008/06/16 22:35:42 furuse Exp $ *) + +type ('a, 'b) elt = { key : 'a; data : 'b; at_remove: 'b -> unit; time : float; };; +type ('a, 'b) t = ('a, 'b) elt option array;; + +val create : int -> ('a, 'b) t;; +val find_pos : ('a, 'b) t -> 'a -> int;; +val find : ('a, 'b) t -> 'a -> 'b;; +val rename : ('a, 'b) t -> 'a -> 'a -> unit;; +val find_empty_or_eldest : ('a, 'b) t -> int;; +val add : ('a, 'b) t -> 'a -> 'b -> ('b -> unit) -> unit;; diff -Nru camlimages-3.0.1/examples/liv/.cvsignore camlimages-4.0.1/examples/liv/.cvsignore --- camlimages-3.0.1/examples/liv/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,6 @@ +liv +liv.byt +.xvpics + +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/liv/display.ml camlimages-4.0.1/examples/liv/display.ml --- camlimages-3.0.1/examples/liv/display.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/display.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: display.ml,v 1.33 2006/03/14 05:28:58 furuse Exp $ *) +(* $Id: display.ml,v 1.36.2.1 2010/05/13 13:36:09 furuse Exp $ *) open Livmisc;; open Color;; @@ -21,18 +21,7 @@ open GDraw;; open GMain;; -open Ximage2;; -open OXimage2;; - -type filter = - [ `TRANSPARENT_BORDER - | `SIZE of int * int * [ `ATMOST | `ATLEAST | `NOASPECT ] - | `NORMALIZE | `ENHANCE - ];; - -let working = ref None;; -let waiting = ref None;; -let check_waiting () = if !waiting <> None then raise Exit;; +type filter = [ `SIZE of int * int * [ `ATMOST | `ATLEAST | `NOASPECT ] ];; let current_filters = (ref [] : filter list ref);; @@ -41,376 +30,143 @@ (fun x st -> match x with | `SIZE _ -> st - | _ -> x :: st) + (* | _ -> x :: st *)) !current_filters [`SIZE (w,h,`NOASPECT)];; let forward_redisplay = ref (fun _ -> ());; -class type display = object - method display : OXimage2.ximage -> unit -end;; +module WINDOW = struct -class win = object - val mutable prev = (-1,-1) + let prev = ref (-1,-1) - method display (ximage : OXimage2.ximage) = - let pixmap = - let win = window#misc#window in - let visual = Gdk.Window.get_visual win in - let pix = - Gdk.Pixmap.create ~window: win - ~depth: (Gdk.Visual.depth visual) - ~width: ximage#width - ~height: ximage#height () in - let pixmap = new drawable pix in - pixmap#put_image - ~x:0 ~y:0 - ~width: ximage#width ~height: ximage#height - ~xsrc:0 ~ysrc:0 - ximage#data; - pix in - prev <- (ximage#width, ximage#height); + let pixmap = ref None + let set_pixmap pix = + begin match !pixmap with + | None -> () + | Some pix -> Gdk.Pixmap.destroy pix + end; + pixmap := Some pix + + let display pixbuf = + let width = GdkPixbuf.get_width pixbuf in + let height = GdkPixbuf.get_height pixbuf in + let pixmap = Gdk.Pixmap.create ~window:window#misc#window ~width ~height () in + GdkPixbuf.render_to_drawable pixmap pixbuf; + prev := (width, height); + prog#set_format_string "done"; + sync (); + prog#unmap (); (* Resizing window *) (* Changes from gtk1.2 to 2.0: It is no longer permissable to draw directly on an arbitrary widget, or to set an arbitrary widget's background pixmap. If you need to do that, use a GtkDrawingArea or (for a toplevel) a GtkWindow where gtk_widget_set_app_paintable() has been called. *) + (* Format.eprintf "resizing %d %d@." ximage#width ximage#height; *) + drawing#resize ~width ~height; Gdk.Window.set_back_pixmap drawing#misc#window (`PIXMAP pixmap); + set_pixmap pixmap; Gdk.Window.clear drawing#misc#window; - - (* We should resize the toplevel *) - window#resize ~width: ximage#width ~height: ximage#height; - drawing#set_size ~width: ximage#width ~height: ximage#height; + set_pixmap pixmap; sync (); - set_timeout () - initializer - ignore (window#event#connect#configure ~callback: - (fun ev -> - let w = GdkEvent.Configure.width ev - and h = GdkEvent.Configure.height ev in - let rec f w h = - if (w, h) <> prev then - (* prerr_endline (Printf.sprintf "%dx%d" w h); *) - !forward_redisplay (add_size w h); - let w', h' = Drawable.get_size window#misc#window in - if (w', h') <> (w, h) then f w' h' in - f w h; - false)) -end;; + let init () = + ignore (drawing#event#connect#configure ~callback: + (fun ev -> + let w = GdkEvent.Configure.width ev + and h = GdkEvent.Configure.height ev in + let rec f w h = + if (w, h) <> !prev then begin + !forward_redisplay (add_size w h); + end; + let w', h' = Drawable.get_size drawing#misc#window in + if (w', h') <> (w, h) then f w' h' + in + f w h; + false)) +end + +module ROOT = struct + + type root_geom = { + width : int; + height : int; + xdest : int; + xsrc : int; + ydest : int; + ysrc : int; + put_width : int; + put_height : int; + };; + + let root_geom width height x y = + let width0 = width in + let height0 = height in + let xdest0 = if x < 0 then 0 else x in + let xsrc0 = if x < 0 then -x else 0 in + let put_width0 = + if x + width0 > screen_width then screen_width - xdest0 + else x + width0 - xdest0 in + let ydest0 = if y < 0 then 0 else y in + let ysrc0 = if y < 0 then -y else 0 in + let put_height0 = + if y + height0 > screen_height then screen_height - ydest0 + else y + height0 - ydest0 in + { width= width0; + height= height0; + xdest= xdest0; + ydest= ydest0; + xsrc= xsrc0; + ysrc= ysrc0; + put_width= put_width0; + put_height= put_height0; + } -let root_pixmap = - lazy ( + let root_pixmap = lazy ( let pix = GDraw.pixmap ~window ~width: screen_width - ~height: screen_height () in + ~height: screen_height () + in pix#set_foreground `BLACK; pix#rectangle ~x:0 ~y:0 ~width: screen_width ~height: screen_height ~filled: true (); - pix#pixmap);; + pix#pixmap ) -let root_drawing = lazy (new drawable !!root_pixmap);; - -type root_geom = { - width : int; - height : int; - xdest : int; - xsrc : int; - ydest : int; - ysrc : int; - put_width : int; - put_height : int; -};; - -let root_geom ximage x y = - let width0 = ximage#width in - let height0 = ximage#height in - let xdest0 = if x < 0 then 0 else x in - let xsrc0 = if x < 0 then -x else 0 in - let put_width0 = - if x + width0 > screen_width then screen_width - xdest0 - else x + width0 - xdest0 in - let ydest0 = if y < 0 then 0 else y in - let ysrc0 = if y < 0 then -y else 0 in - let put_height0 = - if y + height0 > screen_height then screen_height - ydest0 - else y + height0 - ydest0 in - { width= width0; - height= height0; - xdest= xdest0; - ydest= ydest0; - xsrc= xsrc0; - ysrc= ysrc0; - put_width= put_width0; - put_height= put_height0; - };; - -class root = object - method display_at (ximage : OXimage2.ximage) x y = - let geom = root_geom ximage x y in - !!root_drawing#put_image ximage#data - ~xsrc: geom.xsrc ~ysrc: geom.ysrc - ~x: geom.xdest ~y: geom.ydest - ~width: geom.put_width ~height: geom.put_height; + let display_at pixbuf x y = + let geom = root_geom (GdkPixbuf.get_width pixbuf) (GdkPixbuf.get_height pixbuf) x y in + GdkPixbuf.render_to_drawable !!root_pixmap ~dest_x: geom.xdest ~dest_y: geom.ydest pixbuf; Window.set_back_pixmap root_win (`PIXMAP(!!root_pixmap)); Window.clear root_win; set_timeout () - end;; - -(* src will be modified *) -let transparent_border src geom dst = - let width = src#width - and height = src#height in - let src = src#data in - let dst = dst#data in - - let color_at image x y = quick_color_parser (Image.get_pixel image ~x ~y) in - - let border = min width height / 10 + 1 in - - let doit b x y ox oy = - let cd = color_at src x y in - let co = color_at dst ox oy in - let red,green,blue = color_merge co cd (border + 1) b in - let pixel = quick_color_create ~red ~green ~blue in - Image.put_pixel src ~x: x ~y: y ~pixel in - - for b = 0 to border do - check_waiting (); - let y = b in - let oy = y - geom.ysrc in - if not (oy < 0 || oy >= geom.put_height) then - for x = b to width - b - 1 do - let ox = x - geom.xsrc in - if ox < 0 || ox >= geom.put_width then () - else doit b x y ox oy - done; - let y = height - b - 1 in - let oy = y - geom.ysrc in - if not (oy < 0 || oy >= geom.put_height) then - for x = b to width - b - 1 do - let ox = x - geom.xsrc in - if ox < 0 ||ox >= geom.put_width then () - else doit b x y ox oy - done; - let x = b in - let ox = x - geom.xsrc in - if not (ox < 0 || ox >= geom.put_height) then - for y = b + 1 to height - b - 2 do - let oy = y - geom.ysrc in - if oy < 0 || oy >= geom.put_height then () - else doit b x y ox oy - done; - let x = width - b - 1 in - let ox = x - geom.xsrc in - if not (ox < 0 || ox >= geom.put_width) then - for y = b + 1 to height - b - 2 do - let oy = y - geom.ysrc in - if oy < 0 ||oy >= geom.put_height then () - else doit b x y ox oy - done; - done;; - -class root_filter = - object - inherit root as super - - method display_at ximage x y = - let geom = root_geom ximage x y in - let dst = - lazy ( - OXimage2.get_image - !!root_pixmap ~x: geom.xdest ~y: geom.ydest - ~width: geom.put_width ~height: geom.put_height) in - List.iter - (function - | `TRANSPARENT_BORDER -> - transparent_border ximage geom !!dst - | _ -> ()) - !current_filters; - super#display_at ximage x y - end;; - -class root_myst = object - inherit root_filter as super - - val mutable id = None - val mutable finish = fun () -> () - method display_at ximage x y = - - let geom = root_geom ximage x y in - let tilesize = 256 in - let tilepixels = tilesize * tilesize in - let array = - Array.init tilepixels - (fun x -> x mod tilesize, x / tilesize) in - for i = 0 to tilepixels - 1 do - let pos = Random.int (tilepixels - 1) in - let tmp = array.(i) in - array.(i) <- array.(pos); - array.(pos) <- tmp - done; - - finish <- (fun () -> super#display_at ximage x y); - - id <- Some (Timeout.add ~ms:100 ~callback: (fun () -> - try - let cntr = ref 0 in - for i = 0 to tilepixels / 10 do - check_waiting (); - let x, y = array.(!cntr) in - for xx = 0 to geom.put_width / tilesize do - for yy = 0 to geom.put_height / tilesize do - let x = xx * tilesize + x - and y = yy * tilesize + y in - if x < geom.put_width && y < geom.put_height then - !!root_drawing#put_image ximage#data - ~xsrc: (geom.xsrc+x) ~ysrc: (geom.ysrc+y) - ~x: (geom.xdest+x) ~y: (geom.ydest+y) - ~width: 1 ~height: 1 - done - done; - incr cntr; - if !cntr = tilepixels then raise Exit - done; - Window.set_back_pixmap root_win (`PIXMAP (!!root_pixmap)); - Window.clear root_win; - true - with - | Exit -> - Window.set_back_pixmap root_win (`PIXMAP (!!root_pixmap)); - Window.clear root_win; - id <- None; - set_timeout (); - false)) - - method force_finish = - match id with - | Some i -> - Timeout.remove i; - id <- None; - finish (); - finish <- fun () -> () - | None -> () -end;; - -class root_transparent = object - inherit root_myst as super - - method display_at ximage x y = - let geom = root_geom ximage x y in - let array = - Array.init (geom.put_width * geom.put_height) - (fun x -> x mod geom.put_width, x / geom.put_width) in - for i = 0 to geom.put_width * geom.put_height - 1 do - let pos = Random.int (geom.put_width * geom.put_height - 1) in - let tmp = array.(i) in - array.(i) <- array.(pos); - array.(pos) <- tmp - done; - - let cntr = ref 0 in - finish <- (fun () -> super#display_at ximage x y); - - id <- Some (Timeout.add ~ms:100 ~callback: (fun () -> - try - for i = 0 to geom.put_width * geom.put_height / 10 do - check_waiting (); - let x, y = array.(!cntr) in - !!root_drawing#put_image ximage#data - ~xsrc: (geom.xsrc+x) ~ysrc: (geom.ysrc+y) - ~x: (geom.xdest+x) ~y: (geom.ydest+y) - ~width: 1 ~height: 1; - incr cntr; - if !cntr = geom.put_width * geom.put_height then raise Exit - done; - Window.set_back_pixmap root_win (`PIXMAP (!!root_pixmap)); - Window.clear root_win; - true - with - | Exit -> - Window.set_back_pixmap root_win (`PIXMAP (!!root_pixmap)); - Window.clear root_win; - id <- None; - set_timeout (); - false)) end;; -(* -class display_root_transparent ximage x y = - object (self) - inherit display_root_myst ximage x y as super - - method display = - let orgimg = self#orgimg in - let tmpimg = self#tmpimg in - self#init; - - let max = 4 in - cntr <- 1; - id <- Some (Timeout.add ~ms:100 ~callback: (fun () -> - for y = 0 to geom.put_height - 1 do - for x = 0 to geom.put_width - 1 do - let cd = - quick_color_parser - (Image.get_pixel - ximage#data ~x:(geom.xsrc+x) ~y:(geom.ysrc+y)) in - let co = - quick_color_parser (Image.get_pixel orgimg ~x ~y) in - let red, green, blue = color_merge co cd max cntr in - let pixel = - quick_color_create ~red ~green ~blue in - Image.put_pixel tmpimg ~x ~y ~pixel; - done - done; - if cntr = max then begin - drawing_root_pixmap#put_image tmpimg - ~xsrc:0 ~ysrc:0 ~xdest: geom.xdest ~ydest: geom.ydest - ~width: geom.put_width ~height: geom.put_height; - Window.set_back_pixmap root_win ~pixmap: (`PIXMAP(pix)); - Window.clear root_win; - finished <- true; - self#free_tmps; - set_timeout (); - false - end else begin - drawing_root#put_image tmpimg - ~xsrc:0 ~ysrc:0 ~xdest: geom.xdest ~ydest: geom.ydest - ~width: geom.put_width ~height: geom.put_height; - cntr <- cntr + 1; - true - end)) -end;; -*) +let working = ref (None : (int * OImages.rgb24 * filter list) option);; +let waiting = ref None;; +let check_waiting () = if !waiting <> None then raise Exit;; type root_mode = [ `NONE | `CENTER | `RANDOM ];; type transition = [ `NONE | `MYST | `TRANSPARENT ];; - let root_mode = ref (`NONE : root_mode);; let transition = ref (`NONE : transition);; -let win = new win;; -let root = new root_filter;; -let root_myst = new root_myst;; -let root_transparent = new root_transparent;; - let root_prev_pos = ref None;; -let display_ximage ximage = +let display_pixbuf pixbuf = match !root_mode with | `CENTER | `RANDOM -> + let width = GdkPixbuf.get_width pixbuf + and height = GdkPixbuf.get_height pixbuf in let x, y = - let w = screen_width - ximage#width - and h = screen_height - ximage#height in + let w = screen_width - width + and h = screen_height - height in match !root_mode with | `RANDOM -> - let w = screen_width - ximage#width - and h = screen_height - ximage#height in + let w = screen_width - width + and h = screen_height - height in let overwrap x y = match !root_prev_pos with @@ -434,18 +190,32 @@ root_prev_pos := Some (w, h, x, y); x, y | _ -> w/2, h/2 in - begin - match !transition with - | `MYST -> root_myst#display_at ximage x y - | `TRANSPARENT -> root_transparent#display_at ximage x y - | _ -> root#display_at ximage x y - end - | _ -> win#display ximage;; + ROOT.display_at pixbuf x y + | _ -> WINDOW.display pixbuf;; + +let sort_filters (filters : filter list) = + let rec get_size = function + | [] -> [] + | `SIZE x :: _ -> [`SIZE x] + | _ :: xs -> get_size xs in +(* + let rec get_normalize = function + | [] -> [] + | `NORMALIZE :: _ -> [`NORMALIZE] + | _ :: xs -> get_normalize xs in + let rec get_enhance = function + | [] -> [] + | `ENHANCE :: _ -> [`ENHANCE] + | _ :: xs -> get_enhance xs in +*) + List.flatten [(*get_enhance filters; get_normalize filters; *)get_size filters];; let resize w h cond old = + let old_width = GdkPixbuf.get_width old in + let old_height = GdkPixbuf.get_height old in let xmag,ymag = - let xmag = float w /. float old#width - and ymag = float h /. float old#height in + let xmag = float w /. float old_width + and ymag = float h /. float old_height in let xmag,ymag = match cond with @@ -457,12 +227,12 @@ if mag < 1.0 then 1.0, 1.0 else mag, mag | `NOASPECT -> xmag, ymag in - let nw = truncate (float old#width *. xmag) - and nh = truncate (float old#height *. ymag) in + let nw = truncate (float old_width *. xmag) + and nh = truncate (float old_height *. ymag) in if nw > fst root_size || nh > snd root_size then - let xmag = float (fst root_size) /. float old#width - and ymag = float (snd root_size) /. float old#height in + let xmag = float (fst root_size) /. float old_width + and ymag = float (snd root_size) /. float old_height in match cond with | `NOASPECT -> xmag, ymag | _ -> if xmag > ymag then ymag, ymag else xmag, xmag @@ -470,9 +240,9 @@ if xmag = 1.0 && ymag = 1.0 then old else - let nw = truncate (float old#width *. xmag) - and nh = truncate (float old#height *. ymag) in - prog#misc#map (); + let nw = truncate (float old_width *. xmag) + and nh = truncate (float old_height *. ymag) in + prog#map (); let fmts = if xmag > 1.0 && ymag > 1.0 then @@ -483,118 +253,28 @@ Printf.sprintf "resizing to %dx%d" nw nh in prog#set_format_string fmts; - old#resize - (Some (fun f -> prog#set_fraction f; check_waiting ())) - nw nh;; - -let get_hist img = - prog#misc#map (); - prog#set_format_string "histgram"; - - let hist = Colorhist.create () in - - let width = img#width in - let height = img#height in - let f_height = float height in - - for y = 0 to height - 1 do - check_waiting (); - for x = 0 to width - 1 do - Colorhist.store_sample hist (img#unsafe_get x y) - done; - prog#set_fraction (float (y + 1) /. f_height) - done; - hist;; - -let normalize img = - let hist = get_hist img in - let normalizer = Colorhist.normalize 0.95 hist in - - prog#misc#map (); - prog#set_format_string "normalizing..."; - - let width = img#width - and height = img#height in - let f_height = float height in - let img' = new OImages.rgb24 width height in - - for y = 0 to height - 1 do - check_waiting (); - for x = 0 to width - 1 do - let rgb = img#unsafe_get x y in - let new_rgb = normalizer rgb in - img'#unsafe_set x y new_rgb; - done; - prog#set_fraction (float (y+1) /. f_height) - done; - img';; - -let enhance img = - let hist = get_hist img in - let log, enhancer = Enhance.enhance 0.90 hist in - - prog#misc#map (); - prog#set_format_string "enhancing..."; - - let width = img#width - and height = img#height in - let f_height = float height in - let img' = new OImages.rgb24 width height in - - for y = 0 to height - 1 do - check_waiting (); - for x = 0 to width - 1 do - let rgb = img#unsafe_get x y in - let new_rgb = enhancer rgb in - img'#unsafe_set x y new_rgb; - done; - prog#set_fraction (float (y+1) /. f_height) - done; - img';; -let sort_filters (filters : filter list) = - let rec get_size = function - | [] -> [] - | `SIZE x :: _ -> [`SIZE x] - | _ :: xs -> get_size xs in - let rec get_normalize = function - | [] -> [] - | `NORMALIZE :: _ -> [`NORMALIZE] - | _ :: xs -> get_normalize xs in - let rec get_enhance = function - | [] -> [] - | `ENHANCE :: _ -> [`ENHANCE] - | _ :: xs -> get_enhance xs in - List.flatten [get_enhance filters; get_normalize filters; get_size filters];; - -let cache = Cache.create 5;; -let xcache = (Cache.create 5 : (int * filter list, _) Cache.t);; + if nw <> old_width || nh <> old_height then begin + (* original pixbuf will be GC'ed automatically *) + let pixbuf' = GdkPixbuf.create ~width: nw ~height: nh () in + GdkPixbuf.scale + ~dest: pixbuf' ~dest_x: 0 ~dest_y: 0 ~width: nw ~height: nh + ~ofs_x: 0. ~ofs_y: 0. ~scale_x: (float nw /. float old_width) ~scale_y: (float nh /. float old_height) + ~interp: `HYPER old; + pixbuf' + end else old -let ximage_of_image (id : int) image filters = +let create_pixbuf (id : int) image filters = + let pixbuf = Imagegdk.to_pixbuf image in let filters = sort_filters filters in - let ximage = - try - let ximage = Cache.find xcache (id, filters) in - Cache.add cache (id, filters) image; - ximage - with - | Not_found -> - let rec get_image filters = - try Cache.find cache (id, filters) with - | Not_found -> - match filters with - | [] -> image - | `SIZE (w, h, cond) :: fs -> resize w h cond (get_image fs) - | `NORMALIZE :: fs -> normalize (get_image fs) - | `ENHANCE :: fs -> enhance (get_image fs) in - let image = get_image filters in - Cache.add cache (id, filters) image; - prog#misc#map (); - prog#set_format_string "mapping"; - OXimage2.of_image visual (Some prog#set_fraction) image#coerce in - - Cache.add xcache (id, filters) ximage; - ximage;; + let rec filter_pixbuf pixbuf = function + | [] -> pixbuf + | `SIZE (w, h, cond) :: fs -> + (* original pixbuf will be GC'ed automatically *) + resize w h cond pixbuf + in + filter_pixbuf pixbuf filters +;; let current = ref None;; @@ -602,10 +282,11 @@ let start_waiting () = match !waiting with | Some (id, image, filters) -> - prerr_endline "aborted!"; - waiting := None; - display id image filters - | None -> () in + prerr_endline "aborted!"; + waiting := None; + display id image filters + | None -> () + in if !working <> None then begin (* we store it at waiting *) @@ -615,10 +296,11 @@ end else begin try working := Some (id, image, filters); - let ximage = ximage_of_image id image filters in + (* XIMAGE let ximage = ximage_of_image id image filters in *) + let pixbuf = create_pixbuf id image#coerce filters in current := Some (id, image); current_filters := filters; - display_ximage ximage; + display_pixbuf pixbuf; working := None; start_waiting () with @@ -629,7 +311,7 @@ let redisplay new_filters = match !current with - | Some (id, image) -> display id image new_filters; prog#misc#unmap () + | Some (id, image) -> display id image new_filters | None -> ();; forward_redisplay := redisplay;; diff -Nru camlimages-3.0.1/examples/liv/gui.ml camlimages-4.0.1/examples/liv/gui.ml --- camlimages-3.0.1/examples/liv/gui.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/gui.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: gui.ml,v 1.25 2004/09/21 18:15:44 weis Exp $ *) +(* $Id: gui.ml,v 1.27 2008/02/19 12:44:04 furuse Exp $ *) open Gdk;; open GDraw;; @@ -22,21 +22,27 @@ let sync () = while Glib.Main.iteration false do () done;; +(* let window = GWindow.window ~title: "liv" ~allow_shrink: true ~allow_grow: true ();; *) let window = GWindow.window ~title: "liv" ();; (* We should not set allow_shrink and allow_grow here. *) window#connect#destroy ~callback:Main.quit;; window#misc#set_size_request ~width: 1 ~height: 1 ();; -window#resize ~width: 150 ~height: 150;; +window#resize ~width: 1 ~height: 1;; +window#misc#set_app_paintable true;; -let fixed = GPack.fixed ~packing: window#add ();; -fixed#misc#set_app_paintable true;; +let drawing = window -(* in gtk2.0 we need drawing area (drawing on fixed directory does no longer - work) *) +let fixed = GPack.fixed ~packing: window#add ~show: true ();; -let drawing = GMisc.drawing_area ~width:150 ~height:150 - ~packing: (fixed#put ~x:0 ~y:0) ~show:true ();; +(* +let drawing = + GMisc.drawing_area + ~width:150 ~height:150 + ~packing: window#add ~show:true ();; +*) + +(* let fixed = GPack.fixed ~packing: box#add ();; *) (* window#event#connect#configure (fun ev -> @@ -53,7 +59,9 @@ val mutable previous = 0.0 method set_fraction x = let x = floor (x *. 10.0) /. 10.0 in - if x <> previous then begin super#set_fraction x; sync () end + if x <> previous then begin + super#set_fraction x; sync (); previous <- x + end end;; let new_progress_bar = @@ -63,7 +71,29 @@ (new new_progress_bar (GtkRange.ProgressBar.create pl)) ~packing ~show);; -let prog1 = new_progress_bar ~packing: (fixed#put ~x:0 ~y:0) () +let prog_on_image = true + +class prog_nop = object + method map () = () + method unmap () = () + method set_text (s : string) = () + method set_fraction (s : float) = () +end + +class prog (p : GRange.progress_bar) = object + method map () = fixed#misc#map () + method unmap () = fixed#misc#unmap () + method set_text = p#set_text + method set_fraction = p#set_fraction +end + +let prog1 = + if prog_on_image then + let p = + new_progress_bar ~packing: (fixed#put ~x:0 ~y:0) () + in + new prog p + else (new prog_nop :> prog) ;; let visual = window#misc#visual;; @@ -100,10 +130,11 @@ imglist#misc#set_size_request ~width:300 ~height: 150;; -let prog2 = new_progress_bar ~packing: (imglbox0#pack ~expand: false) ();; +let prog2 = GRange.progress_bar ~packing: (imglbox0#pack ~expand: false) ();; -class prog = object - method misc = prog1#misc +class progs = object + method map = prog1#map + method unmap = prog1#unmap method set_format_string s = prog1#set_text s; prog2#set_text s @@ -112,4 +143,6 @@ prog2#set_fraction s end;; -let prog = new prog;; +let prog = new progs;; + +sync();; diff -Nru camlimages-3.0.1/examples/liv/iconcap camlimages-4.0.1/examples/liv/iconcap --- camlimages-3.0.1/examples/liv/iconcap 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv/iconcap 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,22 @@ +# This is a sample "iconcap" file for lv. +# place this file in your $HOME/.lv directory + +#audio/mod; /usr/bin/mikmod %s +# audio/*; /usr/bin/play %s + +text/*; File.xpm +audio/*; sound.xpm +image/*; Monalisa.xpm +video/*; + +special/dir; Folder.xpm +special/lnkdir; FolderLink.xpm +special/lnk; FilesLink.xpm +special/*; BulletHole.xpm + +application/postscript; /usr/share/WindowMaker/Icons/ps.tiff +application/pdf; /usr/share/WindowMaker/Icons/pdf.tiff +application/x-dvi; /usr/share/WindowMaker/Icons/xdvi.xpm + +encoding/gzip; /usr/share/icons/filez.tif +encoding/compress; /usr/share/icons/filez.tif diff -Nru camlimages-3.0.1/examples/liv/icon.ml camlimages-4.0.1/examples/liv/icon.ml --- camlimages-3.0.1/examples/liv/icon.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/icon.ml 2011-06-22 20:04:32.000000000 +0200 @@ -16,8 +16,8 @@ open OImages;; open Livshtype;; open Geometry;; -open Ximage2;; -open OXimage2;; +open Ximage;; +open OXimage;; let xvmode = ref false;; diff -Nru camlimages-3.0.1/examples/liv/liv.ml camlimages-4.0.1/examples/liv/liv.ml --- camlimages-3.0.1/examples/liv/liv.ml 2006-09-29 15:21:41.000000000 +0200 +++ camlimages-4.0.1/examples/liv/liv.ml 2011-06-22 20:04:32.000000000 +0200 @@ -4,151 +4,173 @@ (* *) (* Jun Furuse, projet Cristal, INRIA Rocquencourt *) (* *) -(* Copyright 1999-2004, *) +(* Copyright 1999,2000,2001,2002,2001,2002 *) (* Institut National de Recherche en Informatique et en Automatique. *) (* Distributed only by permission. *) (* *) (***********************************************************************) +open Images +open OImages -(* $Id: liv.ml,v 1.7 2006/09/29 13:21:41 rousse Exp $ *) +(* +let _ = + Bitmap.maximum_live := 15000000; (* 60MB *) + Bitmap.maximum_block_size := !Bitmap.maximum_live / 16; +;; +*) -open Images;; -open OImages;; +module D = Display +open D -open Gdk;; -open GDraw;; -open GMain;; - -open Livmisc;; -open Gui;; -open Display;; -open Tout;; - -open Gc;; - -exception Skipped;; - -let base_filters = ref ([] : Display.filter list);; - -let r = Gc.get () in -r.max_overhead <- 0; Gc.set r; - -let files = ref [] in -let random = ref false in -let dirrandom = ref false in -let dirsample = ref false in -let size = ref false in - -Random.init (truncate (Unix.time ())); - -Arg.parse [ - "-random", Arg.Unit (fun () -> random := true), - ": random mode"; - "-dirrandom", Arg.Unit (fun () -> dirrandom := true), - ": random per directory mode"; - "-dirsample", Arg.Unit (fun () -> dirsample := true), - ": random per directory sample mode"; - "-wait", Arg.Float (fun sec -> Tout.wait := sec), "sec : wait sec"; - "-root", - Arg.String - (function - | "center" -> Display.root_mode := `CENTER - | "random" -> Display.root_mode := `RANDOM - | _ -> raise (Failure "root mode")), - ": on root [center|random]"; - "-transition", - Arg.String - (function - | "myst" -> Display.transition := `MYST - | "transparent" -> Display.transition := `TRANSPARENT - | _ -> raise (Failure "transition")), - ": transition [myst|transparent]"; - "-transparentborder", - Arg.Unit (fun () -> base_filters := `TRANSPARENT_BORDER :: !base_filters), - ": transparent border filter"; - "-size", - Arg.String - (fun s -> - match Mstring.split_str (function 'x' -> true | _ -> false) s with - | [w; h] -> - size := true; - base_filters := - `SIZE (int_of_string w, int_of_string h, `NOASPECT) :: !base_filters - | _ -> failwith "size"), - ": size [w]x[h]"; - "-atleast", - Arg.String - (fun s -> - match Mstring.split_str (function 'x' -> true | _ -> false) s with - | [w; h] -> - size := true; - base_filters := - `SIZE (int_of_string w, int_of_string h, `ATLEAST) :: !base_filters - | _ -> failwith "zoom"), - ": zoom [w]x[h]"; - "-atmost", - Arg.String - (fun s -> - match Mstring.split_str (function 'x' -> true | _ -> false) s with - | [w; h] -> - size := true; - base_filters := - `SIZE (int_of_string w, int_of_string h, `ATMOST) :: !base_filters - | _ -> failwith "zoom"), - ": zoom [w]x[h]"; - - "-normalize", - Arg.Unit (fun () -> base_filters := `NORMALIZE :: !base_filters), - ": normalize colormap"; - - "-enhance", - Arg.Unit (fun () -> base_filters := `ENHANCE :: !base_filters), - ": enhance colormap"; - ] - (fun s -> files := s :: !files) - "liv files"; +open Gc +open Unix +open LargeFile +open Gdk +open GDraw +open GMain + +open Livmisc +open Gui +open Tout + +exception Skipped + +let cwd = Unix.getcwd () +let home = Sys.getenv "HOME" + +let convert_file file = + let b = Buffer.create (String.length file) in + + let rec loop file = + let dir = Filename.dirname file in + let base = Filename.basename file in + begin match dir with + | "." -> Buffer.add_string b dir + | "/" -> () + | _ -> loop dir + end; + Buffer.add_char b '/'; + Buffer.add_string b (try Glib.Convert.locale_to_utf8 base with _ -> base) + in + loop file; + Buffer.contents b +;; + +let base_filters = ref ([] : D.filter list);; + +let _ = + let files = ref [] in + let random = ref false in + let dirrandom = ref false in + let dirsample = ref false in + let size = ref false in + +(*JPF*) + let mtimesort = ref false in + let xmode = ref `n in + let check = ref true in + let gcheck = ref false in +(*/JPF*) + + Random.init (Pervasives.truncate (Unix.time ())); + Arg.parse + [ + "-random", Arg.Unit (fun () -> random := true), ": random mode"; + "-dirrandom", Arg.Unit (fun () -> dirrandom := true), ": random per directory mode"; + "-dirsample", Arg.Unit (fun () -> dirsample := true), ": random per directory sample mode"; + "-wait", Arg.Float (fun sec -> Tout.wait := sec), "sec : wait sec"; + "-root", Arg.String (function + "center" -> D.root_mode := `CENTER + | "random" -> D.root_mode := `RANDOM + | _ -> raise (Failure "root mode")), ": on root [center|random]"; +(* + "-transition", Arg.String (function + "myst" -> D.transition := `MYST + | "transparent" -> D.transition := `TRANSPARENT + | _ -> raise (Failure "transition")), ": transition [myst|transparent]"; + "-transparentborder", Arg.Unit (fun () -> + base_filters := `TRANSPARENT_BORDER :: !base_filters), + ": transparent border filter"; +*) + "-size", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`NOASPECT) :: !base_filters + | _ -> raise (Failure "size")), ": size [w]x[h]"; + "-atleast", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATLEAST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + "-atmost", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATMOST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + +(* + "-normalize", Arg.Unit (fun () -> + base_filters := `NORMALIZE :: !base_filters), + ": normalize colormap"; + + "-enhance", Arg.Unit (fun () -> + base_filters := `ENHANCE :: !base_filters), + ": enhance colormap"; +*) +(*JPF*) + "-check", Arg.Unit (fun () -> check := true), ": check mode"; + "-Check", Arg.Unit (fun () -> check := true; gcheck := true), + ": ground check mode"; + "-x", Arg.Unit (fun () -> xmode := `x), ": x mode"; + "-X", Arg.Unit (fun () -> xmode := `X), ": X mode"; + "-_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "--_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "-mtime", Arg.Unit (fun () -> mtimesort := true), ": mtimesort mode"; +(*/JPF*) + ] + (fun s -> files := s :: !files) + "liv files"; let files = let fs = ref [] in - let treat_file f = + List.iter (fun f -> try - let st = Unix.stat f in - match st.Unix.st_kind with - | Unix.S_DIR -> - Scandir.scan_dir - (fun f -> - try - ignore (guess_extension (snd (Livmisc.get_extension f))); - fs := f :: !fs; - with - | e -> - (* prerr_endline ((f^": "^ Printexc.to_string e)) *) ()) - f - | _ -> fs := f :: !fs + let st = stat f in + match st.st_kind with + | S_DIR -> + Scandir.scan_dir (fun f -> + try + ignore (guess_extension (snd (Livmisc.get_extension f))); + fs := f :: !fs; + with e -> (* prerr_endline ((f^": "^ Printexc.to_string e)) *) ()) f + | _ -> fs := f :: !fs with - | _ -> () in - - List.iter treat_file !files; - Array.of_list !fs in + | _ -> prerr_endline ("ERROR: " ^ f)) !files; + Array.of_list !fs + in if not !size then - base_filters := - `SIZE (fst root_size, snd root_size, `ATMOST) :: !base_filters; + base_filters := `SIZE (fst root_size, snd root_size, `ATMOST) + :: !base_filters; base_filters := List.rev !base_filters; - + let cur = ref (-1) in let curpath = ref "" in let disp_cur = ref (-1) in - let random_array ary = + let random_array ary = let num = Array.length ary in for i = 0 to num - 1 do let tmp = ary.(i) in let pos = Random.int num in ary.(i) <- ary.(pos); ary.(pos) <- tmp - done in + done + in if !dirsample then begin let tbl = Hashtbl.create 17 in @@ -163,21 +185,19 @@ random_array dirsarray; let pos = ref 0 in let subpos = ref 0 in - let subfiles = - Array.init (Array.length dirsarray) - (fun a -> - let ary = Array.of_list (Hashtbl.find_all tbl dirsarray.(a)) in - random_array ary; - ary) in + let subfiles = Array.init (Array.length dirsarray) (fun a -> + let ary = Array.of_list (Hashtbl.find_all tbl dirsarray.(a)) in + random_array ary; ary) + in while !pos < Array.length files do for i = 0 to Array.length dirsarray - 1 do - if !subpos < Array.length subfiles.(i) then begin - files.(!pos) <- subfiles.(i).(!subpos); - incr pos - end + if !subpos < Array.length subfiles.(i) then begin + files.(!pos) <- subfiles.(i).(!subpos); + incr pos + end done; incr subpos - done + done end else if !dirrandom then begin let tbl = Hashtbl.create 17 in @@ -192,27 +212,86 @@ random_array dirsarray; let pos = ref 0 in for i = 0 to Array.length dirsarray - 1 do - let dirfiles = - Array.of_list - (List.sort compare (Hashtbl.find_all tbl dirsarray.(i))) in - if !random then random_array dirfiles; + let dirfiles = Array.of_list + (List.sort compare (Hashtbl.find_all tbl dirsarray.(i))) in + if !random then begin + random_array dirfiles + end; for j = 0 to Array.length dirfiles - 1 do - files.(!pos) <- dirfiles.(j); - incr pos + files.(!pos) <- dirfiles.(j); + incr pos done done - end else - if !random then random_array files; + end else if !random then random_array files; +(*JPF*) + let files = + if !mtimesort then begin + let ctimes = + Array.map (fun f -> + let st = lstat f in + let t = st.st_mtime in + f,(if !random then t +. Random.float (float (24*60*60)) else t)) files + in + Array.sort (fun (f1,t1) (f2,t2) -> + let c = compare t1 t2 in + if c = 0 then compare f1 f2 else c) ctimes; + Array.map fst ctimes + end else files + in +(*/JPF*) infowindow#show (); imglist#freeze (); - Array.iter (fun file -> ignore (imglist#append [file])) files; + Array.iter (fun file -> + ignore (imglist#append [convert_file file])) + files; imglist#thaw (); let cache = Cache.create 5 in + let rename pos newname = + let oldname = files.(pos) in + let xvname s = Filename.dirname s ^ "/.xvpics/" ^ Filename.basename s in + let oldxvname = xvname oldname in + let newxvname = xvname newname in + let gthumbname s = + let abs = + if s = "" then "" else + if s.[0] = '/' then s + else Filename.concat cwd s + in + (Filename.concat (Filename.concat home ".gnome2/gthumb/comments") abs) + ^ ".xml" + in + let oldgthumbname = gthumbname oldname in + let newgthumbname = gthumbname newname in + imglist#set_cell ~text: (convert_file newname) pos 0; + let command s = Sys.command s in + if Filename.dirname newname <> Filename.dirname oldname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newname))); + end; + prerr_endline (Printf.sprintf "%s => %s" oldname newname); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldname newname)); + if Sys.file_exists oldxvname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newxvname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldxvname newxvname)) + end; + if Sys.file_exists oldgthumbname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newgthumbname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldgthumbname newgthumbname)) + end; + files.(pos) <- newname; + Cache.rename cache oldname newname + in + let image_id = ref 0 in let display_image reload file = @@ -220,149 +299,393 @@ remove_timeout (); let load_image () = - prog#misc#map (); - prog#set_fraction 0.01; + prog#map (); + prog#set_fraction 0.01; prog#set_format_string ("loading..."); - let image = - try - match tag (OImages.load file - [Load_Progress prog#set_fraction]) with - | Rgb24 i -> i - | Index8 i -> i#to_rgb24 - | Index16 i -> i#to_rgb24 - | _ -> failwith "not supported" - with - | e -> prerr_endline (Printexc.to_string e); raise e in - prog#set_fraction 1.0; - sync (); - image in + let image = + try + match tag (OImages.load file + [Load_Progress prog#set_fraction]) with + | Rgb24 i -> i + | Rgba32 i -> i#to_rgb24 + | Index8 i -> i#to_rgb24 + | Index16 i -> i#to_rgb24 + | _ -> raise (Failure "not supported") + with + | e -> prerr_endline (Printexc.to_string e); raise e + in + prog#set_fraction 1.0; sync (); + image + in let id, image = try - if not reload then Cache.find cache file else raise Not_found + if not reload then begin + Cache.find cache file + end else raise Not_found with - | Not_found -> - let im = load_image () in - incr image_id; - !image_id, im in - - Cache.add cache file (id, image); - display id image !base_filters; - - prog#set_format_string "done"; + Not_found -> + let im = load_image () in + incr image_id; + !image_id, im + in + Cache.add cache file (id, image) (fun _ -> ()); + prog#set_fraction 0.01; - prog#misc#unmap (); - window#set_title file; + display id image !base_filters; (* this cause lots of gc *) + + window#set_title (convert_file file); + disp_cur := !cur; - curpath := file in + curpath := file; +(*JPF*) + (* update mtime *) + if !check then begin + try + let st = lstat file in + if st.st_kind = S_LNK then begin + let lnk = Unix.readlink file in + Unix.unlink file; + Unix.symlink lnk file + end else begin + Unix.utimes file (Unix.time ()) (Unix.time ()); + end + with + _ -> () + end; +(*/JPF*) + in let display_image reload file = - try display_image reload file with - | Wrong_file_type | Wrong_image_type -> + try + display_image reload file + with Wrong_file_type | Wrong_image_type -> try - prerr_endline "guess type"; - let typ = - let typ = Livshtype.guess file in - match typ with - | Livshtype.ContentType x -> - begin match - Mstring.split_str (function '/' -> true | _ -> false) x - with - | [mj; mn] -> mj,mn - | _ -> assert false - end - | Livshtype.ContentEncoding x -> "encoding", x - | Livshtype.Special m -> "special", m in - prerr_endline (fst typ ^ "/" ^ snd typ); - match typ with - | _ -> raise Wrong_file_type + prerr_endline "guess type"; + let typ = + let typ = Livshtype.guess file in + match typ with + | Livshtype.ContentType x -> + begin match + Mstring.split_str (function '/' -> true | _ -> false) x + with + | [mj;mn] -> mj,mn + | _ -> assert false + end + | Livshtype.ContentEncoding x -> + "encoding", x + | Livshtype.Special m -> + "special",m + in + prerr_endline (fst typ ^ "/" ^ snd typ); + match typ with +(*JPF*) + | "application", "vnd.rn-realmedia" + | "audio", "x-pn-realaudio" -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop \"%s\" &" file)) + | "video", _ -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop '%s' &" file)) +(*/JPF*) + | _ -> raise Wrong_file_type with - | _ -> () in + | _ -> () + in + + let _filter_toggle opt = + if List.mem opt !base_filters then + base_filters := + List.fold_right (fun x st -> + if x = opt then st + else x :: st) !base_filters [] + else + base_filters := !base_filters @ [opt] + in let display_current reload = - let f = + let f = if !cur >= 0 && !cur < Array.length files then begin - imglist#unselect_all (); - imglist#select !cur 0; - if imglist#row_is_visible !cur <> `FULL - then imglist#moveto ~row_align: 0.5 ~col_align: 0.0 !cur 0; - files.(!cur) - end else !curpath in + imglist#unselect_all (); + imglist#select !cur 0; + if imglist#row_is_visible !cur <> `FULL then begin + imglist#moveto ~row_align: 0.5 ~col_align: 0.0 !cur 0 + end; + files.(!cur) + end else !curpath + in +(*JPF*) + let _xlevel, _enhanced, _checked = Jpf.get_flags f in +(* + if enhanced then filter_toggle `ENHANCE; +*) + + let f = + if !gcheck && files.(!cur) = f then begin + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + let newname = Jpf.set_flags files.(!cur) (xlevel,enhanced,true) in + if files.(!cur) <> newname then begin + rename !cur newname + end; + newname end else f + in +(*/JPF*) + + display_image reload f; +(*JPF*) +(* + if enhanced then filter_toggle `ENHANCE; +*) +(*/JPF*) - display_image reload f in + () + in + +(*JPF*) + let check_skip mode = + match mode with + | Some `FORCE -> () + | Some `DIR -> + let disp_file = files.(!disp_cur) in + let cur_file = files.(!cur) in + if Filename.dirname disp_file = Filename.dirname cur_file then + raise Skipped + | None -> + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + if !gcheck && checked then raise Skipped; + match !xmode with + | `n -> () + | `u -> if xlevel < 0 then raise Skipped + | `x -> +(* + let imgs = Array.length files in +*) + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 25 + | 1 -> 50 + | 2 -> 75 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + | `X -> + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 0 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + in +(*/JPF*) let rec next mode = - if !cur >= 0 then - let cur' = if !cur >= Array.length files - 1 then 0 else !cur + 1 in - if !cur <> cur' then begin - cur := cur'; - try display_current false with - | Sys_error s -> prerr_endline s; next mode + if !cur >= 0 then begin + let cur' = + if !cur >= Array.length files - 1 then 0 else !cur + 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false; + with + | Sys_error s -> + prerr_endline s; + next mode +(*JPF*) + | Skipped -> next mode +(*/JPF*) | Wrong_file_type | Wrong_image_type -> next mode - end in + end + end + in let rec prev mode = - if !cur >= 0 then - let cur' = if !cur = 0 then Array.length files - 1 else !cur - 1 in - if !cur <> cur' then begin - cur := cur'; - try display_current false with - | Sys_error s -> prerr_endline s; prev mode - | Skipped -> prev mode - | Wrong_file_type | Wrong_image_type -> prev mode - end in + if !cur >= 0 then begin + let cur' = + if !cur = 0 then Array.length files - 1 else !cur - 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false + with + | Sys_error s -> + prerr_endline s; + prev mode + | Skipped -> prev mode + | Wrong_file_type | Wrong_image_type -> prev mode + end + end + in let bind () = - let callback ev = + let callback = fun ev -> begin match GdkEvent.Key.string ev with (* - | "E" -> - filter_toggle `ENHANCE; - display_current true - | "N" -> - filter_toggle `NORMALIZE; - display_current true + | "E" -> + filter_toggle `ENHANCE; + display_current true + +*) +(*JPF*) + | "E" -> + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let enhance' = not enhance in + let newname = Jpf.set_flags name (xlevel,enhance',checked) in + if name <> newname then begin + rename !disp_cur newname + end; + display_current true +(*/JPF*) +(* + | "N" -> + filter_toggle `NORMALIZE; + display_current true *) - - | "l" -> display_current true + + | "l" -> display_current true + | " " | "n" | "f" -> next None +(*JPF*) + | "\014" (* C-N *) | "\006" (* C-F *) -> next (Some `FORCE) + | "N" | "F" -> next (Some `DIR) +(*/JPF*) | "p" | "b" -> prev None +(*JPF*) + | "\016" (* C-P *) | "\002" (* C-B *) -> prev (Some `FORCE) + | "P" | "B" -> prev (Some `DIR) +(*/JPF*) | "q" -> Main.quit () - | "v" -> - (* liv visual shell *) - let rec func file typ = - match typ with - | "image", _ -> display_image false file + | "v" -> + (* liv visual shell *) + let rec func = fun file typ -> + match typ with + | "image", _ -> + display_image false file (* - | "special", "dir" -> new Livsh.livsh file func; () + | "special", "dir" -> + new Livsh.livsh file func; () *) - | _ -> Gdk.X.beep () in - (* where we should display ? *) - let dirname = - if Array.length files = 0 then Unix.getcwd () - else Filename.dirname files.(!cur) in - let dirname = - if Filename.is_relative dirname - then let cwd = Unix.getcwd () in Filename.concat cwd dirname - else dirname in - ignore (new Livsh.livsh dirname func) - | _ -> () - end; - false in - + | _ -> Gdk.X.beep () + in + (* where we should display ? *) + let dirname = + if Array.length files = 0 then Unix.getcwd () + else Filename.dirname files.(!cur) + in + let dirname = + if Filename.is_relative dirname then begin + let cwd = Unix.getcwd () in + Filename.concat cwd dirname + end else dirname + in + ignore (new Livsh.livsh dirname func) +(*JPF*) + | "e" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = -1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "x" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = xlevel + 1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "r" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = + if xlevel > 0 then xlevel - 1 + else if xlevel < 0 then xlevel + 1 + else xlevel + in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "s" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 7 = "/series" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 7)) base + else Filename.concat (Filename.concat dir "series") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "d" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 6 = "/trash" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 6)) base + else Filename.concat (Filename.concat dir "trash") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end +(*/JPF*) + | _ -> () + end; false + in ignore (window#event#connect#key_press ~callback: callback); ignore (infowindow#event#connect#key_press ~callback: callback); - imglist#connect#select_row - ~callback: - (fun ~row ~column ~event -> - if !cur <> row then begin - cur := row; - display_image false files.(!cur) - end) + ignore (imglist#connect#select_row ~callback: (fun ~row ~column ~event -> + if !cur <> row then begin + cur := row; + display_image false files.(!cur) + end)) in - ignore (bind ()); + bind (); Tout.hook_next := next; @@ -370,24 +693,36 @@ let starter = ref None in - starter := - Some - (window#event#connect#configure - ~callback: - (fun ev -> - may window#misc#disconnect !starter; - if Array.length files <> 0 then begin - cur := 0; - prog#misc#unmap (); - display_current false - end else begin - try - display_image false - (Pathfind.find - [ "~/.liv"; "/usr/lib/liv"; "/usr/local/lib/liv"; "." ] - "liv.jpg") with - | _ -> () - end; - false)); + starter := Some (window#event#connect#configure ~callback: (fun ev -> + may window#misc#disconnect !starter; + if Array.length files <> 0 then begin + cur := 0; + prog#unmap (); + display_current false + end else begin + try + display_image false (Pathfind.find [ "~/.liv"; + "/usr/lib/liv"; + "/usr/local/lib/liv"; + "." ] "liv.jpg") + with + | _ -> () + end; false)); + +(* + let release _ = prerr_endline "freed string!" in + let test () = + let f () = + let string = String.create 3000 in + Gc.finalise release string; + let buf = Gpointer.region_of_string string in + ignore (GdkPixbuf.from_data ~width: 100 ~height: 10 + ~bits: 8 ~rowstride:300 ~has_alpha: false buf); + () + in + for i = 0 to 100 do f () done + in + test (); +*) - Main.main ();; + Main.main () diff -Nru camlimages-3.0.1/examples/liv/livsh.ml camlimages-4.0.1/examples/liv/livsh.ml --- camlimages-3.0.1/examples/liv/livsh.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/livsh.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,12 +10,12 @@ (* *) (***********************************************************************) -(* $Id: livsh.ml,v 1.9 2006/03/14 05:29:10 furuse Exp $ *) +(* $Id: livsh.ml,v 1.10 2008/02/19 12:44:04 furuse Exp $ *) open OImages;; open GBin;; open GPack;; -open Ximage2;; +open Ximage;; open Gui;; open Livshtype;; open Livmisc;; @@ -135,7 +135,7 @@ Mylazy.make (fun () -> (* prerr_endline (Printf.sprintf "Icon(%s)" name); *) let info, pixmap = Icon.load_icon (Filename.concat dir name) !!typ in - prog#misc#unmap (); + prog#unmap (); !!pix#set_pixmap pixmap; sync (); (* prerr_endline "done"; *) diff -Nru camlimages-3.0.1/examples/liv/livshtype.mli camlimages-4.0.1/examples/liv/livshtype.mli --- camlimages-3.0.1/examples/liv/livshtype.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv/livshtype.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,7 @@ +type typ = + ContentType of string + | ContentEncoding of string + | Special of string +val default_mime_types : string +val read_suffix_file : string -> unit +val guess : string -> typ diff -Nru camlimages-3.0.1/examples/liv/Makefile.am camlimages-4.0.1/examples/liv/Makefile.am --- camlimages-3.0.1/examples/liv/Makefile.am 2007-05-21 20:54:32.000000000 +0200 +++ camlimages-4.0.1/examples/liv/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,74 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.8 2007/02/20 21:19:07 rousse Exp $ *) - -OCAMLSOURCES = deficon.ml \ - mylazy.ml \ - cache.ml \ - livmisc.ml \ - gui.ml \ - jWidget.ml \ - seq.ml \ - tout.ml \ - enhance.ml \ - display.ml \ - viewer.ml \ - edge.ml \ - pathfind.ml \ - iconcap.ml \ - livshtype.ml \ - icon.ml \ - livsh.ml \ - scandir.ml \ - jpf.ml \ - liv.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += liv.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += liv.byt -endif - -liv_opt_SOURCES = $(OCAMLSOURCES) -liv_byt_SOURCES = $(OCAMLSOURCES) - -OTHER_LIBS = unix.cma - -include ../../Makefile.variables - -EXTRA_DIST = BulletHole.xpm \ - faceanm.gif \ - FilesLink.xpm \ - FileUnknown.xpm \ - File.xpm \ - FolderLink.xpm \ - Folder.xpm \ - livdemo.jpg \ - Monalisa.xpm \ - sound.xpm - -liv.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o liv.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -liv.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o liv.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/liv/Makefile.in camlimages-4.0.1/examples/liv/Makefile.in --- camlimages-3.0.1/examples/liv/Makefile.in 2007-10-11 10:50:43.000000000 +0200 +++ camlimages-4.0.1/examples/liv/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,498 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.8 2007/02/20 21:19:07 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(liv_byt_SOURCES) $(liv_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = liv.opt -@BUILD_BYTECODE_TRUE@am__append_2 = liv.byt -DIST_COMMON = README $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/liv -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = liv.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = liv.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_liv_byt_OBJECTS = $(am__objects_1) -liv_byt_OBJECTS = $(am_liv_byt_OBJECTS) -liv_byt_LDADD = $(LDADD) -am_liv_opt_OBJECTS = $(am__objects_1) -liv_opt_OBJECTS = $(am_liv_opt_OBJECTS) -liv_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(liv_byt_SOURCES) $(liv_opt_SOURCES) -DIST_SOURCES = $(liv_byt_SOURCES) $(liv_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = deficon.ml \ - mylazy.ml \ - cache.ml \ - livmisc.ml \ - gui.ml \ - jWidget.ml \ - seq.ml \ - tout.ml \ - enhance.ml \ - display.ml \ - viewer.ml \ - edge.ml \ - pathfind.ml \ - iconcap.ml \ - livshtype.ml \ - icon.ml \ - livsh.ml \ - scandir.ml \ - jpf.ml \ - liv.ml - -liv_opt_SOURCES = $(OCAMLSOURCES) -liv_byt_SOURCES = $(OCAMLSOURCES) -OTHER_LIBS = unix.cma -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -EXTRA_DIST = BulletHole.xpm \ - faceanm.gif \ - FilesLink.xpm \ - FileUnknown.xpm \ - File.xpm \ - FolderLink.xpm \ - Folder.xpm \ - livdemo.jpg \ - Monalisa.xpm \ - sound.xpm - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/liv/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/liv/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -liv.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o liv.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -liv.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o liv.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/liv/mylazy.mli camlimages-4.0.1/examples/liv/mylazy.mli --- camlimages-3.0.1/examples/liv/mylazy.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv/mylazy.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,42 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Damien Doligez, projet Para, INRIA Rocquencourt *) +(* *) +(* Copyright 1997 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU Library General Public License, with *) +(* the special exception on linking described in file ../LICENSE. *) +(* *) +(***********************************************************************) + +(* $Id: mylazy.mli,v 1.1 2002/04/09 11:00:09 furuse Exp $ *) + +(** Deferred computations. *) + +type 'a status = + Delayed of (unit -> 'a) + | Value of 'a + | Exception of exn + +type 'a t = 'a status ref +(** A value of type ['a Lazy.t] is a deferred computation (also called a + suspension) that computes a result of type ['a]. The expression + [lazy (expr)] returns a suspension that computes [expr]. **) + + +exception Undefined + +val make : (unit -> 'a) -> 'a t +val make_val : 'a -> 'a t + +val force : 'a t -> 'a +(** [Lazy.force x] computes the suspension [x] and returns its result. + If the suspension was already computed, [Lazy.force x] returns the + same value again. If it raised an exception, the same exception is + raised again. + Raise [Undefined] if the evaluation of the suspension requires its + own result. +*) + diff -Nru camlimages-3.0.1/examples/liv/OMakefile camlimages-4.0.1/examples/liv/OMakefile --- camlimages-3.0.1/examples/liv/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,42 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +OCAMLPACKS[] = lablgtk2 unix + +MODULES[] = + cache + deficon + display + edge + enhance + gui + icon + iconcap + jWidget + jpf + liv + livmisc + livsh + livshtype + mylazy + pathfind + scandir + seq + tout + viewer + +BuildExample(liv, $(MODULES), all lablgtk2) + diff -Nru camlimages-3.0.1/examples/liv/scandir.ml camlimages-4.0.1/examples/liv/scandir.ml --- camlimages-3.0.1/examples/liv/scandir.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/scandir.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,11 +10,11 @@ (* *) (***********************************************************************) -(* $Id: scandir.ml,v 1.9 2004/09/23 07:20:20 weis Exp $ *) +(* $Id: scandir.ml,v 1.10 2008/06/16 22:35:42 furuse Exp $ *) open Unix;; -let ignore_dirs = ref [".xvpics"];; +let ignore_dirs = ref [".xvpics"; ".livpics"; "0000HEADER"; "0000HEADERS"];; let scan_dir f fn = let scanned = ref [] in diff -Nru camlimages-3.0.1/examples/liv/seq.ml camlimages-4.0.1/examples/liv/seq.ml --- camlimages-3.0.1/examples/liv/seq.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/seq.ml 2011-06-22 20:04:32.000000000 +0200 @@ -19,6 +19,6 @@ let seq = unoptimize_sequence seq in List.map (fun frame -> - Ximage2.pixmap_of_image window None + Ximage.pixmap_of_image window None frame.frame_image, frame.frame_delay) seq.seq_frames;; diff -Nru camlimages-3.0.1/examples/liv/viewer.ml camlimages-4.0.1/examples/liv/viewer.ml --- camlimages-3.0.1/examples/liv/viewer.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/liv/viewer.ml 2011-06-22 20:04:32.000000000 +0200 @@ -46,7 +46,7 @@ method progress = prog - method display (ximage : OXimage2.ximage) = + method display (ximage : OXimage.ximage) = let pixmap = let win = fixed#misc#window in let pix = diff -Nru camlimages-3.0.1/examples/liv-furuse/BulletHole.xpm camlimages-4.0.1/examples/liv-furuse/BulletHole.xpm --- camlimages-3.0.1/examples/liv-furuse/BulletHole.xpm 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/BulletHole.xpm 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,114 @@ +/* XPM */ +static char * BulletHole_xpm[] = { +"48 48 63 1", +" c None", +". c #CF3CCB2BCF3C", +"X c #EFBEEBADEFBE", +"o c #D75CD34CD75C", +"O c #514451445144", +"+ c #9E799A699E79", +"@ c #FFFFFBEEFFFF", +"# c #E79DE38DE79D", +"$ c #082008200820", +"% c #965892489658", +"& c #A699A289A699", +"* c #BEFBBAEABEFB", +"= c #410341034103", +"- c #861782078617", +"; c #8E388A288E38", +": c #DF7DDB6CDF7D", +"> c #F7DEF3CEF7DE", +", c #208120812081", +"< c #000000000000", +"1 c #28A228A228A2", +"2 c #B6DAB2CAB6DA", +"3 c #30C230C230C2", +"4 c #596559655965", +"5 c #96589A699E79", +"6 c #71C671C671C6", +"7 c #69A669A669A6", +"8 c #618561856185", +"9 c #30C228A228A2", +"0 c #DF7DD34CDF7D", +"q c #BEFBB2CABEFB", +"w c #492449244924", +"e c #104010401040", +"r c #104010400820", +"t c #8E3892489658", +"y c #AEBAB2CAAEBA", +"u c #9E7992489E79", +"i c #186118611861", +"p c #86178A288617", +"a c #79E779E779E7", +"s c #596559655144", +"d c #C71BC30BC71B", +"f c #F7DEFBEEFFFF", +"g c #AEBAA289A699", +"h c #208128A22081", +"j c #E79DEBADE79D", +"k c #28A230C230C2", +"l c #38E338E338E3", +"z c #FFFFF3CEF7DE", +"x c #9E7992489658", +"c c #79E771C671C6", +"v c #EFBEE38DE79D", +"b c #BEFBC30BC71B", +"n c #A699A2899E79", +"m c #C71BCB2BCF3C", +"M c #492451445144", +"N c #861779E78617", +"B c #CF3CD34CCF3C", +"V c #AEBAAAAAB6DA", +"C c #A699A289AEBA", +"Z c #D75CCB2BCF3C", +"A c #F7DEF3CEEFBE", +"S c #79E782078617", +"D c #596551445144", +" ", +" .X ", +" XoO+ ", +" @#O$% &X % ", +" *@#%=$- o@o$; ", +" :>:o%,>&= ", +" >:;-67-88=9,11 @@@#.0-= ", +" @qO4w1,13er$$,7ty u&.O3 ", +" &@4e,,ie<<<<<<<+ws-21<<<<<<<<<<<<<<<<<<:oo@* +8$<<<<<<<<<<<<<<<<<<<<<<>f>Xg= ", +" o@@@@@2&6e<<<<<<<<<<<<<<<<<<<<<<<#.:%<% ", +" @..2&-l$<<<<<<<<<<<<<<<<<<<<<<<<<X*x$6 ", +" .@+;63r<<<<<<<<<<<<<<<<<<<<<<<<<<<<6>Xd6i ", +" X*uck$<<<<<<<<<<<<<<<<<<<<<<<<<<<<3v#:lO ", +" b>n6l$<<<<<<<<<<<<<<<<<<<<<<<<<<<<,0:%< ", +" X*al$<<<<<<<<<<<<<<<<<<<<<<<<<<<<aM$<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*;$% ", +" 2@26<<<<<<<<<<<<<<<<<<<<<<<<<<<<&4$<<<<<<<<<<<<<<<<<<<<<<<<<<<*uaw,<<<<<<<<<<<<<<<<<<<<<<<<<<2awl,,<<<<<<<<<<<<<<<<<<<<<<<<<<8:Ba1 ", +" .XV3e$ekw$<<<<<<<<<<<<<<<<<<<<<<<<1+>b11 ", +" #d1eO; 6-r<<<<<<<<<<<<<<<<<<<<<<$7X>&l1 ", +" X4,tC ;>2$<<<<<<<<<<<<<<<<<<<<<=#@#&3= ", +" d,+ d@7h<<<<<<<<<<<<<<<<<<$wd@zoq41 ", +" 6- o@&81e$<<<<<<<<<<<<<145:@>#.Zae6 ", +" d>#x=1e<<<<<<<<<<#:ZZ2,= ", +" *XA*-==,i$<<<<<$l6*X@X0X#o.m..4<+ ", +" X>d%784886M8-a% C.@@XX@>voZ:2ae8 ", +" &#@dt;-SNux-&&6=3O2X@ --dXvZ %Oi= ", +" &d@0&+%;NDi<<<11$$6o*<<3 &x=$1 ", +" q@v* &g8Bd8i% ; ", +" yXz.8i ", +" gb@nr ", +" ;a8<% ", +" &7- "}; diff -Nru camlimages-3.0.1/examples/liv-furuse/cache.ml camlimages-4.0.1/examples/liv-furuse/cache.ml --- camlimages-3.0.1/examples/liv-furuse/cache.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/cache.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,79 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: cache.ml,v 1.5 2008/06/16 22:35:42 furuse Exp $ *) + +type ('a, 'b) elt = { + key : 'a; + data : 'b; + at_remove : 'b -> unit; + time : float; + };; + +type ('a, 'b) t = ('a, 'b) elt option array;; + +let create size = Array.create size None;; + +let find_pos t key = + let found = ref 0 in + try + for i = 0 to (Array.length t - 1) do + match t.(i) with + | None -> () + | Some {key = key'} when key = key' -> found := i; raise Exit + | _ -> () + done; + raise Not_found + with + | Exit -> !found;; + +let find t key = + match t.(find_pos t key) with + | Some elt -> elt.data + | _ -> assert false;; + +let rename t key newkey = + try + let pos = find_pos t key in + let data = match t.(pos) with Some d -> d | _ -> assert false in + t.(pos) <- Some {data with key = newkey} + with + | Not_found -> ();; + +let find_empty_or_eldest t = + let found = ref None in + begin try + for i = 0 to (Array.length t - 1) do + match t.(i) with + | None -> found := Some (i, None); raise Exit + | Some elt -> + match !found with + | None -> found := Some (i, Some elt) + | Some (j, Some elt') when elt.time < elt'.time -> + found := Some (i, Some elt) + | _ -> () + done + with Exit -> () end; + match !found with + | Some (i, _) -> i + | None -> raise Not_found;; + +let add t key data at_remove = + let slot = + try find_pos t key with Not_found -> + try find_empty_or_eldest t with Not_found -> 0 + in + begin match t.(slot) with + | Some elt -> elt.at_remove elt.data + | None -> () + end; + t.(slot) <- Some {key = key; data = data; at_remove= at_remove; time = Unix.time ()};; diff -Nru camlimages-3.0.1/examples/liv-furuse/cache.mli camlimages-4.0.1/examples/liv-furuse/cache.mli --- camlimages-3.0.1/examples/liv-furuse/cache.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/cache.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,23 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: cache.mli,v 1.4 2008/06/16 22:35:42 furuse Exp $ *) + +type ('a, 'b) elt = { key : 'a; data : 'b; at_remove: 'b -> unit; time : float; };; +type ('a, 'b) t = ('a, 'b) elt option array;; + +val create : int -> ('a, 'b) t;; +val find_pos : ('a, 'b) t -> 'a -> int;; +val find : ('a, 'b) t -> 'a -> 'b;; +val rename : ('a, 'b) t -> 'a -> 'a -> unit;; +val find_empty_or_eldest : ('a, 'b) t -> int;; +val add : ('a, 'b) t -> 'a -> 'b -> ('b -> unit) -> unit;; diff -Nru camlimages-3.0.1/examples/liv-furuse/.cvsignore camlimages-4.0.1/examples/liv-furuse/.cvsignore --- camlimages-3.0.1/examples/liv-furuse/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,6 @@ +liv +liv.byt +.xvpics + +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/liv-furuse/deficon.ml camlimages-4.0.1/examples/liv-furuse/deficon.ml --- camlimages-3.0.1/examples/liv-furuse/deficon.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/deficon.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,70 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: deficon.ml,v 1.2 2004/09/21 18:15:43 weis Exp $ *) + +let data = [| + "48 48 5 1"; + " c None"; + ". c #514451445144"; + "X c #EFBEEFBEEFBE"; + "o c #000000000000"; + "O c #9E79A2899E79"; + " "; + " "; + " .......................................... "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXX.oXo...XX.XXXOooooo.XXXX..X....XXXXXXooo "; + " .XXXXXXXXXXXXXXOoo.OO.oooOXXXXXXXXXXXXXXXooo "; + " .XXX....o..XXXOo.XXXXXOoooOXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXX.oXXXXXXX.oooXXXXXXXXXXXXXXooo "; + " .XXX.....X..XXoo.XX..XXOooo.XX..o......XXooo "; + " .XXXXXXXXXXXXXoooXXXXXXXooooXXXXXXXXXXXXXooo "; + " .XXXXXX..o..XXoooXX...XXooooXX..XX.XXXXXXooo "; + " .XXXXXXXXXXXXX.o.XXXXXXXooooXXXXXXXXXXXXXooo "; + " .XXX.o..o...oXXXXXX.X.XXooo.XX..X....XXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXOoooXXXXXXXXXXXXXXooo "; + " .XXX..X...X......o...XX.oo.XXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXoooXXXXXXXXXXXXXXXooo "; + " .XXXo......X.XXX..XXXXOooOXX...X.....XXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXoo.XXXXXXXXXXXXXXXXooo "; + " .XXXo.X...o.Xo.....XXOooXX........XXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXooOXXXXXXXXXXXXXXXXXooo "; + " .XXX...o..........XXXooXX.o..X..oX..o..XXooo "; + " .XXXXXXXXXXXXXXXXXXXOoOXXXXXXXXXXXXXXXXXXooo "; + " .XXX...o......XX..XXooXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXoOXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXX..X..o..XXoXXX..o.XXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXX..o....o..X..XXXXXXX..o....XX...XXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXoo..X......oXXOoooOXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXoooooXXXXXXXXXXXXXXXXXXooo "; + " .XXX...X.o...X..XXoooooXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXoooooXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXX..o.X.XXOoooOXX...X.o.....XXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXoX..o...o....XXXXXXX..X...X...o...XXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo "; + " .ooooooooooooooooooooooooooooooooooooooooooo "; + " ooooooooooooooooooooooooooooooooooooooooooo "; + " oooooooooooooooooooooooooooooooooooooooooo "; + " "; + " "; +|];; diff -Nru camlimages-3.0.1/examples/liv-furuse/.depend camlimages-4.0.1/examples/liv-furuse/.depend --- camlimages-3.0.1/examples/liv-furuse/.depend 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/.depend 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,38 @@ +deficon.cmo: +deficon.cmx: +mylazy.cmo: mylazy.cmi +mylazy.cmx: mylazy.cmi +cache.cmo: cache.cmi +cache.cmx: cache.cmi +livmisc.cmo: +livmisc.cmx: +gui.cmo: +gui.cmx: +jWidget.cmo: gui.cmo +jWidget.cmx: gui.cmx +seq.cmo: +seq.cmx: +tout.cmo: livmisc.cmo +tout.cmx: livmisc.cmx +enhance.cmo: +enhance.cmx: +viewer.cmo: gui.cmo +viewer.cmx: gui.cmx +edge.cmo: +edge.cmx: +pathfind.cmo: +pathfind.cmx: +iconcap.cmo: pathfind.cmo livmisc.cmo +iconcap.cmx: pathfind.cmx livmisc.cmx +livshtype.cmo: livmisc.cmo livshtype.cmi +livshtype.cmx: livmisc.cmx livshtype.cmi +icon.cmo: pathfind.cmo livshtype.cmi iconcap.cmo gui.cmo +icon.cmx: pathfind.cmx livshtype.cmx iconcap.cmx gui.cmx +livsh.cmo: seq.cmo pathfind.cmo mylazy.cmi livshtype.cmi livmisc.cmo \ + jWidget.cmo icon.cmo gui.cmo deficon.cmo +livsh.cmx: seq.cmx pathfind.cmx mylazy.cmx livshtype.cmx livmisc.cmx \ + jWidget.cmx icon.cmx gui.cmx deficon.cmx +scandir.cmo: +scandir.cmx: +jpf.cmo: +jpf.cmx: diff -Nru camlimages-3.0.1/examples/liv-furuse/display.ml camlimages-4.0.1/examples/liv-furuse/display.ml --- camlimages-3.0.1/examples/liv-furuse/display.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/display.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,456 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: display.ml,v 1.36 2008/06/16 22:35:42 furuse Exp $ *) + +open Livmisc;; +open Color;; +open Gui;; +open Tout;; + +open Gdk;; +open GDraw;; +open GMain;; + +type filter = [ `SIZE of int * int * [ `ATMOST | `ATLEAST | `NOASPECT ] ];; + +let current_filters = (ref [] : filter list ref);; + +let add_size w h = + List.fold_right + (fun x st -> + match x with + | `SIZE _ -> st + | _ -> x :: st) + !current_filters [`SIZE (w,h,`NOASPECT)];; + +let forward_redisplay = ref (fun _ -> ());; + +module WINDOW = struct + + let prev = ref (-1,-1) + + let pixmap = ref None + + let set_pixmap pix = + begin match !pixmap with + | None -> () + | Some pix -> Gdk.Pixmap.destroy pix + end; + pixmap := Some pix + + let display pixbuf = + let width = GdkPixbuf.get_width pixbuf in + let height = GdkPixbuf.get_height pixbuf in + let pixmap = Gdk.Pixmap.create ~window:window#misc#window ~width ~height () in + GdkPixbuf.render_to_drawable pixmap pixbuf; + prev := (width, height); + prog#set_format_string "done"; +<<<<<<< display.ml + sync (); + prog#unmap (); + +======= + sync (); + prog#unmap (); +>>>>>>> 1.36 + (* Resizing window *) + (* Changes from gtk1.2 to 2.0: + It is no longer permissable to draw directly on an arbitrary + widget, or to set an arbitrary widget's background pixmap. If + you need to do that, use a GtkDrawingArea or (for a toplevel) a + GtkWindow where gtk_widget_set_app_paintable() has been called. *) +<<<<<<< display.ml + + (* Format.eprintf "resizing %d %d@." ximage#width ximage#height; *) + drawing#resize ~width: ximage#width ~height: ximage#height; + + +======= + (* Format.eprintf "resizing %d %d@." ximage#width ximage#height; *) + drawing#resize ~width ~height; +>>>>>>> 1.36 + Gdk.Window.set_back_pixmap drawing#misc#window (`PIXMAP pixmap); + set_pixmap pixmap; + Gdk.Window.clear drawing#misc#window; + set_pixmap pixmap; + sync (); +<<<<<<< display.ml + +======= +>>>>>>> 1.36 + set_timeout () + +<<<<<<< display.ml + initializer + ignore (drawing#event#connect#configure ~callback: + (fun ev -> + let w = GdkEvent.Configure.width ev + and h = GdkEvent.Configure.height ev in + let rec f w h = + if (w, h) <> prev then begin + !forward_redisplay (add_size w h); + end; + let w', h' = Drawable.get_size drawing#misc#window in + if (w', h') <> (w, h) then f w' h' + in + f w h; + false)) +end;; +======= + let init () = + ignore (drawing#event#connect#configure ~callback: + (fun ev -> + let w = GdkEvent.Configure.width ev + and h = GdkEvent.Configure.height ev in + let rec f w h = + if (w, h) <> !prev then begin + !forward_redisplay (add_size w h); + end; + let w', h' = Drawable.get_size drawing#misc#window in + if (w', h') <> (w, h) then f w' h' + in + f w h; + false)) +end + +module ROOT = struct + + type root_geom = { + width : int; + height : int; + xdest : int; + xsrc : int; + ydest : int; + ysrc : int; + put_width : int; + put_height : int; + };; + + let root_geom width height x y = + let width0 = width in + let height0 = height in + let xdest0 = if x < 0 then 0 else x in + let xsrc0 = if x < 0 then -x else 0 in + let put_width0 = + if x + width0 > screen_width then screen_width - xdest0 + else x + width0 - xdest0 in + let ydest0 = if y < 0 then 0 else y in + let ysrc0 = if y < 0 then -y else 0 in + let put_height0 = + if y + height0 > screen_height then screen_height - ydest0 + else y + height0 - ydest0 in + { width= width0; + height= height0; + xdest= xdest0; + ydest= ydest0; + xsrc= xsrc0; + ysrc= ysrc0; + put_width= put_width0; + put_height= put_height0; + } +>>>>>>> 1.36 + + let root_pixmap = lazy ( + let pix = + GDraw.pixmap ~window + ~width: screen_width + ~height: screen_height () + in + pix#set_foreground `BLACK; + pix#rectangle + ~x:0 ~y:0 ~width: screen_width ~height: screen_height ~filled: true (); + pix#pixmap ) + + let display_at pixbuf x y = + let geom = root_geom (GdkPixbuf.get_width pixbuf) (GdkPixbuf.get_height pixbuf) x y in + GdkPixbuf.render_to_drawable !!root_pixmap ~dest_x: geom.xdest ~dest_y: geom.ydest pixbuf; + Window.set_back_pixmap root_win (`PIXMAP(!!root_pixmap)); + Window.clear root_win; + set_timeout () + +end;; + +let working = ref (None : (int * OImages.rgb24 * filter list) option);; +let waiting = ref None;; +let check_waiting () = if !waiting <> None then raise Exit;; + +type root_mode = [ `NONE | `CENTER | `RANDOM ];; +type transition = [ `NONE | `MYST | `TRANSPARENT ];; +let root_mode = ref (`NONE : root_mode);; +let transition = ref (`NONE : transition);; + +let root_prev_pos = ref None;; + +let display_pixbuf pixbuf = + match !root_mode with + | `CENTER | `RANDOM -> + let width = GdkPixbuf.get_width pixbuf + and height = GdkPixbuf.get_height pixbuf in + let x, y = + let w = screen_width - width + and h = screen_height - height in + match !root_mode with + | `RANDOM -> + let w = screen_width - width + and h = screen_height - height in + + let overwrap x y = + match !root_prev_pos with + | None -> 0 + | Some (pw, ph, px, py) -> + let w = min (x + w - 1) (px + pw - 1) - max x px in + let h = min (y + h - 1) (py + ph - 1) - max y py in + if w < 0 || h < 0 then 0 else w * h in + + let random_x_y () = + let x = if w <= 0 then w / 2 else Random.int w + and y = if h <= 0 then h / 2 else Random.int h in + (x, y), overwrap x y in + + let min = ref (random_x_y ()) in + for i = 0 to 5 do + let (x, y), over = random_x_y () in + if snd !min > over then min := (x, y), over + done; + let x, y = fst !min in + root_prev_pos := Some (w, h, x, y); + x, y + | _ -> w/2, h/2 in + ROOT.display_at pixbuf x y + | _ -> WINDOW.display pixbuf;; + +let sort_filters (filters : filter list) = + let rec get_size = function + | [] -> [] + | `SIZE x :: _ -> [`SIZE x] + | _ :: xs -> get_size xs in +(* + let rec get_normalize = function + | [] -> [] + | `NORMALIZE :: _ -> [`NORMALIZE] + | _ :: xs -> get_normalize xs in + let rec get_enhance = function + | [] -> [] + | `ENHANCE :: _ -> [`ENHANCE] + | _ :: xs -> get_enhance xs in +*) + List.flatten [(*get_enhance filters; get_normalize filters; *)get_size filters];; + +let resize w h cond old = + let old_width = GdkPixbuf.get_width old in + let old_height = GdkPixbuf.get_height old in + let xmag,ymag = + let xmag = float w /. float old_width + and ymag = float h /. float old_height in + + let xmag,ymag = + match cond with + | `ATMOST -> + let mag = if xmag > ymag then ymag else xmag in + if mag > 1.0 then 1.0, 1.0 else mag, mag + | `ATLEAST -> + let mag = if xmag > ymag then xmag else ymag in + if mag < 1.0 then 1.0, 1.0 else mag, mag + | `NOASPECT -> xmag, ymag in + + let nw = truncate (float old_width *. xmag) + and nh = truncate (float old_height *. ymag) in + + if nw > fst root_size || nh > snd root_size then + let xmag = float (fst root_size) /. float old_width + and ymag = float (snd root_size) /. float old_height in + match cond with + | `NOASPECT -> xmag, ymag + | _ -> if xmag > ymag then ymag, ymag else xmag, xmag + else xmag, ymag in + + if xmag = 1.0 && ymag = 1.0 then old else + +<<<<<<< display.ml + let nw = truncate (float old#width *. xmag) + and nh = truncate (float old#height *. ymag) in + prog#map (); +======= + let nw = truncate (float old_width *. xmag) + and nh = truncate (float old_height *. ymag) in + prog#map (); +>>>>>>> 1.36 + + let fmts = + if xmag > 1.0 && ymag > 1.0 then + Printf.sprintf "enlarging to %dx%d" nw nh else + if xmag < 1.0 && ymag < 1.0 then + Printf.sprintf "reducing to %dx%d" nw nh + else + Printf.sprintf "resizing to %dx%d" nw nh in + + prog#set_format_string fmts; +<<<<<<< display.ml + old#resize + (Some (fun f -> prog#set_fraction f; check_waiting ())) + nw nh;; + +let get_hist img = + prog#map (); + prog#set_format_string "histgram"; + + let hist = Colorhist.create () in + + let width = img#width in + let height = img#height in + let f_height = float height in + + for y = 0 to height - 1 do + check_waiting (); + for x = 0 to width - 1 do + Colorhist.store_sample hist (img#unsafe_get x y) + done; + prog#set_fraction (float (y + 1) /. f_height) + done; + hist;; + +let normalize img = + let hist = get_hist img in + let normalizer = Colorhist.normalize 0.95 hist in + + prog#map (); + prog#set_format_string "normalizing..."; + + let width = img#width + and height = img#height in + let f_height = float height in + let img' = new OImages.rgb24 width height in + + for y = 0 to height - 1 do + check_waiting (); + for x = 0 to width - 1 do + let rgb = img#unsafe_get x y in + let new_rgb = normalizer rgb in + img'#unsafe_set x y new_rgb; + done; + prog#set_fraction (float (y+1) /. f_height) + done; + img';; + +let enhance img = + let hist = get_hist img in + let log, enhancer = Enhance.enhance 0.90 hist in + + prog#map (); + prog#set_format_string "enhancing..."; + + let width = img#width + and height = img#height in + let f_height = float height in + let img' = new OImages.rgb24 width height in + + for y = 0 to height - 1 do + check_waiting (); + for x = 0 to width - 1 do + let rgb = img#unsafe_get x y in + let new_rgb = enhancer rgb in + img'#unsafe_set x y new_rgb; + done; + prog#set_fraction (float (y+1) /. f_height) + done; + img';; +======= +>>>>>>> 1.36 + + if nw <> old_width || nh <> old_height then begin + (* original pixbuf will be GC'ed automatically *) + let pixbuf' = GdkPixbuf.create ~width: nw ~height: nh () in + GdkPixbuf.scale + ~dest: pixbuf' ~dest_x: 0 ~dest_y: 0 ~width: nw ~height: nh + ~ofs_x: 0. ~ofs_y: 0. ~scale_x: (float nw /. float old_width) ~scale_y: (float nh /. float old_height) + ~interp: `HYPER old; + pixbuf' + end else old + +let create_pixbuf (id : int) image filters = + let pixbuf = Imagegdk.to_pixbuf image in + let filters = sort_filters filters in +<<<<<<< display.ml + let ximage = + try + let ximage = Cache.find xcache (id, filters) in + Cache.add cache (id, filters) image; + ximage + with + | Not_found -> + let rec get_image filters = + try Cache.find cache (id, filters) with + | Not_found -> + match filters with + | [] -> image + | `SIZE (w, h, cond) :: fs -> resize w h cond (get_image fs) + | `NORMALIZE :: fs -> normalize (get_image fs) + | `ENHANCE :: fs -> enhance (get_image fs) in + let image = get_image filters in + Cache.add cache (id, filters) image; + prog#map (); + prog#set_format_string "mapping"; + OXimage2.of_image visual (Some prog#set_fraction) image#coerce in + + Cache.add xcache (id, filters) ximage; + ximage;; +======= + let rec filter_pixbuf pixbuf = function + | [] -> pixbuf + | `SIZE (w, h, cond) :: fs -> + (* original pixbuf will be GC'ed automatically *) + resize w h cond pixbuf + in + filter_pixbuf pixbuf filters +;; +>>>>>>> 1.36 + +let current = ref None;; + +let rec display id image filters = + let start_waiting () = + match !waiting with + | Some (id, image, filters) -> + prerr_endline "aborted!"; + waiting := None; + display id image filters + | None -> () + in + + if !working <> None then begin + (* we store it at waiting *) + (* hoping working process may find it and move to it *) + prerr_endline "try to abort"; + waiting := Some (id, image, filters); + end else begin + try + working := Some (id, image, filters); + (* XIMAGE let ximage = ximage_of_image id image filters in *) + let pixbuf = create_pixbuf id image#coerce filters in + current := Some (id, image); + current_filters := filters; + display_pixbuf pixbuf; + working := None; + start_waiting () + with + | Exit -> (* abort! *) + working := None; + start_waiting () + end;; + +let redisplay new_filters = + match !current with + | Some (id, image) -> display id image new_filters + | None -> ();; + +forward_redisplay := redisplay;; diff -Nru camlimages-3.0.1/examples/liv-furuse/edge.ml camlimages-4.0.1/examples/liv-furuse/edge.ml --- camlimages-3.0.1/examples/liv-furuse/edge.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/edge.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,72 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: edge.ml,v 1.12 2006/01/13 14:18:16 rousse Exp $ *) + +open Images;; +open OImages;; + +let edge (bmp : index8) = + let width = bmp#width in + let height = bmp#height in + + let rgb24 = new rgb24 width height in + + let cmap = bmp#colormap.map in + + let cc x y = + let center = cmap.(bmp#get x y) in + let points = + Array.init 3 + (fun dx -> + Array.init 3 + (fun dy -> + try cmap.(bmp#get (x + dx - 1) (y + dy - 1)) with + | Out_of_image -> center)) in + + let r = ref 0 + and g = ref 0 + and b = ref 0 in + + let diff = ref 0 in + + let add dx dy w = + let rgb = points.(dx + 1).(dy + 1) in + r := !r + rgb.r * w; + g := !g + rgb.g * w; + b := !b + rgb.b * w; + let dr = center.r - rgb.r + and dg = center.g - rgb.g + and db = center.b - rgb.b in + diff := !diff + truncate (sqrt (float (dr * dr + dg * dg + db * db))) in + add (-1) 0 1; + add 1 0 1; + add 0 (-1) 1; + add 0 1 1; + add (-1) (-1) 1; + add 1 (-1) 1; + add (-1) 1 1; + add 1 1 1; + + let cw = + (* diff = 0 ----- 3 + diff = 3528 ----- 10 *) + !diff / 300 + 3 in + add 0 0 cw; + let sw = cw + 8 in + {r = !r / sw; g = !g / sw; b = !b / sw} in + + for x = 0 to width -1 do + for y = 0 to height -1 do rgb24#unsafe_set x y (cc x y) done + done; + rgb24;; + diff -Nru camlimages-3.0.1/examples/liv-furuse/enhance.ml camlimages-4.0.1/examples/liv-furuse/enhance.ml --- camlimages-3.0.1/examples/liv-furuse/enhance.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/enhance.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,84 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: enhance.ml,v 1.5 2004/09/24 10:55:06 weis Exp $ *) + +open Images;; +open Colorhist;; + +let make_id_rgb rgb = rgb;; + +let enhance keep t = + let total = total_samples t in + if total = 0 then raise (Failure "histgram is empty"); + let cut_samples = truncate ((float total) *. (1.0 -. keep) /. 2.0) in + + let rec find_limit update sum b = + let sum = sum + t.(b) in + if sum > cut_samples then b + else find_limit update sum (update b) in + + let min = find_limit ((+) 1) 0 0 + and max = find_limit ((+) (-1)) 0 255 in + + if max <= min then 1.0, make_id_rgb else begin + let average = + let samples = ref 0 in + let sum = ref 0 in + for i = min to max do + sum := !sum + t.(i) * (i - min); + samples := !samples + t.(i) + done; + float !sum /. float !samples /. (float (max - min)) in + + let logmax = 1.0 /. 0.5 in + let logmin = 1.0 /. 2.0 in + + (* average will go near 0.65 *) + let log = log 0.65 /. log average in + let log = + if logmax < log then logmax else + if logmin > log then logmin else log in + + prerr_endline + (Printf.sprintf + "average=%f gamma=%f min=%d max=%d" + (average *. 255.0) (1.0 /. log) min max); + + let div = 2 in + + let make_elem x = + if x < min then x / div else + if x > max then 255 - (255 - x) / div else + let x' = + if x - min < (max - min) / 2 + then x / div + else 255 - (255 - x) / div in + let pow = + float (abs (x - min - (max - min) / 2)) /. float ((max - min) / 2) in + let pow = pow *. pow in + let len = float (max - min) in + let newlen = float (255 - min / div - (255 - max) / div) in + let x'' = + truncate (((float (x - min) /. len) ** log) *. newlen) + min / div in + int_of_float (float x' *. pow +. float x'' *. (1.0 -. pow) ) in + let table = Array.init 256 make_elem in + + let make_table_rgb rgb = { + r = table.(rgb.r); + g = table.(rgb.g); + b = table.(rgb.b); + } in + + log, make_table_rgb + end;; + Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/examples/liv-furuse/faceanm.gif and /tmp/rguOvHQvP7/camlimages-4.0.1/examples/liv-furuse/faceanm.gif differ diff -Nru camlimages-3.0.1/examples/liv-furuse/FilesLink.xpm camlimages-4.0.1/examples/liv-furuse/FilesLink.xpm --- camlimages-3.0.1/examples/liv-furuse/FilesLink.xpm 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/FilesLink.xpm 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,87 @@ +/* XPM */ +static char * FilesLink_xpm[] = { +"48 48 36 1", +" c None", +". c #FFFFFBEEFFFF", +"X c #000000000000", +"o c #F7DEEFBEEFBE", +"O c #514451445144", +"+ c #A6999E799E79", +"@ c #38E341034103", +"# c #965892489658", +"$ c #69A66DB669A6", +"% c #71C679E779E7", +"& c #79E782078E38", +"* c #79E7820779E7", +"= c #61855D755144", +"- c #71C67DF771C6", +"; c #79E78A288617", +": c #CF3C82075144", +"> c #208120812081", +", c #86178A288E38", +"< c #28A22CB228A2", +"1 c #DF7D618538E3", +"2 c #79E779E78617", +"3 c #965896589658", +"4 c #FFFFFBEEEFBE", +"5 c #8E388A289658", +"6 c #08200C300820", +"7 c #F7DE49241040", +"8 c #965892488E38", +"9 c #8E3892489658", +"0 c #492449244924", +"q c #49244D344924", +"w c #861782078617", +"e c #8E3886178617", +"r c #8E3882078617", +"t c #861775D671C6", +"y c #410345144924", +"u c #861779E78617", +" ", +" ", +" ", +" .........................X ", +" .........................X ", +" .........................X ", +" .o.XXOOXXO+OOXX++XO......X@..............X ", +" .........................X@..............XO ", +" ...X+XOXXOXOOXXOXXXOO....X#. ..XO ", +" .........................X$..........X...XO ", +" ...XOOXXXOXXOX+XOOXXO....X$..........X%..XO ", +" .........................X$..........X%..XO ", +" ...XXXX+XOOXXOX+XOXO+....XX++XO......X&..XO ", +" .........................X$..........X%..XO ", +" ...XXOXXXXOXXX+XXOXOX....XXOXXXOO....X&..XO ", +" .........................X%..........X*..XO ", +" ...XXXOOXO==X+XXXXOO+....X=XOOXXO....X&..XO ", +" ............=$...........X-..........X;..XO ", +" ...X+XOX=::::>X+XOXXX....XX+XOXO+....X,..X= ", +" .........:::::<*.........X&..........X;..X= ", +" ...XOX=::::::11XXXOX+....X=XXOXOX....X,..XO ", +" ......2::::::111X>.......X%..........X,..XO ", +" ...XOX+>:::11:111XX3.OX.4XXXXXOO+....X5..XO ", +" .......$>:::111111X>56X..X%..........X,..XO ", +" ...XXXOXX<1111111776X7X..XX+XOXXX....X5..X= ", +" ........5X1177777777X..XXOXXOX+....X#..XO ", +" ..........$>X777777777X..X-..........X#..XO ", +" ...XXOOX+X+X#$%t%XXXX c #30C200004103", +", c #2081000030C2", +"< c #208100002081", +"1 c #104000001040", +" ", +" ", +" .......................................... ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOXOOOOXXOOOOOXOOOOOXOOOOOXOOOOXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOOOOOOXOOXOOOOOOOOOOXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOOOOXOOOOOOOOOOOXOOOOOOOOOOOOOOOOOXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXOOOOOOOOOOXOOOOOOOOOXOOOOXXOXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOOOOOOOOOOOOOOOXOOOOOOOOOOOXOOOOXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOXOOOXOOOOOOOOOO+XOOOOXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOOOOO@XOXXXOOXXOOOOOOOOOOOXOOOOOXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOXOOOOOXOOOOOXOOOOOOOOOOOOOOOXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOOOOOOOOOOOOOOOOOOXOOOOOXOOOXOOOOOXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXX#$%&#$%&#$XX#$XXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXX*=X-*=*-*=*-X=*-*=XXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOOOOOOOOOXOOOOOOOOOOOOOOO;XXOOOXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXX:>:>X>:>:>:>XXXOOOXXXXXXXXXXXXXXXXXXXooo ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ", +" .XXXOOOXOOOOOXOOOOOOX, c #EFBEEBADCF3C", +", c #5144410330C2", +"< c #9E7971C65144", +"1 c #9E798A288E38", +"2 c #30C230C230C2", +"3 c #514451445144", +"4 c #CF3CCB2BBEFB", +"5 c #8E3861855144", +"6 c #6185410330C2", +"7 c #AEBA9A696185", +"8 c #71C6618571C6", +"9 c #CF3CBAEAAEBA", +"0 c #514441034103", +"q c #618561856185", +"w c #96588A289658", +"e c #9E7961855144", +"r c #AEBABAEAAEBA", +"t c #514451444103", +"y c #CF3C82075144", +"u c #208120812081", +"i c #000000000000", +"p c #EFBEDB6CDF7D", +"a c #AEBAAAAA9E79", +"s c #28A228A228A2", +"d c #DF7D618538E3", +"f c #410330C22081", +"g c #69A66DB669A6", +"h c #410320812081", +"j c #104010400000", +"k c #104010401040", +"l c #104010402081", +"z c #082008200820", +"x c #208110401040", +"c c #F7DE49241040", +"v c #4103410330C2", +"b c #9E79618571C6", +"n c #618559655144", +"m c #30C220811040", +"M c #30C210401040", +"N c #71C6410330C2", +"B c #410341034103", +"V c #9E799A698E38", +"C c #8E388A288E38", +"Z c #492449244924", +"A c #8E3841034103", +"S c #DF7DBAEABEFB", +"D c #30C230C21040", +"F c #104000001040", +" .XoO+ ", +" @#X.$%&O ", +" .Xo$O*%O=- ", +" @oX.$%*%%$%; ", +" .Xo$.*%*%%%$$: ", +" @#X.$%*=*%%O$.$: ", +" >#$&,=$O*%<=*%%OOO$$: ", +" >=1o>.23*=&=*O%O$O$OO: ", +" 4Xo$.>5655**%O%OOO%7O: ", +" @#X.$%*=$:&<<%%%%%%%*%O: ", +" .Xo$O*%555.:<*%*%*%***%*%;8 ", +" @oX.$%*=&=5<9:*%*%*******%70q ", +" .Xo$.*%55555=*9:*<*<*<******O50 ", +" @#X9$%*=&5&5&<=<4:<<<<<<****7O$12w ", +" .Xo9O*%55---5555=<9:e<=<*<****%OO$-& ", +" roX9$%*=&&t&t5&5&5<54:#$*<5&----5&5&yyyui:e,iih>0t-t-t-tyyyyyydddi<<<***%*6j0u#606-6-t-uyyyddydddii<***5-fh6: ", +"p,k&l>0,000t-t&uyyyddddddiuwz-;20&5u ", +">0j5x#,0606-t--isdddddddcczici6-55*h ", +">,x&x>0,0,0t-t&&sidddcccccccci5&***: ", +">6x=x#;;,6606--5&uiddcccccccci<****h ", +"p,l=x>;v;,0,0t--5&uiccccccccci*<*<*: ", +">0ubx#;;;;,6606----siccccccccz,l1x9-,;v;,0,0t&2:ngiccccccci<<***: ", +">6m1uO<;,;;;,6,;mMf6iiccccccci<***NhBq ", +"p,:V:*%,;v;,;2:u2,06icccccccci*<50iuBqq ", +">0:O:5%;;;f;mlf;60&5ziiiiiiiiz50iiuBBqCC", +">,:ah2O,;2:uhv0t5&5&5$:5e6h+mh50x:f;,6-A-A-55O:e5e-0iiuBBBqqqCC ", +"p,:@huluh2;,----&&5&5$:<52iiuBBBqqqCC ", +">0m.;;f;;;6------5&55%:6iiuBBBqqqCC ", +">,:40,;v0t0t-t--&&5&&7iiuBBBqqqCC ", +">6uS60606-6-6-----6hDAiBBBqqqCC ", +"p,l40,0,000t---t0:ii2i2BqqqCC ", +">0x466,06-6---6hiiuBBBqqqCC ", +">,k#;,060t-60:iiuBBBqqqCC ", +">6j#,66-606hiiuBBBqqqCC ", +"p,F>000,0:iiuBBBqqqCC ", +"+0i#6-,hiiuBBBqqqCC ", +";uia;:iiuBBBqqqCC ", +" ;;iiiuBBBqqqCC ", +" qBBBqBqqqqCC ", +" qqqCqCCC "}; diff -Nru camlimages-3.0.1/examples/liv-furuse/Folder.xpm camlimages-4.0.1/examples/liv-furuse/Folder.xpm --- camlimages-3.0.1/examples/liv-furuse/Folder.xpm 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/Folder.xpm 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,107 @@ +/* XPM */ +static char * Folder_xpm[] = { +"40 47 57 1", +" c None", +". c #BEFBAAAAAEBA", +"X c #EFBEDF7D9E79", +"o c #FFFFCF3CAEBA", +"O c #BEFB9A698E38", +"+ c #AEBA9A699E79", +"@ c #BEFBBAEAAEBA", +"# c #DF7DDF7DCF3C", +"$ c #BEFBAAAA8E38", +"% c #AEBA8A2871C6", +"& c #71C665955144", +"* c #AEBA8A286185", +"= c #8E3865956185", +"- c #71C645144103", +"; c #514430C230C2", +": c #30C220812081", +"> c #EFBEEFBECF3C", +", c #5144451430C2", +"< c #9E7975D65144", +"1 c #9E798A288E38", +"2 c #30C230C230C2", +"3 c #514455555144", +"4 c #CF3CCF3CBEFB", +"5 c #8E3865955144", +"6 c #6185451430C2", +"7 c #AEBA9A696185", +"8 c #71C6659571C6", +"9 c #CF3CBAEAAEBA", +"0 c #514445144103", +"q c #618565956185", +"w c #9E798A289E79", +"e c #9E7965955144", +"r c #AEBABAEAAEBA", +"t c #514455554103", +"y c #EFBEDF7DDF7D", +"u c #AEBAAAAA9E79", +"i c #000000000000", +"p c #410330C22081", +"a c #71C675D671C6", +"s c #410320812081", +"d c #208120812081", +"f c #104010400000", +"g c #104010401040", +"h c #104010402081", +"j c #208110401040", +"k c #8E3845144103", +"l c #4103451430C2", +"z c #9E79659571C6", +"x c #30C220811040", +"c c #30C210401040", +"v c #71C6451430C2", +"b c #410345144103", +"n c #9E799A698E38", +"m c #8E388A288E38", +"M c #DF7DBAEABEFB", +"N c #30C230C21040", +"B c #104000001040", +" .XoO+ ", +" @#X.$%&O ", +" .Xo$O*%O=- ", +" @oX.$%*%%$%; ", +" .Xo$.*%*%%%$$: ", +" @#X.$%*=*%%O$.$: ", +" >#$&,=$O*%<=*%%OOO$$: ", +" >=1o>.23*=&=*O%O$O$OO: ", +" 4Xo$.>5655**%O%OOO%7O: ", +" @#X.$%*=$:&<<%%%%%%%*%O: ", +" .Xo$O*%555.:<*%*%*%***%*%;8 ", +" @oX.$%*=&=5<9:*%*%*******%70q ", +" .Xo$.*%55555=*9:*<*<*<******O50 ", +" @#X9$%*=&5&5&<=<4:<<<<<<****7O$12w ", +" .Xo9O*%55---5555=<9:e<=<*<****%OO$-& ", +" roX9$%*=&&t&t5&5&5<54:#$*<5&----5&5&5555o:e,iis>0t-t-t-t&-&&5&5>:%<<<***%*6f0d#606-6-t----555,#i#<*<***5-ps6: ", +"y,g&h>0,000t-t&-&&55:i0f5j#,0606-t--5&55e,#:=<<5-:s6-55*s ", +">,j&j>0,0,0t-t&&5&5<<#:<5,s20t5&***: ", +">6j=j#;;,6606--5&55e5o:0::,-&k<****s ", +"y,h=j>;l;,0,0t--5&5&&4::;t-&<<*<*<*: ", +">0dzj#;;;;,6606----0:9d6--,h1j9-,;l;,0,0t&2:d24:te<=<<<<<***: ", +">6x1dO<;,;;;,6,;xcp669:e5eee0:O:5%;;;p;xhp;60&55.:e5e,:us2O,;2:dsl0t5&5&5$:5e<=<5,iidbbbqqm ", +">6s+xs50j:p;,6-k-k-55O:e5e-0iidbbbqqqmm ", +"y,:@sdhds2;,----&&5&5$:<52iidbbbqqqmm ", +">0x.;;p;;;6------5&55%:6iidbbbqqqmm ", +">,:40,;l0t0t-t--&&5&&7iidbbbqqqmm ", +">6dM60606-6-6-----6sNkibbbqqqmm ", +"y,h40,0,000t---t0:ii2i2bqqqmm ", +">0j466,06-6---6siidbbbqqqmm ", +">,g#;,060t-60:iidbbbqqqmm ", +">6f#,66-606siidbbbqqqmm ", +"y,B>000,0:iidbbbqqqmm ", +"+0i#6-,siidbbbqqqmm ", +";diu;:iidbbbqqqmm ", +" ;;iiidbbbqqqmm ", +" qbbbqbqqqqmm ", +" qqqmqmmm "}; diff -Nru camlimages-3.0.1/examples/liv-furuse/gui.ml camlimages-4.0.1/examples/liv-furuse/gui.ml --- camlimages-3.0.1/examples/liv-furuse/gui.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/gui.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,148 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: gui.ml,v 1.27 2008/02/19 12:44:04 furuse Exp $ *) + +open Gdk;; +open GDraw;; +open GMain;; + +GMain.Main.init ();; + +let active = ref true;; + +let sync () = while Glib.Main.iteration false do () done;; + +(* let window = GWindow.window ~title: "liv" ~allow_shrink: true ~allow_grow: true ();; *) +let window = GWindow.window ~title: "liv" ();; +(* We should not set allow_shrink and allow_grow here. *) + +window#connect#destroy ~callback:Main.quit;; +window#misc#set_size_request ~width: 1 ~height: 1 ();; +window#resize ~width: 1 ~height: 1;; +window#misc#set_app_paintable true;; + +let drawing = window + +let fixed = GPack.fixed ~packing: window#add ~show: true ();; + +(* +let drawing = + GMisc.drawing_area + ~width:150 ~height:150 + ~packing: window#add ~show:true ();; +*) + +(* let fixed = GPack.fixed ~packing: box#add ();; *) + +(* +window#event#connect#configure (fun ev -> + prerr_endline (Printf.sprintf "Configure %dx%d+%d+%d" + (GdkEvent.Configure.width ev) + (GdkEvent.Configure.height ev) + (GdkEvent.Configure.x ev) + (GdkEvent.Configure.y ev)); + false (* continue configure event handling *)) +*) + +class new_progress_bar obj = object + inherit GRange.progress_bar obj as super + val mutable previous = 0.0 + method set_fraction x = + let x = floor (x *. 10.0) /. 10.0 in + if x <> previous then begin + super#set_fraction x; sync (); previous <- x + end +end;; + +let new_progress_bar = + GtkRange.ProgressBar.make_params [] + ~cont:(fun pl ?packing ?show () -> + GObj.pack_return + (new new_progress_bar (GtkRange.ProgressBar.create pl)) + ~packing ~show);; + +let prog_on_image = true + +class prog_nop = object + method map () = () + method unmap () = () + method set_text (s : string) = () + method set_fraction (s : float) = () +end + +class prog (p : GRange.progress_bar) = object + method map () = fixed#misc#map () + method unmap () = fixed#misc#unmap () + method set_text = p#set_text + method set_fraction = p#set_fraction +end + +let prog1 = + if prog_on_image then + let p = + new_progress_bar ~packing: (fixed#put ~x:0 ~y:0) () + in + new prog p + else (new prog_nop :> prog) +;; + +let visual = window#misc#visual;; +let screen_width = Screen.width ();; +let screen_height = Screen.height ();; +let colormap = Gdk.Color.get_system_colormap ();; + +let quick_color_create = Truecolor.color_creator visual;; +let quick_color_parser = Truecolor.color_parser visual;; + +let root_win = Window.root_parent ();; + +let root_size = Drawable.get_size root_win;; + +let drawing_root = new drawable root_win;; + +let infowindow = GWindow.window ~title:"liv info" ~width:300 ~height:150 ();; + +infowindow#misc#set_size_request ~width: 300 ~height: 150;; +infowindow#resize ~width: 300 ~height: 150;; +infowindow#connect#destroy ~callback:Main.quit;; + +let imglbox0 = GPack.vbox ~packing:infowindow#add ();; + +let imglbox = GPack.hbox ~packing:imglbox0#add ();; + +let sb = GRange.scrollbar `VERTICAL + ~packing:(imglbox#pack ~from:`END ~expand:false) ();; + +let imglist = + ((GList.clist ~shadow_type:`OUT + ~columns: 1 ~packing: imglbox#add ~vadjustment:sb#adjustment ()) + : string GList.clist);; + +imglist#misc#set_size_request ~width:300 ~height: 150;; + +let prog2 = GRange.progress_bar ~packing: (imglbox0#pack ~expand: false) ();; + +class progs = object + method map = prog1#map + method unmap = prog1#unmap + method set_format_string s = + prog1#set_text s; + prog2#set_text s + method set_fraction s = + prog1#set_fraction s; + prog2#set_fraction s +end;; + +let prog = new progs;; + +sync();; diff -Nru camlimages-3.0.1/examples/liv-furuse/iconcap camlimages-4.0.1/examples/liv-furuse/iconcap --- camlimages-3.0.1/examples/liv-furuse/iconcap 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/iconcap 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,22 @@ +# This is a sample "iconcap" file for lv. +# place this file in your $HOME/.lv directory + +#audio/mod; /usr/bin/mikmod %s +# audio/*; /usr/bin/play %s + +text/*; File.xpm +audio/*; sound.xpm +image/*; Monalisa.xpm +video/*; + +special/dir; Folder.xpm +special/lnkdir; FolderLink.xpm +special/lnk; FilesLink.xpm +special/*; BulletHole.xpm + +application/postscript; /usr/share/WindowMaker/Icons/ps.tiff +application/pdf; /usr/share/WindowMaker/Icons/pdf.tiff +application/x-dvi; /usr/share/WindowMaker/Icons/xdvi.xpm + +encoding/gzip; /usr/share/icons/filez.tif +encoding/compress; /usr/share/icons/filez.tif diff -Nru camlimages-3.0.1/examples/liv-furuse/iconcap.ml camlimages-4.0.1/examples/liv-furuse/iconcap.ml --- camlimages-3.0.1/examples/liv-furuse/iconcap.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/iconcap.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,53 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: iconcap.ml,v 1.16 2005/02/27 05:48:26 furuse Exp $ *) + +open Livmisc;; + +(* iconcap file parser *) + +let table = Hashtbl.create 107;; + +let load f = + let ic = open_in f in + try + while true do + let str = input_line ic in + if str <> "" && str.[0] <> '#' then + try + let pos = String.index str ';' in + let typ = remove_space (String.sub str 0 pos) in + let icon = + remove_space + (String.sub str (pos + 1) (String.length str - pos - 1)) in + let tokens = + Mstring.split_str (function '/' -> true | _ -> false) typ in + match tokens with + | [maj; min] -> + (* prerr_endline (Printf.sprintf "%s/%s => (%s)" maj min icon); *) + Hashtbl.add table (maj, min) icon + | _ -> assert false + with + | _ -> failwith (str ^ ": parse error") + done; + raise Exit + with + | End_of_file -> close_in ic;; + +try + load + (Pathfind.find + [ "."; "~/.liv"; "/usr/lib/liv"; "/usr/local/lib/liv"; ] + "iconcap") +with +| _ -> prerr_endline "no iconcap...";; diff -Nru camlimages-3.0.1/examples/liv-furuse/icon.ml camlimages-4.0.1/examples/liv-furuse/icon.ml --- camlimages-3.0.1/examples/liv-furuse/icon.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/icon.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,152 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: icon.ml,v 1.22 2004/09/24 10:55:07 weis Exp $ *) + +open Images;; +open OImages;; +open Livshtype;; +open Geometry;; +open Ximage2;; +open OXimage2;; + +let xvmode = ref false;; + +let mime_icons = Hashtbl.create 107;; + +let string_of_format = function + | Gif -> "GIF8x" + | Bmp -> "BMP" + | Tiff -> "TIFF" + | Jpeg -> "JPEG" + | Png -> "PNG" + | Xpm -> "XPM" + | Ppm -> "PPM" + | _ -> "???";; + +let thumb_path name = + Filename.concat + (Filename.concat + (Filename.dirname name) + (if !xvmode then ".xvpics" else ".livpics")) + (Filename.basename name);; + +let create_xvthumb name = + let thumbpath = thumb_path name in + let thumbdir = Filename.dirname thumbpath in + (* prerr_endline ("thumbdir: " ^ thumbdir); *) + if not (Sys.file_exists thumbdir) then Unix.mkdir thumbdir 0o755; + + let format, hdrs = Images.file_format name in + let w, h, img = + match format with + | Jpeg -> + OJpeg.load_thumbnail name [] + { spec_width = Pixel 80; spec_height = Pixel 60; + spec_aspect = Keep_at_most; spec_switch = Smaller_only; + spec_x = 0; spec_y = 0 } + | _ -> + let img = OImages.load name [] in + let w, h = img#width, img#height in + w, h, img in + + let thumb = OXvthumb.create img in + OXvthumb.save thumbpath + (Printf.sprintf + "%dx%d %s file (%d bytes)" w h (string_of_format format) + (Unix.lstat name).Unix.st_size) + thumb; + img#destroy; + thumb#destroy;; + +let create_livthumb name = + let thumbpath = thumb_path name in + let thumbdir = Filename.dirname thumbpath in + (* prerr_endline ("thumbdir: " ^ thumbdir); *) + if not (Sys.file_exists thumbdir) then Unix.mkdir thumbdir 0o755; + + let format, hdrs = Images.file_format name in + let w, h, img = + match format with + | Jpeg -> + OJpeg.load_thumbnail name [] + { spec_width = Pixel 80; spec_height = Pixel 60; + spec_aspect = Keep_at_most; spec_switch = Smaller_only; + spec_x = 0; spec_y = 0 } + | _ -> + let img = OImages.load name [] in + let w, h = img#width, img#height in + w, h, img in + + let ratiow = 80.0 /. float w in + let ratioh = 60.0 /. float h in + let ratio = if ratiow < ratioh then ratiow else ratioh in + let img = + let img = + match OImages.tag img with + | Index8 i -> i#to_rgb24 + | Index16 i -> i#to_rgb24 + | Rgb24 i -> i + | _ -> assert false in + img#resize None + (Pervasives.truncate (float w *. ratio)) + (Pervasives.truncate (float h *. ratio)) in + img#save thumbpath (Some Jpeg) [Save_Quality 75]; + img#destroy;; + +let load_icon name typ = + let thumb = thumb_path name in + let inf, pixmap = + (* XVTHUMB *) + try + let inf, img = + if !xvmode then + let inf, img = OXvthumb.load thumb in + inf, img#coerce + else "", OImages.load thumb [] in + inf, pixmap_of_image Gui.root_win None img + with + | _ -> + let mj, mn = typ in + try + if mj <> "image" then raise Exit; + let inf, img = + if !xvmode then begin + create_xvthumb name; + let inf, img = OXvthumb.load thumb in + inf, img#coerce + end else begin + create_livthumb name; + "", OImages.load thumb [] + end in + inf, pixmap_of_image Gui.root_win None img + with + | _ -> + let iconpath = + try Hashtbl.find Iconcap.table (mj, mn) with + | Not_found -> Hashtbl.find Iconcap.table (mj,"*") in + let iconpath = + Pathfind.find + [ "."; "~/.liv"; "/usr/share/icons/"; "/usr/share/pixmaps"; ] + iconpath in + + (* prerr_endline ("loading "^iconpath); *) + (mj ^ "/" ^ mn), + begin + try Hashtbl.find mime_icons iconpath with + | Not_found -> + let pixmap = + pixmap_of_image Gui.root_win None (OImages.load iconpath []) in + Hashtbl.add mime_icons iconpath pixmap; + pixmap + end in + inf, pixmap;; diff -Nru camlimages-3.0.1/examples/liv-furuse/jpf.ml camlimages-4.0.1/examples/liv-furuse/jpf.ml --- camlimages-3.0.1/examples/liv-furuse/jpf.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/jpf.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,63 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: jpf.ml,v 1.4 2004/09/24 10:55:07 weis Exp $ *) + +type quality = int;; +type enhance = bool;; + +type flags = quality * enhance;; + +let string_of_flags (q, e, c) = + let qs = + match q with + | 2 -> "XX" + | 1 -> "X" + | 0 -> "" + | _ when q >= 3 -> "XXX" + | _ -> "_" in + + let es = if e then "e" else "" in + let cs = if c then "c" else "" in + qs ^ es ^ cs;; + +let parse_flags str = + let enhanced = String.contains str 'e' in + let checked = String.contains str 'c' in + let prefix s = try String.sub str 0 (String.length s) = s with _ -> false in + let q = + if prefix "XXX" then 3 else + if prefix "XX" then 2 else + if prefix "X" then 1 else + if prefix "_" then -1 else + 0 in + q, enhanced, checked;; + +let get_flags file = + let body, ext = Images.get_extension file in + try + let pos = String.rindex body '~' in + let flag_str = String.sub body (pos+1) (String.length body - (pos+1)) in + parse_flags flag_str + with + | _ -> 0, false, false;; + +let set_flags file flags = + let body, ext = Images.get_extension file in + let realbody = + try + let pos = String.rindex body '~' in + String.sub body 0 pos + with + | _ -> body in + let flags = string_of_flags flags in + realbody ^ (if flags = "" then "" else "~" ^ flags) ^ "." ^ ext;; diff -Nru camlimages-3.0.1/examples/liv-furuse/jWidget.ml camlimages-4.0.1/examples/liv-furuse/jWidget.ml --- camlimages-3.0.1/examples/liv-furuse/jWidget.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/jWidget.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,144 @@ +open Gdk +open GMain + +class status_bar ?packing ?show () = + let hbox = GPack.hbox ?packing ?show () in + + let label = + let f = GBin.frame ~shadow_type: `IN + ~packing: (hbox#pack ~expand: true ~fill: true) () in + let hbox = GPack.hbox ~packing: f#add () in + (* add some space on the left side of the frame... *) + let _ = GMisc.label ~text: " " ~packing: (hbox#pack ~expand: false) () in + let l = GMisc.label ~packing: (hbox#pack ~expand: false ~fill: true) () in + l + in + let progress = +(* + let f = GBin.frame ~width: 120 ~border_width: 0 ~shadow_type: `IN + ~packing: (hbox#pack ~expand: false ~fill: false) () in +*) + let f = GBin.event_box ~width: 120 + ~packing: (hbox#pack ~expand: false ~fill: false) () in + let p = GRange.progress_bar ~packing: f#add () in +(* + p#set_show_text true; + p#set_format_string ""; +*) + p + in + + object (self) + inherit GObj.widget hbox#as_widget + + method set_text = label#set_text + method text = label#text + method set_justify = label#set_justify + method set_pattern = label#set_pattern + method set_line_wrap = label#set_line_wrap + +(* + method adjustment = progress#adjustment + method configure = progress#configure + method percentage = progress#percentage + method set_adjustment = progress#set_adjustment +*) + method get_fraction = progress#fraction + + method event = progress#event +(* + method set_activity_blocks = progress#set_activity_blocks + method set_activity_step = progress#set_activity_step + method set_bar_style = progress#set_bar_style + method set_discrete_blocks = progress#set_discrete_blocks +*) + method set_orientation = progress#set_orientation + +(* + val mutable activity_mode = false +*) + + method set_fraction p = +(* + if activity_mode then begin + progress#set_activity_mode false; + activity_mode <- false + end; +*) + progress#set_fraction p + + method activate () = +(* + if not activity_mode then begin + progress#set_activity_mode true; + activity_mode <- true + end; +*) + let p = + let p = progress#fraction +. 0.01 in + if p > 1.0 then 0.0 else p + in + progress#set_fraction p +end + +let status_bar ?packing ?show () = new status_bar ?packing ?show () + +class img_button ?label ?frames ?border_width ?width ?height ?packing ?show () = + let button = GButton.button (*?border_width ?width ?height*) ?packing ?show () in + let vbox = GPack.vbox ~packing: button#add () in + let pix = + match frames with + | Some [] | None -> None + | Some frames -> + Some (GMisc.pixmap (fst (List.hd frames)) + ~packing: (vbox#pack ~expand: true ~fill: true) ()) + in + let _ = + match label with + | Some label -> + Some (GMisc.label ~text: label + ~packing: (vbox#pack ~expand: false ~fill: true) ()) + | None -> None + in + object (self) + inherit GButton.button (Obj.magic button#as_widget : Gtk.button Gtk.obj) + + val mutable current_frames = match frames with Some fs -> fs | None -> [] + val mutable timeout = None + + method start_rotate = + match pix, timeout, frames with + | Some pix, None, Some frames when List.length frames > 1 -> + let img, wait = + match current_frames with + | [img, wait] -> + current_frames <- frames; + img, wait + | (img, wait)::fs -> + current_frames <- fs; + img, wait + | _ -> assert false + in + let wait = if wait <= 0 then 100 else wait in + pix#set_pixmap img; + timeout <- + Some (Timeout.add ~ms:wait ~callback: (fun () -> + timeout <- None; + self#start_rotate; + false)); + Gui.sync () + | _ -> () + + method stop_rotate = + match timeout with + | Some id -> + Timeout.remove id; timeout <- None; + begin match pix, frames with + | Some pix, Some ((img,wait)::_) -> pix#set_pixmap img; Gui.sync () + | _ -> () + end + | None -> () + +end + +let img_button = new img_button Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/examples/liv-furuse/liv and /tmp/rguOvHQvP7/camlimages-4.0.1/examples/liv-furuse/liv differ Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/examples/liv-furuse/livdemo.jpg and /tmp/rguOvHQvP7/camlimages-4.0.1/examples/liv-furuse/livdemo.jpg differ diff -Nru camlimages-3.0.1/examples/liv-furuse/liv-jpf.ml camlimages-4.0.1/examples/liv-furuse/liv-jpf.ml --- camlimages-3.0.1/examples/liv-furuse/liv-jpf.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/liv-jpf.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,706 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999,2000,2001,2002,2001,2002 *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) +open Images +open OImages + +(* +let _ = + Bitmap.maximum_live := 15000000; (* 60MB *) + Bitmap.maximum_block_size := !Bitmap.maximum_live / 16; +;; +*) + +open Gc +open Unix +open LargeFile +open Gdk +open GDraw +open GMain + +open Livmisc +open Gui +open Display +open Tout + +exception Skipped + +let cwd = Unix.getcwd () +let home = Sys.getenv "HOME" + +let convert_file file = + let b = Buffer.create (String.length file) in + + let rec loop file = + let dir = Filename.dirname file in + let base = Filename.basename file in + begin match dir with + | "." -> Buffer.add_string b dir + | "/" -> () + | _ -> loop dir + end; + Buffer.add_char b '/'; + Buffer.add_string b (try Glib.Convert.locale_to_utf8 base with _ -> base) + in + loop file; + Buffer.contents b +;; + +let base_filters = ref ([] : Display.filter list);; + +let _ = + let r = Gc.get () in r.max_overhead <- 0; Gc.set r; + + let files = ref [] in + let random = ref false in + let dirrandom = ref false in + let dirsample = ref false in + let size = ref false in + +(*JPF*) + let mtimesort = ref false in + let xmode = ref `n in + let check = ref true in + let gcheck = ref false in +(*/JPF*) + + Random.init (Pervasives.truncate (Unix.time ())); + Arg.parse + [ + "-random", Arg.Unit (fun () -> random := true), ": random mode"; + "-dirrandom", Arg.Unit (fun () -> dirrandom := true), ": random per directory mode"; + "-dirsample", Arg.Unit (fun () -> dirsample := true), ": random per directory sample mode"; + "-wait", Arg.Float (fun sec -> Tout.wait := sec), "sec : wait sec"; + "-root", Arg.String (function + "center" -> Display.root_mode := `CENTER + | "random" -> Display.root_mode := `RANDOM + | _ -> raise (Failure "root mode")), ": on root [center|random]"; + "-transition", Arg.String (function + "myst" -> Display.transition := `MYST + | "transparent" -> Display.transition := `TRANSPARENT + | _ -> raise (Failure "transition")), ": transition [myst|transparent]"; + "-transparentborder", Arg.Unit (fun () -> + base_filters := `TRANSPARENT_BORDER :: !base_filters), + ": transparent border filter"; + "-size", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`NOASPECT) :: !base_filters + | _ -> raise (Failure "size")), ": size [w]x[h]"; + "-atleast", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATLEAST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + "-atmost", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATMOST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + + "-normalize", Arg.Unit (fun () -> + base_filters := `NORMALIZE :: !base_filters), + ": normalize colormap"; + + "-enhance", Arg.Unit (fun () -> + base_filters := `ENHANCE :: !base_filters), + ": enhance colormap"; + +(*JPF*) + "-check", Arg.Unit (fun () -> check := true), ": check mode"; + "-Check", Arg.Unit (fun () -> check := true; gcheck := true), + ": ground check mode"; + "-x", Arg.Unit (fun () -> xmode := `x), ": x mode"; + "-X", Arg.Unit (fun () -> xmode := `X), ": X mode"; + "-_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "--_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "-mtime", Arg.Unit (fun () -> mtimesort := true), ": mtimesort mode"; +(*/JPF*) + ] + (fun s -> files := s :: !files) + "liv files"; + + let files = + let fs = ref [] in + List.iter (fun f -> + try + let st = stat f in + match st.st_kind with + | S_DIR -> + Scandir.scan_dir (fun f -> + try + ignore (guess_extension (snd (Livmisc.get_extension f))); + fs := f :: !fs; + with e -> (* prerr_endline ((f^": "^ Printexc.to_string e)) *) ()) f + | _ -> fs := f :: !fs + with + | _ -> prerr_endline ("ERROR: " ^ f)) !files; + Array.of_list !fs + in + + if not !size then + base_filters := `SIZE (fst root_size, snd root_size, `ATMOST) + :: !base_filters; + base_filters := List.rev !base_filters; + + let cur = ref (-1) in + let curpath = ref "" in + + let disp_cur = ref (-1) in + + let random_array ary = + let num = Array.length ary in + for i = 0 to num - 1 do + let tmp = ary.(i) in + let pos = Random.int num in + ary.(i) <- ary.(pos); + ary.(pos) <- tmp + done + in + + if !dirsample then begin + let tbl = Hashtbl.create 17 in + let dirs = ref [] in + let num_files = Array.length files in + for i = 0 to num_files - 1 do + let dirname = Filename.dirname files.(i) in + Hashtbl.add tbl dirname files.(i); + if not (List.mem dirname !dirs) then dirs := dirname :: !dirs + done; + let dirsarray = Array.of_list !dirs in + random_array dirsarray; + let pos = ref 0 in + let subpos = ref 0 in + let subfiles = Array.init (Array.length dirsarray) (fun a -> + let ary = Array.of_list (Hashtbl.find_all tbl dirsarray.(a)) in + random_array ary; ary) + in + while !pos < Array.length files do + for i = 0 to Array.length dirsarray - 1 do + if !subpos < Array.length subfiles.(i) then begin + files.(!pos) <- subfiles.(i).(!subpos); + incr pos + end + done; + incr subpos + done + end else + if !dirrandom then begin + let tbl = Hashtbl.create 17 in + let dirs = ref [] in + let num_files = Array.length files in + for i = 0 to num_files - 1 do + let dirname = Filename.dirname files.(i) in + Hashtbl.add tbl dirname files.(i); + if not (List.mem dirname !dirs) then dirs := dirname :: !dirs + done; + let dirsarray = Array.of_list !dirs in + random_array dirsarray; + let pos = ref 0 in + for i = 0 to Array.length dirsarray - 1 do + let dirfiles = Array.of_list + (List.sort compare (Hashtbl.find_all tbl dirsarray.(i))) in + if !random then begin + random_array dirfiles + end; + for j = 0 to Array.length dirfiles - 1 do + files.(!pos) <- dirfiles.(j); + incr pos + done + done + end else if !random then random_array files; + +(*JPF*) + let files = + if !mtimesort then begin + let ctimes = + Array.map (fun f -> + let st = lstat f in + let t = st.st_mtime in + f,(if !random then t +. Random.float (float (24*60*60)) else t)) files + in + Array.sort (fun (f1,t1) (f2,t2) -> + let c = compare t1 t2 in + if c = 0 then compare f1 f2 else c) ctimes; + Array.map fst ctimes + end else files + in +(*/JPF*) + + infowindow#show (); + + imglist#freeze (); + Array.iter (fun file -> + ignore (imglist#append [convert_file file])) + files; + imglist#thaw (); + + let cache = Cache.create 5 in + + let rename pos newname = + let oldname = files.(pos) in + let xvname s = Filename.dirname s ^ "/.xvpics/" ^ Filename.basename s in + let oldxvname = xvname oldname in + let newxvname = xvname newname in + let gthumbname s = + let abs = + if s = "" then "" else + if s.[0] = '/' then s + else Filename.concat cwd s + in + (Filename.concat (Filename.concat home ".gnome2/gthumb/comments") abs) + ^ ".xml" + in + let oldgthumbname = gthumbname oldname in + let newgthumbname = gthumbname newname in + imglist#set_cell ~text: (convert_file newname) pos 0; + let command s = Sys.command s in + if Filename.dirname newname <> Filename.dirname oldname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newname))); + end; + prerr_endline (Printf.sprintf "%s => %s" oldname newname); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldname newname)); + if Sys.file_exists oldxvname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newxvname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldxvname newxvname)) + end; + if Sys.file_exists oldgthumbname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newgthumbname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldgthumbname newgthumbname)) + end; + files.(pos) <- newname; + Cache.rename cache oldname newname + in + + let image_id = ref 0 in + + let display_image reload file = + (* prerr_endline file; *) + remove_timeout (); + + let load_image () = + prog#map (); + prog#set_fraction 0.01; + prog#set_format_string ("loading..."); + let image = + try + match tag (OImages.load file + [Load_Progress prog#set_fraction]) with + | Rgb24 i -> i + | Rgba32 i -> i#to_rgb24 + | Index8 i -> i#to_rgb24 + | Index16 i -> i#to_rgb24 + | _ -> raise (Failure "not supported") + with + | e -> prerr_endline (Printexc.to_string e); raise e + in + prog#set_fraction 1.0; sync (); + image + in + + let id, image = + try + if not reload then begin + Cache.find cache file + end else raise Not_found + with + Not_found -> + let im = load_image () in + incr image_id; + !image_id, im + in + Cache.add cache file (id, image); + + prog#set_fraction 0.01; + display id image !base_filters; + + window#set_title (convert_file file); + + disp_cur := !cur; + curpath := file; +(*JPF*) + (* update mtime *) + if !check then begin + try + let st = lstat file in + if st.st_kind = S_LNK then begin + let lnk = Unix.readlink file in + Unix.unlink file; + Unix.symlink lnk file + end else begin + Unix.utimes file (Unix.time ()) (Unix.time ()); + end + with + _ -> () + end; + Gc.compact () +(*/JPF*) + in + + let display_image reload file = + try + display_image reload file + with Wrong_file_type | Wrong_image_type -> + try + prerr_endline "guess type"; + let typ = + let typ = Livshtype.guess file in + match typ with + | Livshtype.ContentType x -> + begin match + Mstring.split_str (function '/' -> true | _ -> false) x + with + | [mj;mn] -> mj,mn + | _ -> assert false + end + | Livshtype.ContentEncoding x -> + "encoding", x + | Livshtype.Special m -> + "special",m + in + prerr_endline (fst typ ^ "/" ^ snd typ); + match typ with +(*JPF*) + | "application", "vnd.rn-realmedia" + | "audio", "x-pn-realaudio" -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop \"%s\" &" file)) + | "video", _ -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop '%s' &" file)) +(*/JPF*) + | _ -> raise Wrong_file_type + with + | _ -> () + in + + let filter_toggle opt = + if List.mem opt !base_filters then + base_filters := + List.fold_right (fun x st -> + if x = opt then st + else x :: st) !base_filters [] + else + base_filters := !base_filters @ [opt] + in + + let display_current reload = + let f = + if !cur >= 0 && !cur < Array.length files then begin + imglist#unselect_all (); + imglist#select !cur 0; + if imglist#row_is_visible !cur <> `FULL then begin + imglist#moveto ~row_align: 0.5 ~col_align: 0.0 !cur 0 + end; + files.(!cur) + end else !curpath + in +(*JPF*) + let xlevel, enhanced, checked = Jpf.get_flags f in + if enhanced then filter_toggle `ENHANCE; + + let f = + if !gcheck && files.(!cur) = f then begin + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + let newname = Jpf.set_flags files.(!cur) (xlevel,enhanced,true) in + if files.(!cur) <> newname then begin + rename !cur newname + end; + newname end else f + in +(*/JPF*) + + display_image reload f; +(*JPF*) + if enhanced then filter_toggle `ENHANCE; +(*/JPF*) + + () + in + +(*JPF*) + let check_skip mode = + match mode with + | Some `FORCE -> () + | Some `DIR -> + let disp_file = files.(!disp_cur) in + let cur_file = files.(!cur) in + if Filename.dirname disp_file = Filename.dirname cur_file then + raise Skipped + | None -> + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + if !gcheck && checked then raise Skipped; + match !xmode with + | `n -> () + | `u -> if xlevel < 0 then raise Skipped + | `x -> +(* + let imgs = Array.length files in +*) + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 25 + | 1 -> 50 + | 2 -> 75 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + | `X -> + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 0 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + in +(*/JPF*) + + let rec next mode = + if !cur >= 0 then begin + let cur' = + if !cur >= Array.length files - 1 then 0 else !cur + 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false; + with + | Sys_error s -> + prerr_endline s; + next mode +(*JPF*) + | Skipped -> next mode +(*/JPF*) + | Wrong_file_type | Wrong_image_type -> next mode + end + end + in + + let rec prev mode = + if !cur >= 0 then begin + let cur' = + if !cur = 0 then Array.length files - 1 else !cur - 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false + with + | Sys_error s -> + prerr_endline s; + prev mode + | Skipped -> prev mode + | Wrong_file_type | Wrong_image_type -> prev mode + end + end + in + + let bind () = + let callback = fun ev -> + begin match GdkEvent.Key.string ev with +(* + | "E" -> + filter_toggle `ENHANCE; + display_current true + +*) +(*JPF*) + | "E" -> + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let enhance' = not enhance in + let newname = Jpf.set_flags name (xlevel,enhance',checked) in + if name <> newname then begin + rename !disp_cur newname + end; + display_current true +(*/JPF*) +(* + | "N" -> + filter_toggle `NORMALIZE; + display_current true +*) + + | "l" -> display_current true + + | " " | "n" | "f" -> next None +(*JPF*) + | "\014" (* C-N *) | "\006" (* C-F *) -> next (Some `FORCE) + | "N" | "F" -> next (Some `DIR) +(*/JPF*) + | "p" | "b" -> prev None +(*JPF*) + | "\016" (* C-P *) | "\002" (* C-B *) -> prev (Some `FORCE) + | "P" | "B" -> prev (Some `DIR) +(*/JPF*) + | "q" -> Main.quit () + | "v" -> + (* liv visual shell *) + let rec func = fun file typ -> + match typ with + | "image", _ -> + display_image false file +(* + | "special", "dir" -> + new Livsh.livsh file func; () +*) + | _ -> Gdk.X.beep () + in + (* where we should display ? *) + let dirname = + if Array.length files = 0 then Unix.getcwd () + else Filename.dirname files.(!cur) + in + let dirname = + if Filename.is_relative dirname then begin + let cwd = Unix.getcwd () in + Filename.concat cwd dirname + end else dirname + in + ignore (new Livsh.livsh dirname func) +(*JPF*) + | "e" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = -1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "x" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = xlevel + 1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "r" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = + if xlevel > 0 then xlevel - 1 + else if xlevel < 0 then xlevel + 1 + else xlevel + in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "s" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 7 = "/series" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 7)) base + else Filename.concat (Filename.concat dir "series") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "d" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 6 = "/trash" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 6)) base + else Filename.concat (Filename.concat dir "trash") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end +(*/JPF*) + | _ -> () + end; false + in + ignore (window#event#connect#key_press ~callback: callback); + ignore (infowindow#event#connect#key_press ~callback: callback); + + ignore (imglist#connect#select_row ~callback: (fun ~row ~column ~event -> + if !cur <> row then begin + cur := row; + display_image false files.(!cur) + end)) + in + + bind (); + + Tout.hook_next := next; + + window#show (); + + let starter = ref None in + + starter := Some (window#event#connect#configure ~callback: (fun ev -> + may window#misc#disconnect !starter; + if Array.length files <> 0 then begin + cur := 0; + prog#unmap (); + display_current false + end else begin + try + display_image false (Pathfind.find [ "~/.liv"; + "/usr/lib/liv"; + "/usr/local/lib/liv"; + "." ] "liv.jpg") + with + | _ -> () + end; false)); + + Main.main () diff -Nru camlimages-3.0.1/examples/liv-furuse/livmisc.ml camlimages-4.0.1/examples/liv-furuse/livmisc.ml --- camlimages-3.0.1/examples/liv-furuse/livmisc.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/livmisc.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,74 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: livmisc.ml,v 1.3 2004/09/23 07:20:20 weis Exp $ *) + +let may f = function + | Some v -> f v + | None -> ();; + +let color_merge (r1, g1, b1) (r2, g2, b2) max cntr = + (r1 * (max - cntr) + r2 * cntr) / max, + (g1 * (max - cntr) + g2 * cntr) / max, + (b1 * (max - cntr) + b2 * cntr) / max;; + +let remove_space s = + let s = + let pos = ref 0 in + while !pos < String.length s + && List.mem s.[!pos] [' '; '\t'] do incr pos done; + if !pos = 0 then s + else String.sub s !pos (String.length s - !pos) in + let l = String.length s in + let pos = ref (l - 1) in + while !pos >= 0 && List.mem s.[!pos] [' '; '\t'] do decr pos done; + if !pos = l - 1 then s else String.sub s 0 (succ !pos);; + +let get_extension s = + try + let dotpos = String.rindex s '.' in + String.sub s 0 dotpos, + String.sub s (dotpos + 1) (String.length s - dotpos - 1) + with + | _ -> s, "";; + +let normalize_filename file = + let is_absolute = not (Filename.is_relative file) in + let tkns = Mstring.split_str (function '/' -> true | _ -> false) file in + let tkns = + List.fold_left + (fun acc -> function + | "." -> acc + | ".." -> + begin try List.tl acc with + | _ -> if is_absolute then acc else ".." :: acc end + | tkn -> tkn :: acc) + [] tkns in + (if is_absolute then "/" else "") ^ + Mstring.catenate_sep "/" (List.rev tkns);; + +type 'a result = + | Ok of 'a + | Exn of exn;; + +let after f g = + match + let r = try Ok (f ()) with | e -> Exn e in + g (); + r + with + | Ok r -> r + | Exn e -> raise e;; + +let (!!) = Lazy.force;; + +let string_tail str len = String.sub str (String.length str - len) len;; diff -Nru camlimages-3.0.1/examples/liv-furuse/liv.ml camlimages-4.0.1/examples/liv-furuse/liv.ml --- camlimages-3.0.1/examples/liv-furuse/liv.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/liv.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,969 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999,2000,2001,2002,2001,2002 *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) +open Images +open OImages + +(* +let _ = + Bitmap.maximum_live := 15000000; (* 60MB *) + Bitmap.maximum_block_size := !Bitmap.maximum_live / 16; +;; +*) + +<<<<<<< liv.ml +open Gc +open Unix +open LargeFile +open Gdk +open GDraw +open GMain + +open Livmisc +open Gui +open Display +open Tout + +exception Skipped + +let cwd = Unix.getcwd () +let home = Sys.getenv "HOME" + +let convert_file file = + let b = Buffer.create (String.length file) in + + let rec loop file = + let dir = Filename.dirname file in + let base = Filename.basename file in + begin match dir with + | "." -> Buffer.add_string b dir + | "/" -> () + | _ -> loop dir + end; + Buffer.add_char b '/'; + Buffer.add_string b (try Glib.Convert.locale_to_utf8 base with _ -> base) + in + loop file; + Buffer.contents b +;; + +let base_filters = ref ([] : Display.filter list);; + +let _ = + let r = Gc.get () in r.max_overhead <- 0; Gc.set r; + + let files = ref [] in + let random = ref false in + let dirrandom = ref false in + let dirsample = ref false in + let size = ref false in + +(*JPF*) + let mtimesort = ref false in + let xmode = ref `n in + let check = ref true in + let gcheck = ref false in +(*/JPF*) + + Random.init (Pervasives.truncate (Unix.time ())); + Arg.parse + [ + "-random", Arg.Unit (fun () -> random := true), ": random mode"; + "-dirrandom", Arg.Unit (fun () -> dirrandom := true), ": random per directory mode"; + "-dirsample", Arg.Unit (fun () -> dirsample := true), ": random per directory sample mode"; + "-wait", Arg.Float (fun sec -> Tout.wait := sec), "sec : wait sec"; + "-root", Arg.String (function + "center" -> Display.root_mode := `CENTER + | "random" -> Display.root_mode := `RANDOM + | _ -> raise (Failure "root mode")), ": on root [center|random]"; + "-transition", Arg.String (function + "myst" -> Display.transition := `MYST + | "transparent" -> Display.transition := `TRANSPARENT + | _ -> raise (Failure "transition")), ": transition [myst|transparent]"; + "-transparentborder", Arg.Unit (fun () -> + base_filters := `TRANSPARENT_BORDER :: !base_filters), + ": transparent border filter"; + "-size", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`NOASPECT) :: !base_filters + | _ -> raise (Failure "size")), ": size [w]x[h]"; + "-atleast", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATLEAST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + "-atmost", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATMOST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + + "-normalize", Arg.Unit (fun () -> + base_filters := `NORMALIZE :: !base_filters), + ": normalize colormap"; + + "-enhance", Arg.Unit (fun () -> + base_filters := `ENHANCE :: !base_filters), + ": enhance colormap"; + +(*JPF*) + "-check", Arg.Unit (fun () -> check := true), ": check mode"; + "-Check", Arg.Unit (fun () -> check := true; gcheck := true), + ": ground check mode"; + "-x", Arg.Unit (fun () -> xmode := `x), ": x mode"; + "-X", Arg.Unit (fun () -> xmode := `X), ": X mode"; + "-_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "--_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "-mtime", Arg.Unit (fun () -> mtimesort := true), ": mtimesort mode"; +(*/JPF*) + ] + (fun s -> files := s :: !files) + "liv files"; +======= +module D = Display +open D + +open Gc +open Unix +open LargeFile +open Gdk +open GDraw +open GMain + +open Livmisc +open Gui +open Tout + +exception Skipped + +let cwd = Unix.getcwd () +let home = Sys.getenv "HOME" + +let convert_file file = + let b = Buffer.create (String.length file) in + + let rec loop file = + let dir = Filename.dirname file in + let base = Filename.basename file in + begin match dir with + | "." -> Buffer.add_string b dir + | "/" -> () + | _ -> loop dir + end; + Buffer.add_char b '/'; + Buffer.add_string b (try Glib.Convert.locale_to_utf8 base with _ -> base) + in + loop file; + Buffer.contents b +;; + +let base_filters = ref ([] : D.filter list);; + +let _ = + let files = ref [] in + let random = ref false in + let dirrandom = ref false in + let dirsample = ref false in + let size = ref false in + +(*JPF*) + let mtimesort = ref false in + let xmode = ref `n in + let check = ref true in + let gcheck = ref false in +(*/JPF*) + + Random.init (Pervasives.truncate (Unix.time ())); + Arg.parse + [ + "-random", Arg.Unit (fun () -> random := true), ": random mode"; + "-dirrandom", Arg.Unit (fun () -> dirrandom := true), ": random per directory mode"; + "-dirsample", Arg.Unit (fun () -> dirsample := true), ": random per directory sample mode"; + "-wait", Arg.Float (fun sec -> Tout.wait := sec), "sec : wait sec"; + "-root", Arg.String (function + "center" -> D.root_mode := `CENTER + | "random" -> D.root_mode := `RANDOM + | _ -> raise (Failure "root mode")), ": on root [center|random]"; +(* + "-transition", Arg.String (function + "myst" -> D.transition := `MYST + | "transparent" -> D.transition := `TRANSPARENT + | _ -> raise (Failure "transition")), ": transition [myst|transparent]"; + "-transparentborder", Arg.Unit (fun () -> + base_filters := `TRANSPARENT_BORDER :: !base_filters), + ": transparent border filter"; +*) + "-size", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`NOASPECT) :: !base_filters + | _ -> raise (Failure "size")), ": size [w]x[h]"; + "-atleast", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATLEAST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + "-atmost", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATMOST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + +(* + "-normalize", Arg.Unit (fun () -> + base_filters := `NORMALIZE :: !base_filters), + ": normalize colormap"; + + "-enhance", Arg.Unit (fun () -> + base_filters := `ENHANCE :: !base_filters), + ": enhance colormap"; +*) +(*JPF*) + "-check", Arg.Unit (fun () -> check := true), ": check mode"; + "-Check", Arg.Unit (fun () -> check := true; gcheck := true), + ": ground check mode"; + "-x", Arg.Unit (fun () -> xmode := `x), ": x mode"; + "-X", Arg.Unit (fun () -> xmode := `X), ": X mode"; + "-_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "--_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "-mtime", Arg.Unit (fun () -> mtimesort := true), ": mtimesort mode"; +(*/JPF*) + ] + (fun s -> files := s :: !files) + "liv files"; +>>>>>>> 1.10 + + let files = + let fs = ref [] in + List.iter (fun f -> + try + let st = stat f in + match st.st_kind with + | S_DIR -> + Scandir.scan_dir (fun f -> + try + ignore (guess_extension (snd (Livmisc.get_extension f))); + fs := f :: !fs; + with e -> (* prerr_endline ((f^": "^ Printexc.to_string e)) *) ()) f + | _ -> fs := f :: !fs + with + | _ -> prerr_endline ("ERROR: " ^ f)) !files; + Array.of_list !fs + in + + if not !size then + base_filters := `SIZE (fst root_size, snd root_size, `ATMOST) + :: !base_filters; + base_filters := List.rev !base_filters; + + let cur = ref (-1) in + let curpath = ref "" in + + let disp_cur = ref (-1) in + + let random_array ary = + let num = Array.length ary in + for i = 0 to num - 1 do + let tmp = ary.(i) in + let pos = Random.int num in + ary.(i) <- ary.(pos); + ary.(pos) <- tmp + done + in + + if !dirsample then begin + let tbl = Hashtbl.create 17 in + let dirs = ref [] in + let num_files = Array.length files in + for i = 0 to num_files - 1 do + let dirname = Filename.dirname files.(i) in + Hashtbl.add tbl dirname files.(i); + if not (List.mem dirname !dirs) then dirs := dirname :: !dirs + done; + let dirsarray = Array.of_list !dirs in + random_array dirsarray; + let pos = ref 0 in + let subpos = ref 0 in + let subfiles = Array.init (Array.length dirsarray) (fun a -> + let ary = Array.of_list (Hashtbl.find_all tbl dirsarray.(a)) in + random_array ary; ary) + in + while !pos < Array.length files do + for i = 0 to Array.length dirsarray - 1 do + if !subpos < Array.length subfiles.(i) then begin + files.(!pos) <- subfiles.(i).(!subpos); + incr pos + end + done; + incr subpos + done + end else + if !dirrandom then begin + let tbl = Hashtbl.create 17 in + let dirs = ref [] in + let num_files = Array.length files in + for i = 0 to num_files - 1 do + let dirname = Filename.dirname files.(i) in + Hashtbl.add tbl dirname files.(i); + if not (List.mem dirname !dirs) then dirs := dirname :: !dirs + done; + let dirsarray = Array.of_list !dirs in + random_array dirsarray; + let pos = ref 0 in + for i = 0 to Array.length dirsarray - 1 do + let dirfiles = Array.of_list + (List.sort compare (Hashtbl.find_all tbl dirsarray.(i))) in + if !random then begin + random_array dirfiles + end; + for j = 0 to Array.length dirfiles - 1 do + files.(!pos) <- dirfiles.(j); + incr pos + done + done + end else if !random then random_array files; + +(*JPF*) + let files = + if !mtimesort then begin + let ctimes = + Array.map (fun f -> + let st = lstat f in + let t = st.st_mtime in + f,(if !random then t +. Random.float (float (24*60*60)) else t)) files + in + Array.sort (fun (f1,t1) (f2,t2) -> + let c = compare t1 t2 in + if c = 0 then compare f1 f2 else c) ctimes; + Array.map fst ctimes + end else files + in +(*/JPF*) + + infowindow#show (); + + imglist#freeze (); + Array.iter (fun file -> + ignore (imglist#append [convert_file file])) + files; + imglist#thaw (); + + let cache = Cache.create 5 in + + let rename pos newname = + let oldname = files.(pos) in + let xvname s = Filename.dirname s ^ "/.xvpics/" ^ Filename.basename s in + let oldxvname = xvname oldname in + let newxvname = xvname newname in + let gthumbname s = + let abs = + if s = "" then "" else + if s.[0] = '/' then s + else Filename.concat cwd s + in + (Filename.concat (Filename.concat home ".gnome2/gthumb/comments") abs) + ^ ".xml" + in + let oldgthumbname = gthumbname oldname in + let newgthumbname = gthumbname newname in + imglist#set_cell ~text: (convert_file newname) pos 0; + let command s = Sys.command s in + if Filename.dirname newname <> Filename.dirname oldname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newname))); + end; + prerr_endline (Printf.sprintf "%s => %s" oldname newname); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldname newname)); + if Sys.file_exists oldxvname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newxvname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldxvname newxvname)) + end; + if Sys.file_exists oldgthumbname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newgthumbname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldgthumbname newgthumbname)) + end; + files.(pos) <- newname; + Cache.rename cache oldname newname + in + + let image_id = ref 0 in + + let display_image reload file = + (* prerr_endline file; *) + remove_timeout (); + + let load_image () = + prog#map (); + prog#set_fraction 0.01; + prog#set_format_string ("loading..."); + let image = + try + match tag (OImages.load file + [Load_Progress prog#set_fraction]) with + | Rgb24 i -> i + | Rgba32 i -> i#to_rgb24 + | Index8 i -> i#to_rgb24 + | Index16 i -> i#to_rgb24 + | _ -> raise (Failure "not supported") + with + | e -> prerr_endline (Printexc.to_string e); raise e + in + prog#set_fraction 1.0; sync (); + image + in + + let id, image = + try + if not reload then begin + Cache.find cache file + end else raise Not_found + with + Not_found -> + let im = load_image () in + incr image_id; + !image_id, im + in + Cache.add cache file (id, image); +<<<<<<< liv.ml + + prog#set_fraction 0.01; + display id image !base_filters; +======= + + prog#set_fraction 0.01; + display id image !base_filters; (* this cause lots of gc *) +>>>>>>> 1.10 + +<<<<<<< liv.ml + window#set_title (convert_file file); + +======= + window#set_title (convert_file file); + +>>>>>>> 1.10 + disp_cur := !cur; +<<<<<<< liv.ml + curpath := file; +(*JPF*) + (* update mtime *) + if !check then begin + try + let st = lstat file in + if st.st_kind = S_LNK then begin + let lnk = Unix.readlink file in + Unix.unlink file; + Unix.symlink lnk file + end else begin + Unix.utimes file (Unix.time ()) (Unix.time ()); + end + with + _ -> () + end; + Gc.compact () +(*/JPF*) + in +======= + curpath := file; +(*JPF*) + (* update mtime *) + if !check then begin + try + let st = lstat file in + if st.st_kind = S_LNK then begin + let lnk = Unix.readlink file in + Unix.unlink file; + Unix.symlink lnk file + end else begin + Unix.utimes file (Unix.time ()) (Unix.time ()); + end + with + _ -> () + end; +(*/JPF*) + in +>>>>>>> 1.10 + + let display_image reload file = + try + display_image reload file + with Wrong_file_type | Wrong_image_type -> + try + prerr_endline "guess type"; + let typ = + let typ = Livshtype.guess file in + match typ with + | Livshtype.ContentType x -> + begin match + Mstring.split_str (function '/' -> true | _ -> false) x + with + | [mj;mn] -> mj,mn + | _ -> assert false + end + | Livshtype.ContentEncoding x -> + "encoding", x + | Livshtype.Special m -> + "special",m + in + prerr_endline (fst typ ^ "/" ^ snd typ); + match typ with +(*JPF*) + | "application", "vnd.rn-realmedia" + | "audio", "x-pn-realaudio" -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop \"%s\" &" file)) + | "video", _ -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop '%s' &" file)) +(*/JPF*) + | _ -> raise Wrong_file_type + with + | _ -> () + in + + let filter_toggle opt = + if List.mem opt !base_filters then + base_filters := + List.fold_right (fun x st -> + if x = opt then st + else x :: st) !base_filters [] + else + base_filters := !base_filters @ [opt] + in + + let display_current reload = + let f = + if !cur >= 0 && !cur < Array.length files then begin +<<<<<<< liv.ml + imglist#unselect_all (); + imglist#select !cur 0; + if imglist#row_is_visible !cur <> `FULL then begin + imglist#moveto ~row_align: 0.5 ~col_align: 0.0 !cur 0 + end; + files.(!cur) + end else !curpath + in +(*JPF*) + let xlevel, enhanced, checked = Jpf.get_flags f in + if enhanced then filter_toggle `ENHANCE; + + let f = + if !gcheck && files.(!cur) = f then begin + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + let newname = Jpf.set_flags files.(!cur) (xlevel,enhanced,true) in + if files.(!cur) <> newname then begin + rename !cur newname + end; + newname end else f + in +(*/JPF*) + + display_image reload f; +(*JPF*) + if enhanced then filter_toggle `ENHANCE; +(*/JPF*) + + () + in +======= + imglist#unselect_all (); + imglist#select !cur 0; + if imglist#row_is_visible !cur <> `FULL then begin + imglist#moveto ~row_align: 0.5 ~col_align: 0.0 !cur 0 + end; + files.(!cur) + end else !curpath + in +(*JPF*) + let xlevel, enhanced, checked = Jpf.get_flags f in +(* + if enhanced then filter_toggle `ENHANCE; +*) + + let f = + if !gcheck && files.(!cur) = f then begin + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + let newname = Jpf.set_flags files.(!cur) (xlevel,enhanced,true) in + if files.(!cur) <> newname then begin + rename !cur newname + end; + newname end else f + in +(*/JPF*) + + display_image reload f; +(*JPF*) +(* + if enhanced then filter_toggle `ENHANCE; +*) +(*/JPF*) +>>>>>>> 1.10 + +<<<<<<< liv.ml +(*JPF*) + let check_skip mode = + match mode with + | Some `FORCE -> () + | Some `DIR -> + let disp_file = files.(!disp_cur) in + let cur_file = files.(!cur) in + if Filename.dirname disp_file = Filename.dirname cur_file then + raise Skipped + | None -> + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + if !gcheck && checked then raise Skipped; + match !xmode with + | `n -> () + | `u -> if xlevel < 0 then raise Skipped + | `x -> +(* + let imgs = Array.length files in +*) + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 25 + | 1 -> 50 + | 2 -> 75 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + | `X -> + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 0 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + in +(*/JPF*) +======= + () + in + +(*JPF*) + let check_skip mode = + match mode with + | Some `FORCE -> () + | Some `DIR -> + let disp_file = files.(!disp_cur) in + let cur_file = files.(!cur) in + if Filename.dirname disp_file = Filename.dirname cur_file then + raise Skipped + | None -> + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + if !gcheck && checked then raise Skipped; + match !xmode with + | `n -> () + | `u -> if xlevel < 0 then raise Skipped + | `x -> +(* + let imgs = Array.length files in +*) + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 25 + | 1 -> 50 + | 2 -> 75 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + | `X -> + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 0 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + in +(*/JPF*) +>>>>>>> 1.10 + + let rec next mode = + if !cur >= 0 then begin + let cur' = + if !cur >= Array.length files - 1 then 0 else !cur + 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false; + with + | Sys_error s -> + prerr_endline s; + next mode +(*JPF*) + | Skipped -> next mode +(*/JPF*) + | Wrong_file_type | Wrong_image_type -> next mode + end + end + in + + let rec prev mode = + if !cur >= 0 then begin + let cur' = + if !cur = 0 then Array.length files - 1 else !cur - 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false + with + | Sys_error s -> + prerr_endline s; + prev mode + | Skipped -> prev mode + | Wrong_file_type | Wrong_image_type -> prev mode + end + end + in + + let bind () = + let callback = fun ev -> + begin match GdkEvent.Key.string ev with +(* + | "E" -> + filter_toggle `ENHANCE; + display_current true + +*) +(*JPF*) + | "E" -> + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let enhance' = not enhance in + let newname = Jpf.set_flags name (xlevel,enhance',checked) in + if name <> newname then begin + rename !disp_cur newname + end; + display_current true +(*/JPF*) +(* + | "N" -> + filter_toggle `NORMALIZE; + display_current true +*) + + | "l" -> display_current true + + | " " | "n" | "f" -> next None +(*JPF*) + | "\014" (* C-N *) | "\006" (* C-F *) -> next (Some `FORCE) + | "N" | "F" -> next (Some `DIR) +(*/JPF*) + | "p" | "b" -> prev None +(*JPF*) + | "\016" (* C-P *) | "\002" (* C-B *) -> prev (Some `FORCE) + | "P" | "B" -> prev (Some `DIR) +(*/JPF*) + | "q" -> Main.quit () + | "v" -> + (* liv visual shell *) + let rec func = fun file typ -> + match typ with + | "image", _ -> + display_image false file +(* + | "special", "dir" -> + new Livsh.livsh file func; () +*) + | _ -> Gdk.X.beep () + in + (* where we should display ? *) + let dirname = + if Array.length files = 0 then Unix.getcwd () + else Filename.dirname files.(!cur) + in + let dirname = + if Filename.is_relative dirname then begin + let cwd = Unix.getcwd () in + Filename.concat cwd dirname + end else dirname + in + ignore (new Livsh.livsh dirname func) +(*JPF*) + | "e" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = -1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "x" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = xlevel + 1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "r" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = + if xlevel > 0 then xlevel - 1 + else if xlevel < 0 then xlevel + 1 + else xlevel + in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "s" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 7 = "/series" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 7)) base + else Filename.concat (Filename.concat dir "series") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "d" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 6 = "/trash" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 6)) base + else Filename.concat (Filename.concat dir "trash") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end +(*/JPF*) + | _ -> () + end; false + in + ignore (window#event#connect#key_press ~callback: callback); + ignore (infowindow#event#connect#key_press ~callback: callback); + + ignore (imglist#connect#select_row ~callback: (fun ~row ~column ~event -> + if !cur <> row then begin + cur := row; + display_image false files.(!cur) + end)) + in + + bind (); + + Tout.hook_next := next; + + window#show (); + + let starter = ref None in + +<<<<<<< liv.ml + starter := Some (window#event#connect#configure ~callback: (fun ev -> + may window#misc#disconnect !starter; + if Array.length files <> 0 then begin + cur := 0; + prog#unmap (); + display_current false + end else begin + try + display_image false (Pathfind.find [ "~/.liv"; + "/usr/lib/liv"; + "/usr/local/lib/liv"; + "." ] "liv.jpg") + with + | _ -> () + end; false)); + + Main.main () +======= + starter := Some (window#event#connect#configure ~callback: (fun ev -> + may window#misc#disconnect !starter; + if Array.length files <> 0 then begin + cur := 0; + prog#unmap (); + display_current false + end else begin + try + display_image false (Pathfind.find [ "~/.liv"; + "/usr/lib/liv"; + "/usr/local/lib/liv"; + "." ] "liv.jpg") + with + | _ -> () + end; false)); + +(* + let release _ = prerr_endline "freed string!" in + let test () = + let f () = + let string = String.create 3000 in + Gc.finalise release string; + let buf = Gpointer.region_of_string string in + ignore (GdkPixbuf.from_data ~width: 100 ~height: 10 + ~bits: 8 ~rowstride:300 ~has_alpha: false buf); + () + in + for i = 0 to 100 do f () done + in + test (); +*) + + Main.main () +>>>>>>> 1.10 diff -Nru camlimages-3.0.1/examples/liv-furuse/liv-org.ml camlimages-4.0.1/examples/liv-furuse/liv-org.ml --- camlimages-3.0.1/examples/liv-furuse/liv-org.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/liv-org.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,706 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999,2000,2001,2002,2001,2002 *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) +open Images +open OImages + +(* +let _ = + Bitmap.maximum_live := 15000000; (* 60MB *) + Bitmap.maximum_block_size := !Bitmap.maximum_live / 16; +;; +*) + +open Gc +open Unix +open LargeFile +open Gdk +open GDraw +open GMain + +open Livmisc +open Gui +open Display +open Tout + +exception Skipped + +let cwd = Unix.getcwd () +let home = Sys.getenv "HOME" + +let convert_file file = + let b = Buffer.create (String.length file) in + + let rec loop file = + let dir = Filename.dirname file in + let base = Filename.basename file in + begin match dir with + | "." -> Buffer.add_string b dir + | "/" -> () + | _ -> loop dir + end; + Buffer.add_char b '/'; + Buffer.add_string b (try Glib.Convert.locale_to_utf8 base with _ -> base) + in + loop file; + Buffer.contents b +;; + +let base_filters = ref ([] : Display.filter list);; + +let _ = + let r = Gc.get () in r.max_overhead <- 0; Gc.set r; + + let files = ref [] in + let random = ref false in + let dirrandom = ref false in + let dirsample = ref false in + let size = ref false in + +(*JPF*) + let mtimesort = ref false in + let xmode = ref `n in + let check = ref true in + let gcheck = ref false in +(*/JPF*) + + Random.init (Pervasives.truncate (Unix.time ())); + Arg.parse + [ + "-random", Arg.Unit (fun () -> random := true), ": random mode"; + "-dirrandom", Arg.Unit (fun () -> dirrandom := true), ": random per directory mode"; + "-dirsample", Arg.Unit (fun () -> dirsample := true), ": random per directory sample mode"; + "-wait", Arg.Float (fun sec -> Tout.wait := sec), "sec : wait sec"; + "-root", Arg.String (function + "center" -> Display.root_mode := `CENTER + | "random" -> Display.root_mode := `RANDOM + | _ -> raise (Failure "root mode")), ": on root [center|random]"; + "-transition", Arg.String (function + "myst" -> Display.transition := `MYST + | "transparent" -> Display.transition := `TRANSPARENT + | _ -> raise (Failure "transition")), ": transition [myst|transparent]"; + "-transparentborder", Arg.Unit (fun () -> + base_filters := `TRANSPARENT_BORDER :: !base_filters), + ": transparent border filter"; + "-size", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`NOASPECT) :: !base_filters + | _ -> raise (Failure "size")), ": size [w]x[h]"; + "-atleast", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATLEAST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + "-atmost", Arg.String (fun s -> + match Mstring.split_str (function 'x' -> true | _ -> false) s with + [w;h] -> + size := true; + base_filters := `SIZE (int_of_string w, int_of_string h,`ATMOST) :: !base_filters + | _ -> raise (Failure "zoom")), ": zoom [w]x[h]"; + + "-normalize", Arg.Unit (fun () -> + base_filters := `NORMALIZE :: !base_filters), + ": normalize colormap"; + + "-enhance", Arg.Unit (fun () -> + base_filters := `ENHANCE :: !base_filters), + ": enhance colormap"; + +(*JPF*) + "-check", Arg.Unit (fun () -> check := true), ": check mode"; + "-Check", Arg.Unit (fun () -> check := true; gcheck := true), + ": ground check mode"; + "-x", Arg.Unit (fun () -> xmode := `x), ": x mode"; + "-X", Arg.Unit (fun () -> xmode := `X), ": X mode"; + "-_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "--_", Arg.Unit (fun () -> xmode := `u), ": -_ mode"; + "-mtime", Arg.Unit (fun () -> mtimesort := true), ": mtimesort mode"; +(*/JPF*) + ] + (fun s -> files := s :: !files) + "liv files"; + + let files = + let fs = ref [] in + List.iter (fun f -> + try + let st = stat f in + match st.st_kind with + | S_DIR -> + Scandir.scan_dir (fun f -> + try + ignore (guess_extension (snd (Livmisc.get_extension f))); + fs := f :: !fs; + with e -> (* prerr_endline ((f^": "^ Printexc.to_string e)) *) ()) f + | _ -> fs := f :: !fs + with + | _ -> prerr_endline ("ERROR: " ^ f)) !files; + Array.of_list !fs + in + + if not !size then + base_filters := `SIZE (fst root_size, snd root_size, `ATMOST) + :: !base_filters; + base_filters := List.rev !base_filters; + + let cur = ref (-1) in + let curpath = ref "" in + + let disp_cur = ref (-1) in + + let random_array ary = + let num = Array.length ary in + for i = 0 to num - 1 do + let tmp = ary.(i) in + let pos = Random.int num in + ary.(i) <- ary.(pos); + ary.(pos) <- tmp + done + in + + if !dirsample then begin + let tbl = Hashtbl.create 17 in + let dirs = ref [] in + let num_files = Array.length files in + for i = 0 to num_files - 1 do + let dirname = Filename.dirname files.(i) in + Hashtbl.add tbl dirname files.(i); + if not (List.mem dirname !dirs) then dirs := dirname :: !dirs + done; + let dirsarray = Array.of_list !dirs in + random_array dirsarray; + let pos = ref 0 in + let subpos = ref 0 in + let subfiles = Array.init (Array.length dirsarray) (fun a -> + let ary = Array.of_list (Hashtbl.find_all tbl dirsarray.(a)) in + random_array ary; ary) + in + while !pos < Array.length files do + for i = 0 to Array.length dirsarray - 1 do + if !subpos < Array.length subfiles.(i) then begin + files.(!pos) <- subfiles.(i).(!subpos); + incr pos + end + done; + incr subpos + done + end else + if !dirrandom then begin + let tbl = Hashtbl.create 17 in + let dirs = ref [] in + let num_files = Array.length files in + for i = 0 to num_files - 1 do + let dirname = Filename.dirname files.(i) in + Hashtbl.add tbl dirname files.(i); + if not (List.mem dirname !dirs) then dirs := dirname :: !dirs + done; + let dirsarray = Array.of_list !dirs in + random_array dirsarray; + let pos = ref 0 in + for i = 0 to Array.length dirsarray - 1 do + let dirfiles = Array.of_list + (List.sort compare (Hashtbl.find_all tbl dirsarray.(i))) in + if !random then begin + random_array dirfiles + end; + for j = 0 to Array.length dirfiles - 1 do + files.(!pos) <- dirfiles.(j); + incr pos + done + done + end else if !random then random_array files; + +(*JPF*) + let files = + if !mtimesort then begin + let ctimes = + Array.map (fun f -> + let st = lstat f in + let t = st.st_mtime in + f,(if !random then t +. Random.float (float (24*60*60)) else t)) files + in + Array.sort (fun (f1,t1) (f2,t2) -> + let c = compare t1 t2 in + if c = 0 then compare f1 f2 else c) ctimes; + Array.map fst ctimes + end else files + in +(*/JPF*) + + infowindow#show (); + + imglist#freeze (); + Array.iter (fun file -> + ignore (imglist#append [convert_file file])) + files; + imglist#thaw (); + + let cache = Cache.create 5 in + + let rename pos newname = + let oldname = files.(pos) in + let xvname s = Filename.dirname s ^ "/.xvpics/" ^ Filename.basename s in + let oldxvname = xvname oldname in + let newxvname = xvname newname in + let gthumbname s = + let abs = + if s = "" then "" else + if s.[0] = '/' then s + else Filename.concat cwd s + in + (Filename.concat (Filename.concat home ".gnome2/gthumb/comments") abs) + ^ ".xml" + in + let oldgthumbname = gthumbname oldname in + let newgthumbname = gthumbname newname in + imglist#set_cell ~text: (convert_file newname) pos 0; + let command s = Sys.command s in + if Filename.dirname newname <> Filename.dirname oldname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newname))); + end; + prerr_endline (Printf.sprintf "%s => %s" oldname newname); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldname newname)); + if Sys.file_exists oldxvname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newxvname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldxvname newxvname)) + end; + if Sys.file_exists oldgthumbname then begin + ignore (command + (Printf.sprintf "mkdir -p %s" (Filename.dirname newgthumbname))); + ignore (command + (Printf.sprintf "yes no | mv -i \"%s\" \"%s\"" oldgthumbname newgthumbname)) + end; + files.(pos) <- newname; + Cache.rename cache oldname newname + in + + let image_id = ref 0 in + + let display_image reload file = + (* prerr_endline file; *) + remove_timeout (); + + let load_image () = + prog#map (); + prog#set_fraction 0.01; + prog#set_format_string ("loading..."); + let image = + try + match tag (OImages.load file + [Load_Progress prog#set_fraction]) with + | Rgb24 i -> i + | Rgba32 i -> i#to_rgb24 + | Index8 i -> i#to_rgb24 + | Index16 i -> i#to_rgb24 + | _ -> raise (Failure "not supported") + with + | e -> prerr_endline (Printexc.to_string e); raise e + in + prog#set_fraction 1.0; sync (); + image + in + + let id, image = + try + if not reload then begin + Cache.find cache file + end else raise Not_found + with + Not_found -> + let im = load_image () in + incr image_id; + !image_id, im + in + Cache.add cache file (id, image); + + prog#set_fraction 0.01; + display id image !base_filters; + + window#set_title (convert_file file); + + disp_cur := !cur; + curpath := file; +(*JPF*) + (* update mtime *) + if !check then begin + try + let st = lstat file in + if st.st_kind = S_LNK then begin + let lnk = Unix.readlink file in + Unix.unlink file; + Unix.symlink lnk file + end else begin + Unix.utimes file (Unix.time ()) (Unix.time ()); + end + with + _ -> () + end; + Gc.compact () +(*/JPF*) + in + + let display_image reload file = + try + display_image reload file + with Wrong_file_type | Wrong_image_type -> + try + prerr_endline "guess type"; + let typ = + let typ = Livshtype.guess file in + match typ with + | Livshtype.ContentType x -> + begin match + Mstring.split_str (function '/' -> true | _ -> false) x + with + | [mj;mn] -> mj,mn + | _ -> assert false + end + | Livshtype.ContentEncoding x -> + "encoding", x + | Livshtype.Special m -> + "special",m + in + prerr_endline (fst typ ^ "/" ^ snd typ); + match typ with +(*JPF*) + | "application", "vnd.rn-realmedia" + | "audio", "x-pn-realaudio" -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop \"%s\" &" file)) + | "video", _ -> + disp_cur := !cur; + curpath := file; + ignore (Sys.command "killall -KILL mplayer"); + ignore (Sys.command (Printf.sprintf "mplayer -framedrop '%s' &" file)) +(*/JPF*) + | _ -> raise Wrong_file_type + with + | _ -> () + in + + let filter_toggle opt = + if List.mem opt !base_filters then + base_filters := + List.fold_right (fun x st -> + if x = opt then st + else x :: st) !base_filters [] + else + base_filters := !base_filters @ [opt] + in + + let display_current reload = + let f = + if !cur >= 0 && !cur < Array.length files then begin + imglist#unselect_all (); + imglist#select !cur 0; + if imglist#row_is_visible !cur <> `FULL then begin + imglist#moveto ~row_align: 0.5 ~col_align: 0.0 !cur 0 + end; + files.(!cur) + end else !curpath + in +(*JPF*) + let xlevel, enhanced, checked = Jpf.get_flags f in + if enhanced then filter_toggle `ENHANCE; + + let f = + if !gcheck && files.(!cur) = f then begin + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + let newname = Jpf.set_flags files.(!cur) (xlevel,enhanced,true) in + if files.(!cur) <> newname then begin + rename !cur newname + end; + newname end else f + in +(*/JPF*) + + display_image reload f; +(*JPF*) + if enhanced then filter_toggle `ENHANCE; +(*/JPF*) + + () + in + +(*JPF*) + let check_skip mode = + match mode with + | Some `FORCE -> () + | Some `DIR -> + let disp_file = files.(!disp_cur) in + let cur_file = files.(!cur) in + if Filename.dirname disp_file = Filename.dirname cur_file then + raise Skipped + | None -> + let xlevel, enhanced, checked = Jpf.get_flags files.(!cur) in + if !gcheck && checked then raise Skipped; + match !xmode with + | `n -> () + | `u -> if xlevel < 0 then raise Skipped + | `x -> +(* + let imgs = Array.length files in +*) + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 25 + | 1 -> 50 + | 2 -> 75 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + | `X -> + let perc = + if xlevel < 0 then 0 else + match xlevel with + 0 -> 0 + | _ -> 100 + in + if Random.int 100 < perc then () else raise Skipped + in +(*/JPF*) + + let rec next mode = + if !cur >= 0 then begin + let cur' = + if !cur >= Array.length files - 1 then 0 else !cur + 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false; + with + | Sys_error s -> + prerr_endline s; + next mode +(*JPF*) + | Skipped -> next mode +(*/JPF*) + | Wrong_file_type | Wrong_image_type -> next mode + end + end + in + + let rec prev mode = + if !cur >= 0 then begin + let cur' = + if !cur = 0 then Array.length files - 1 else !cur - 1 + in + if !cur = cur' then () + else begin + cur := cur'; + try +(*JPF*) + check_skip mode; +(*/JPF*) + display_current false + with + | Sys_error s -> + prerr_endline s; + prev mode + | Skipped -> prev mode + | Wrong_file_type | Wrong_image_type -> prev mode + end + end + in + + let bind () = + let callback = fun ev -> + begin match GdkEvent.Key.string ev with +(* + | "E" -> + filter_toggle `ENHANCE; + display_current true + +*) +(*JPF*) + | "E" -> + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let enhance' = not enhance in + let newname = Jpf.set_flags name (xlevel,enhance',checked) in + if name <> newname then begin + rename !disp_cur newname + end; + display_current true +(*/JPF*) +(* + | "N" -> + filter_toggle `NORMALIZE; + display_current true +*) + + | "l" -> display_current true + + | " " | "n" | "f" -> next None +(*JPF*) + | "\014" (* C-N *) | "\006" (* C-F *) -> next (Some `FORCE) + | "N" | "F" -> next (Some `DIR) +(*/JPF*) + | "p" | "b" -> prev None +(*JPF*) + | "\016" (* C-P *) | "\002" (* C-B *) -> prev (Some `FORCE) + | "P" | "B" -> prev (Some `DIR) +(*/JPF*) + | "q" -> Main.quit () + | "v" -> + (* liv visual shell *) + let rec func = fun file typ -> + match typ with + | "image", _ -> + display_image false file +(* + | "special", "dir" -> + new Livsh.livsh file func; () +*) + | _ -> Gdk.X.beep () + in + (* where we should display ? *) + let dirname = + if Array.length files = 0 then Unix.getcwd () + else Filename.dirname files.(!cur) + in + let dirname = + if Filename.is_relative dirname then begin + let cwd = Unix.getcwd () in + Filename.concat cwd dirname + end else dirname + in + ignore (new Livsh.livsh dirname func) +(*JPF*) + | "e" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = -1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "x" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = xlevel + 1 in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "r" -> + if !check then begin + let name = files.(!disp_cur) in + let xlevel,enhance,checked = Jpf.get_flags name in + let xlevel' = + if xlevel > 0 then xlevel - 1 + else if xlevel < 0 then xlevel + 1 + else xlevel + in + let newname = Jpf.set_flags name (xlevel',enhance,checked) in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "s" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 7 = "/series" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 7)) base + else Filename.concat (Filename.concat dir "series") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end + | "d" -> + if !check then begin + let name = files.(!disp_cur) in + let dir = Filename.dirname name in + let base = Filename.basename name in + let newname = + let trash = + try string_tail dir 6 = "/trash" with _ -> false + in + if trash then + Filename.concat + (String.sub dir 0 (String.length dir - 6)) base + else Filename.concat (Filename.concat dir "trash") base + in + if name <> newname then begin + rename !disp_cur newname + end; + next None + end +(*/JPF*) + | _ -> () + end; false + in + ignore (window#event#connect#key_press ~callback: callback); + ignore (infowindow#event#connect#key_press ~callback: callback); + + ignore (imglist#connect#select_row ~callback: (fun ~row ~column ~event -> + if !cur <> row then begin + cur := row; + display_image false files.(!cur) + end)) + in + + bind (); + + Tout.hook_next := next; + + window#show (); + + let starter = ref None in + + starter := Some (window#event#connect#configure ~callback: (fun ev -> + may window#misc#disconnect !starter; + if Array.length files <> 0 then begin + cur := 0; + prog#unmap (); + display_current false + end else begin + try + display_image false (Pathfind.find [ "~/.liv"; + "/usr/lib/liv"; + "/usr/local/lib/liv"; + "." ] "liv.jpg") + with + | _ -> () + end; false)); + + Main.main () diff -Nru camlimages-3.0.1/examples/liv-furuse/livsh.ml camlimages-4.0.1/examples/liv-furuse/livsh.ml --- camlimages-3.0.1/examples/liv-furuse/livsh.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/livsh.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,393 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: livsh.ml,v 1.10 2008/02/19 12:44:04 furuse Exp $ *) + +open OImages;; +open GBin;; +open GPack;; +open Ximage2;; +open Gui;; +open Livshtype;; +open Livmisc;; + +let font = + Gdk.Font.load "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1";; + +let dummy_pixmap = + try + GDraw.pixmap_from_xpm_d (* ~window: window (may hang...) *) + ~colormap: colormap ~data: Deficon.data () + with + | _ -> failwith "default icon does not exist...";; + +let joe_anim = + lazy + (try + Some (Seq.load_sequence_as_pixmaps ~window: window#misc#window + (Pathfind.find + ["~/.liv"; "/usr/lib/liv"; "/usr/local/lib/liv"; "."] + "faceanm.gif")) + with + | _ -> prerr_endline "There is no Joe's face!"; None);; + +let icon_width = 80;; +let icon_height = 60;; +let button_width = 100;; +let button_height = 80;; +let label_height = 16;; +let max_text = button_width * 9 / 10;; + +class virtual icon_creator = object (self) + val mutable icons = [] + + method virtual activate : unit -> unit + method virtual deactivate : unit -> unit + method virtual set_text : string -> unit + + method add f = + let was_empty = icons = [] in + icons <- f :: icons; + if was_empty + then ignore (GMain.Timeout.add ~ms: 1 ~callback: self#make_icon) + + method make_icon () = + begin match icons with + | [] -> self#deactivate (); sync () + | f :: fs -> + icons <- fs; + f (); + self#activate (); + sync (); + ignore (GMain.Timeout.add ~ms: 1 ~callback: self#make_icon) + end; + false + + method clear () = icons <- [] +end + +and icon ~dir ~name (req : icon_creator) = + let ebox = + GBin.event_box ~border_width: 0 + ~width: button_width ~height: (button_height + label_height) () in + let vbox = lazy (GPack.vbox ~packing: ebox#add ()) in + let pressed = ref (fun () -> ()) + and enter = ref (fun () -> ()) + and leave = ref (fun () -> ()) in + let button = lazy ( + let b = + GButton.button (* ~width:button_width + ~height:button_height ~border_width:0 *) + ~packing: !!vbox#pack () in + ignore (b#connect#pressed ~callback: !pressed); + ignore (b#connect#enter ~callback: !enter); + ignore (b#connect#leave ~callback: !leave); + b) in + let pix = lazy ( + GMisc.pixmap dummy_pixmap ~width:icon_width ~height:icon_height + ~packing: !!button#add ()) in + let label = lazy ( + let shorten_name name = + let rec aux name = + let name_dots = name ^ "..." in + if Gdk.Font.string_width font name_dots > max_text then + if name = "" then name_dots + else aux (String.sub name 0 (String.length name - 1)) + else name_dots in + if Gdk.Font.string_width font name > max_text then aux name else name in + GMisc.label + ~text: (shorten_name name) + ~width:button_width ~packing: !!vbox#pack ~justify: `LEFT ()) in + let typ = lazy ( + try + let typ = Livshtype.guess (Filename.concat dir name) in + match typ with + | ContentType x -> + begin + match Mstring.split_str (fun c -> c = '/') x with + | [mj; mn] -> mj, mn + | _ -> assert false + end + | ContentEncoding x -> "encoding", x + | Special m -> "special", m + with + | _ -> "?","?") in + + object (self) + inherit GObj.widget_full ebox#as_widget + + method connect_pressed f = pressed := f + method connect_enter f = enter := f + method connect_leave f = leave := f + + method typ = !!typ + + val info_icon = + Mylazy.make (fun () -> + (* prerr_endline (Printf.sprintf "Icon(%s)" name); *) + let info, pixmap = Icon.load_icon (Filename.concat dir name) !!typ in + prog#unmap (); + !!pix#set_pixmap pixmap; + sync (); + (* prerr_endline "done"; *) + info, pixmap) + + method info = fst (Mylazy.force info_icon) + method icon = snd (Mylazy.force info_icon) + + val mutable x = -1 + val mutable y = -1 + + method position = x, y + method set_position nx ny = x <- nx; y <- ny + + method name = name + + initializer + let callback v = (fun _ -> + (* we create vbox button pix and label if they are not available *) + ignore !!vbox; ignore !!button; ignore !!pix; ignore !!label; + begin match !info_icon with + | Mylazy.Delayed _ -> + req#add (fun () -> + if !!button#misc#visible then + (try ignore (self#icon) with _ -> ())) + | _ -> () + end; + v) in + (* + (* for the widget visible from the first *) + ignore (ebox#misc#connect#draw ~callback: (fun _ -> + (* prerr_endline (Printf.sprintf "draw(%s)" name); *) + callback () ())); + *) + (* for newly appearing widgets *) + ignore + (ebox#event#connect#expose + ~callback: (fun _ -> + if ebox#misc#visible then begin + (* prerr_endline (Printf.sprintf "expose(%s)" name); *) + callback true () end else true)) +end;; + +class livsh init_dir func = + (* widgets *) + let win = + GWindow.window ~allow_shrink: true ~allow_grow: true + ~width: 100 ~height: 100 ~title: "liv shell" () in + let style = win#misc#style in + let _ = + style#set_font font; + win#misc#set_style style; in + + let vbox = vbox ~packing: win#add () in + let vhbox = hbox ~packing: (vbox#pack ~expand: false ~fill: true) () in + let toolbar = + GButton.toolbar ~packing: (vhbox#pack ~expand: false ~fill: true) () in + let _ = + toolbar#insert_button ~text: "Back" ~tooltip: "Go back" () in + let _ = + toolbar#insert_button ~text: "Forward" ~tooltip: "Go forward" () in + let _ = + toolbar#insert_button ~text: "Reload" ~tooltip: "Reload" () in + let _ = + toolbar#insert_button ~text: "Home" ~tooltip: "Go to Home" () in + let _ = + GEdit.entry ~editable: true ~max_length: 256 + ~packing: (vhbox#pack ~expand: true ~fill: true) () in + let joe = + JWidget.img_button ?frames: !!joe_anim + ~packing: (vhbox#pack ~expand: false ~fill: false) () in + let viewport = + GBin.scrolled_window + ~hpolicy: `AUTOMATIC ~vpolicy: `ALWAYS + ~packing: (vbox#pack ~expand: true ~fill: true) () in + let fixed = GPack.fixed ~border_width: 2 ~width: 1 ~height: 1 () in + (* + let fixed = + GPack.layout ~border_width: 2 + ~layout_width: 1000 ~layout_height: 1000 () in + *) + let _ = viewport#add_with_viewport fixed#coerce in + + let reconf_tout = ref None in + + object (self) + inherit icon_creator + inherit + JWidget.status_bar + ~packing: (vbox#pack ~expand: false ~fill: false) + ~show: true () as status_bar + + method activate () = joe#start_rotate; status_bar#activate () + method deactivate () = joe#stop_rotate; status_bar#set_fraction 0.0 + + val mutable dir = init_dir + val mutable items = [] + val mutable prevw = -1 + val mutable prevh = -1 + + method reconfigure () = + let content_window = + Gdk.Window.get_parent (Gdk.Window.get_parent fixed#misc#window) in + let vw,vh = Gdk.Drawable.get_size content_window in + if vw <> prevw || vh <> prevh then begin + joe#start_rotate; + prevw <- vw; + prevh <- vh; +(* + prerr_endline "RECONFIG"; + prerr_endline (Printf.sprintf "get size done (%d,%d)" vw vh); +*) + fixed#misc#unmap (); + + let mx = ref 0 and my = ref 0 in + let x = ref 0 and y = ref 0 in + let positions = + List.map + (fun item -> + let px = !x and py = !y in + if !mx < !x + button_width then mx := !x + button_width; + if !my < !y + button_height + label_height + then my := !y + button_height + label_height; + x := !x + button_width; + if !x + button_width > vw then begin + x := 0; + y := !y + button_height + label_height + end; + px, py) + items in + + let adj = viewport#vadjustment in + adj#set_value 0.0; + viewport#set_vadjustment adj; + + List.iter2 + (fun item (x,y) -> + let ix, iy = item#position in + if ix < 0 + then fixed#put item#coerce ~x ~y + else fixed#move item#coerce ~x ~y; + item#set_position x y) + items positions; + +(* + prerr_endline (Printf.sprintf "change %dx%d" !mx !my); +*) + fixed#misc#set_size_request ~width: !mx ~height: !my (); + fixed#misc#map (); + end + + method force_reconfigure () = + prevw <- -1; + prevh <- -1; + self#reconfigure () + + method open_dir d = + joe#start_rotate; + self#clear (); + let num_files = ref 0 in + List.iter (fun item -> item#destroy ()) items; + items <- []; + + self#set_text ("Opening "^d^" ..."); + let dh = Unix.opendir d in + let files = + let files = ref [] in + begin + try + while true do + files := Unix.readdir dh :: !files; + self#activate (); + sync (); + incr num_files; + done with + | End_of_file -> () + end; + Unix.closedir dh; + !files in + self#set_text ""; + self#set_fraction 0.0; + + (* successfully loaded *) + dir <- d; + + self#set_text ("Scanning " ^ d); + let items_unsort = + let cntr = ref 0 in + List.fold_right + (fun f acc -> + incr cntr; + self#set_fraction (float !cntr /. float !num_files); sync (); + if f = "." || f = ".xvpics" then acc else begin + let box = new icon ~dir: dir ~name: f (self :> icon_creator) in + ignore ( + box#connect_pressed (fun () -> + Livmisc.after + (fun () -> + if !active then begin + active := false; + let file = + Livmisc.normalize_filename (Filename.concat dir f) in + let typ = box#typ in + prerr_endline + ("Pressed " ^ file ^ + " (" ^ fst typ ^ "/" ^ snd typ ^ ")"); + match typ with + | "special", "dir" + | "special", "lnkdir" -> + self#open_dir file; + self#force_reconfigure () + | t -> func file t + end) + (fun () -> active := true))); + box#connect_enter + (fun () -> self#set_text (Filename.concat dir f)); + box#connect_leave + (fun () -> self#set_text ""); + box :: acc + end) + files [] in + + let sortf a b = + let typval i = + match i#typ with + | "special", "dir" -> 0 + | "special", "lnkdir" -> 0 + | "special", _ -> 10 + | _ -> 100 in + if typval a = typval b then a#name < b#name + else typval a < typval b in + + items <- Sort.list sortf items_unsort; + self#set_text ""; + self#deactivate () + + initializer + ignore (win#connect#destroy ~callback: + (fun () -> + self#clear (); + match !reconf_tout with + | Some id -> GMain.Timeout.remove id + | None -> ())); + + self#open_dir dir; + (* This does not work well... + ignore (win#connect#after#event#configure ~callback: (fun _ -> + self#reconfigure (); true)); *) + reconf_tout := + Some (GMain.Timeout.add ~ms: 500 + ~callback: (fun _ -> self#reconfigure (); true)); + win#set_default_size ~width: (button_width * 13 / 2) + ~height: ((button_height + label_height) * 9 / 2); + win#show (); +end;; diff -Nru camlimages-3.0.1/examples/liv-furuse/livshtype.ml camlimages-4.0.1/examples/liv-furuse/livshtype.ml --- camlimages-3.0.1/examples/liv-furuse/livshtype.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/livshtype.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,129 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: livshtype.ml,v 1.5 2004/09/24 10:55:08 weis Exp $ *) + +open Mstring;; +open Unix;; +open Images;; +open Info;; + +type typ = + | ContentType of string + | ContentEncoding of string + | Special of string;; + +let default_mime_types = "/etc/mime.types";; + +let suffixes = Hashtbl.create 107;; + +let add_suffix (s, t) = Hashtbl.add suffixes s t;; + +(* Even if we don't have a suffix file... *) +(* If the suffix file says otherwise, it will have priority *) +let default_mime_suffixes = [ + "html", ContentType "text/html"; + "htm", ContentType "text/html"; + "txt", ContentType "text/plain"; + "ps", ContentType "application/postscript"; + "dvi", ContentType "application/x-dvi"; + "advi", ContentType "application/advi"; + "gif", ContentType "image/gif"; + "jpeg", ContentType "image/jpeg"; + "jpg", ContentType "image/jpeg"; + "bmp", ContentType "image/bmp"; + "png", ContentType "image/png"; + "tiff", ContentType "image/tiff"; + "tif", ContentType "image/tiff"; + "au", ContentType "audio/basic"; + "snd", ContentType "audio/basic"; + "wav", ContentType "audio/x-wav"; + "mid", ContentType "audio/midi"; + "mpeg", ContentType "video/mpeg"; + "mpg", ContentType "video/mpeg"; + "avi", ContentType "video/avi"; + "wmv", ContentType "video/wmv"; + "fli", ContentType "video/fli"; + "flc", ContentType "video/fli"; + "gz", ContentEncoding "gzip"; + "Z", ContentEncoding "compress"; + "asc", ContentEncoding "pgp"; + "pgp", ContentEncoding "pgp"; + "cmo", ContentType "application/x-caml-applet"; +];; + +List.iter add_suffix default_mime_suffixes;; + +(* mime_types *) +let read_suffix_file f = + try + let ic = open_in f in + try + while true do + let l = input_line ic in + if l <> "" && l.[0] <> '#' then + let tokens = split_str (function ' ' | '\t' -> true | _ -> false) l in + match tokens with + | [] -> () + | x :: l -> + try + ignore (String.index x '/'); + List.iter (function sufx -> add_suffix (sufx, ContentType x)) l + with + | Not_found -> + List.iter (function sufx -> add_suffix (sufx, ContentEncoding x)) l + done + with End_of_file -> close_in ic + with Sys_error _ -> ();; + +let guess link_as_link f = + let from_header f = + match Images.guess_format f with + | Gif -> ContentType "image/gif" + | Tiff -> ContentType "image/tiff" + | Jpeg -> ContentType "image/jpeg" + | Png -> ContentType "image/png" + | Xpm -> ContentType "image/x-xpixmap" + | Bmp -> ContentType "image/bmp" + | Ppm -> ContentType "image/x-portable-pixmap" + | Ps -> ContentType "application/postscript" in + + let st = if link_as_link then Unix.lstat f else Unix.stat f in + match st.st_kind with + | S_DIR -> Special "dir" + | S_CHR -> Special "chr" + | S_BLK -> Special "blk" + | S_LNK -> + begin + try + let st = Unix.stat f in + match st.st_kind with + | S_DIR -> Special "lnkdir" + | _ -> begin try from_header f with _ -> Special "lnk" end + with + | _ -> Special "lnk" + end + | S_FIFO -> Special "fifo" + | S_SOCK -> Special "sock" + | _ -> + begin + try from_header f + with + | _ -> + Hashtbl.find suffixes (String.lowercase (snd (Livmisc.get_extension f))) + end;; + +let guess = guess false +and lguess = guess true;; + +(* prerr_endline "reading suffix"; *) +read_suffix_file default_mime_types;; diff -Nru camlimages-3.0.1/examples/liv-furuse/livshtype.mli camlimages-4.0.1/examples/liv-furuse/livshtype.mli --- camlimages-3.0.1/examples/liv-furuse/livshtype.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/livshtype.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,7 @@ +type typ = + ContentType of string + | ContentEncoding of string + | Special of string +val default_mime_types : string +val read_suffix_file : string -> unit +val guess : string -> typ diff -Nru camlimages-3.0.1/examples/liv-furuse/Monalisa.xpm camlimages-4.0.1/examples/liv-furuse/Monalisa.xpm --- camlimages-3.0.1/examples/liv-furuse/Monalisa.xpm 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/Monalisa.xpm 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,130 @@ +/* XPM */ +static char *Monalisa[] = { +/* width height num_colors chars_per_pixel */ +" 48 48 27 1", +/* colors */ +". c #000000", +"# c #281808", +"a c #38240c", +"b c #492c10", +"c c #553414", +"d c #593818", +"e c #5a5a5a", +"f c #65411c", +"g c #794d24", +"h c #7d5124", +"i c #86592c", +"j c #966534", +"k c #9a6938", +"l c #aa7545", +"m c #ae7949", +"n c #b68251", +"o c #be8a59", +"p c #c79665", +"q c #cf9e6d", +"r c #d3a275", +"s c #d7aa7d", +"t c #dfb28a", +"u c #e3ba92", +"v c #ebc7a6", +"w c #ebcbae", +"x c #ffffff", +"y c None", +/* pixels */ +"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", +"e..............................................x", +"e.oppqnnoononoonnoonpppooqpooonopppqppoonnpoopox", +"e.oloonpnoonpooooopnpolljjllnpnqoopooopnnnnpoopx", +"e.looooopnoonpoppoplifbbbbccdgloppppoqpoooopoqqx", +"e.ooopqppqpoopopppibbdcababbddcdloppqoolpnppppqx", +"e.pporpppppqppqoogbcdgabbbbbaccdckppqqpoopoqrrrx", +"e.rpqqqooppoprrrgbccgdbcbbaababccbjppqqppopoqrrx", +"e.pqppqsqpppqrrkbbdilkigcbabbabbdcclpqpqopppqqqx", +"e.oqqqppqpqqrtpcgnrstrrnmifbbbbccccdnpqrqqqoqqqx", +"e.qpqpqpqpqstrjdnruwwwusrnigcbabccdchrrsrqrqqprx", +"e.oqqpqqpqrttoajrvwwwwwwrrlhdbbaacdcborqrrrrqrrx", +"e.qqqrrtrstwtfdntwvvwvwwuqmjgcbbbacbbirqpqrrrrsx", +"e.qrrrrrrrtvofdntwvwwvwutpmkidcbaaababpnopppprrx", +"e.srprrrprspidhouwwvvwvtsrpnkjfbbaaaabjknnmnpprx", +"e.rrsrrssssoddiruvvvvwvwttrrokgccbbabagjkkkmpnpx", +"e.stwrwrwrvkddipuuvvvvtssrrpnkfdcbbaaafiijkllmnx", +"e.lnrsrwrvpjddfppoqutslllmmkjifcddbbbbffhiklknmx", +"e.kjjrsrwrmfddffkkjpslfilifdbhgcccbbbbcfgghjkkkx", +"e.ijjrwrrrofdddblafmtiimmahfklhbccbabacfffgjjjhx", +"e.hjjppklonddakoonlrtilrrnkornicccbbaacgfggfihfx", +"e.fhfkiidjkdbakttrsrtmosstttrmhddddcbcbdffhkfghx", +"e.dffafhfffhaairuutusqmwuwurplhdfddcdccggggghffx", +"e.dddddfdddaddhruututnrswutrlkfcdfdfdcchjjkkmmkx", +"e.daffdadaddaadrstrutomustsokffddddcdccddfhihjkx", +"e.fgddddabadddalrsotpiktutpmkidcddfddcdddddghfgx", +"e.fcddddbabbdbainrsnfairspnkigdcdfccdcccdddddfdx", +"e.ddddbbddbbbadfmlsrkmmmmomkjgddfdfgdccdfffffffx", +"e.ddcdadbbabddahlnlnmiiioonlffdbfdccddddfffffffx", +"e.cdbbdbdcbcdbdakorrmmkmopniifdcddddcddddffgfgfx", +"e.cddcbdddcabddadkrqmlmmnlkfhdbccccddcccdfdfgfgx", +"e.dgffffhhcfadbddalsvtonkjffddcdccddcdccdggfgggx", +"e.dcdddffgdadddbadaoqomkffffdbbbcbdddcbccfffgfgx", +"e.cdddgilkfbcdbdaaaaiffffdfdbddbccddccbbcffdfgfx", +"e.fhggghkkhddbdbaaaaadfafddbfbddccccbcbbcfddfgdx", +"e.hkhmllkkidabdbbaaaafdfadbddffdcbabbbbabdffdfgx", +"e.imlllhliifddbbb#baakjffddfhhhfcbdbbbbbbfdfiffx", +"e.hljhllhjhfbdbbaaadafmlkihhhiihdbbbbabbbdfgghgx", +"e.dhlggiiigdccdbaa#abgmlmkkjkklkhdbdbbdaabbccccx", +"e.hbadfdcbcbaabaaabdfimnnmllmnmkiddbdddbbbabddcx", +"e.gbbabbbabbbcbbbbbinrppoonppppojfdffddcbbabcbcx", +"e.dba#abcbabcbcbdhknrtrtrrrrrrroliffidccccbdcghx", +"e.fbab#acbbcbbccinsrtttssttwssrpkfigifcbbcbbbcfx", +"e.daacbbdcbbbbdborpwttwwttwswsrpmigfgdbbdbbbbcdx", +"e.dcccbcddcbddfirtuwwwswswswrwprlfigfdcddccbacdx", +"e.fdcdcddbbcddgmrswwwuwtswwtwsrpjiiffccbcfddcbcx", +"e.fdfhccbbbbfhiowwswwwtwutwttwrpjfiggbcdhgdfcbbx", +"exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +}; +SIMPLE = T +BITPIX = 8 +NAXIS = 2 +NAXIS1 = 48 +NAXIS2 = 48 +HISTORY Written by XV 3.10 +COMMENT the GIMP was here +END + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ZÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿZ€G>GY::1111GYa”ÑѲÑÑÑ»ÑÁ»Ñ»»Ñ«Ÿ +nGaUU1:>YU>G:11ÿZ€G>:>:>>11:>>Uƒ«²ÑÑÑÁÑ»²ÑѻѲ«ŸnaaGG::1:G>>:1:ÿZ€>:::1:>>:1>>Ga +«»ÁÑÑѲѲѲѫџ«GaUG>:>>::1':>ÿZ€>'':11>:1111>1”«ŸÑ»»ÑÑ»»Ñ²Ñ²«ŸƒaUGU>11>1111:>ÿ +Z€G1'1':11:11::aŒ²«»»»²²»»Ñ²²«ŸrGaUaG:11:111:GÿZ€>1''1:1'1:1:1>YrŒ«»«»«««««««” +aGGa>::::1>:UYÿZ€U11'111'111:11111aŒ«ŸŸ””ŒŸŸŸŸ”nG>GG>>:11'1:1:ÿZ€Y1'>G>:1:1''1' +''1>GaƒŒŒƒƒŒƒra>>1>>>111'1>>:ÿZ€>YUUaaaU>::>1'''1UƒƒrrnrrrY>1>11>''11::::ÿ +Z€YnYYnYG1>11'''>'GƒraYYYaaY>1111'111>GUUYUÿZ€aƒYaaG>>1111''rnGG>>GYYYG +:1>111111G>GaGGÿZ€YrYƒrra>'1>11''''G>G'>1>>GG>:1'1111'1>GG>GUÿZ€GYUUUYrrY>>1>1 +'''''>G'G>>1G1>>::::1:11:G>>GU>ÿZ€:>>>UarG1:>1>''''aGGGG>G>1>>1::>>::11:GG>GUGÿ +Z€>:>>>GGU>'>>>1'>'”§”ƒrGGGG>111:1>>>:1::GGGUGUÿZ€>UGGGGYY:G'>1>>'²Î»”ŒrnGG>>:> +::>>:>::>UUGUUUÿZ€:>>:1>>>:'1>>'>r«§ƒƒƒŒrGY>1::::>>:::>G>GUGUÿZ€:>11>1>:1:>1>' +r”««ƒƒrƒ”ŸŒaaG>:>>>>:>>>>GGUGUGÿZ€>>:>'>11'1>>'YŒŒƒaaa””ŒGG>1G>::>>>>GGGGGGGÿZ€>>>>11>>111'>Gƒ²«rƒƒƒƒ”ƒrnU>>G>GU>::>GGGGGGGÿZ€G:>>>>1'11>1'aŒ«²ŒG'a«²ŸŒraU>:>G::>:::>>>>>G>ÿZ€GU>>>>'1'>>>'«²”»Ÿar»Á»Ÿƒra>:>>G>>:>>>>>UYGUÿZ€>'GG>'>'>>''>«²»«Á»”ƒÁ²»²”rGG>>>>:>::>>GYaYnrÿZ€>>>>>G>>>'>>Y«ÁÁ»Á»Œ«²ÑÁ»«rG:>G>G>::YnnrrƒƒrÿZ€>GG'GYGGGY''a«ÁÁ»Á²§ƒÑÁÑÁ«ŸY>G>>:>::UUUUUYGGÿZ€GYGraa>nr>1'r»»«²«»ƒ”²²»»»«ƒY>>>>:1:1>GGYrGUYÿZ€YnnŸŸr”Œ>>'r””Œ«»a««Œr”«Œa:::11'':UGUUGaYGÿZ€ann«Ñ«««”G>>>1'Gƒ»aaƒƒ'YGrY1::1'1':GGGUnnnYÿZ€rnn«²«Ñ«ƒG>>GGrrnŸ²GaaG>1YU:::1111:GUUYnrrrÿZ€Œ«²«Ñ«ÎŸn>>GŸŸ”§Á»²ƒƒrnaG:>>1111GGYarrŒƒÿZ€²»Ñ«Ñ«Ñ«Îr>>aŸÁÁÎÎÎλ²²««ŸŒrG>:11'''GaanrƒŒÿZ€««²««²²²²”>>a«ÁÎÎÎÎÑÎÑ»»««”rU::11'1'UnrrrƒŸŒŸÿZ€²«Ÿ«««Ÿ«²Ÿa>Y”ÁÑÑÎÎÑ벫ŸŒrnG11''''1nrŒŒƒŒŸŸ«ÿZ€§«««««««»Î”G>Œ»ÑÎÑÑÎÑÁ»Ÿƒra>:1'''1'1ŸŒ”ŸŸŸŸ««ÿZ€§§§««»«²»Ñ»G>Œ»ÑÎÎÑÎÑÑÁ§ƒnU:111':11a«§Ÿ§««««²ÿZ€”§§Ÿ§§Ÿ§«»»”'n«ÎÑÑÑÑÑÑ««Y>11'':>:1”«§««««§««ÿZ€§Ÿ§Ÿ§Ÿ§Ÿ§²»«n>Œ«ÁÑÑÑÁ²«ŒaU:1'1::>:Y««²«§«§§Ÿ«ÿZ€”§§§ŸŸ§Ÿ§§«»Ÿ:UŒ«²»««ŒƒaG1111::::>ŒŸ§«§§§”§§§ÿZ€Ÿ§ŸŸ§²§ŸŸŸ§««r11>araU:1'11'11>::Ÿ§Ÿ§”ŸŸŸ§§§ÿZ€«Ÿ§§§””ŸŸ”Ÿ«««U1::U>1:11''1'1::1nŸŸ§§ŸŸ”Ÿ”§««ÿZ€ŸŸ”«ŸŸŸŸŸ§ŸŸ§””U1:>U'11111'::>:rŸŸ§§Ÿ””Ÿ”§«««ÿZ€”””Ÿ§ŸŸ§Ÿ””Ÿ”ŸŸŸa11>:'1'11>>:>”ŸŸ§””ŸŒŸŸŸŸ§ÿZ€”””””ŸŒ””ŒŸ”ŸŸ”ŸaG1111::>U”ŸŸŸŸ”§Ÿ””””Ÿ”§§ÿZ€”””ŒŸŒ””ŒŸ”””””ŸŒŸ”nnŒŸŒ§””Ÿ”””ŸŒŒŒŒŸ””ŸÿZ€”ŸŸ§ŒŒ””Œ”Œ””ŒŒ””ŒŸŸŸ””§Ÿ”””Œ”ŸŸŸ§ŸŸ””ŒŒŸ””Ÿ”ÿZ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ÿZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ diff -Nru camlimages-3.0.1/examples/liv-furuse/mylazy.ml camlimages-4.0.1/examples/liv-furuse/mylazy.ml --- camlimages-3.0.1/examples/liv-furuse/mylazy.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/mylazy.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,39 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Damien Doligez, projet Para, INRIA Rocquencourt *) +(* *) +(* Copyright 1997 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU Library General Public License, with *) +(* the special exception on linking described in file ../LICENSE. *) +(* *) +(***********************************************************************) + +(* $Id: mylazy.ml,v 1.2 2004/09/23 07:20:20 weis Exp $ *) + +(* Module [Lazy]: deferred computations *) + +type 'a status = + | Delayed of (unit -> 'a) + | Value of 'a + | Exception of exn +;; + +type 'a t = 'a status ref;; + +exception Undefined;; + +let make f = ref (Delayed f);; +let make_val v = ref (Value v);; + +let force l = + match !l with + | Value v -> v + | Exception e -> raise e + | Delayed f -> + l := Exception Undefined; + try let v = f () in l := Value v; v + with e -> l := Exception e; raise e +;; diff -Nru camlimages-3.0.1/examples/liv-furuse/mylazy.mli camlimages-4.0.1/examples/liv-furuse/mylazy.mli --- camlimages-3.0.1/examples/liv-furuse/mylazy.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/mylazy.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,42 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Damien Doligez, projet Para, INRIA Rocquencourt *) +(* *) +(* Copyright 1997 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU Library General Public License, with *) +(* the special exception on linking described in file ../LICENSE. *) +(* *) +(***********************************************************************) + +(* $Id: mylazy.mli,v 1.1 2002/04/09 11:00:09 furuse Exp $ *) + +(** Deferred computations. *) + +type 'a status = + Delayed of (unit -> 'a) + | Value of 'a + | Exception of exn + +type 'a t = 'a status ref +(** A value of type ['a Lazy.t] is a deferred computation (also called a + suspension) that computes a result of type ['a]. The expression + [lazy (expr)] returns a suspension that computes [expr]. **) + + +exception Undefined + +val make : (unit -> 'a) -> 'a t +val make_val : 'a -> 'a t + +val force : 'a t -> 'a +(** [Lazy.force x] computes the suspension [x] and returns its result. + If the suspension was already computed, [Lazy.force x] returns the + same value again. If it raised an exception, the same exception is + raised again. + Raise [Undefined] if the evaluation of the suspension requires its + own result. +*) + diff -Nru camlimages-3.0.1/examples/liv-furuse/OMakefile camlimages-4.0.1/examples/liv-furuse/OMakefile --- camlimages-3.0.1/examples/liv-furuse/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,42 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.1 2010/05/13 13:14:47 furuse Exp $ *) + +OCAMLPACKS[] = lablgtk2 unix + +MODULES[] = + cache + deficon + display + edge + enhance + gui + icon + iconcap + jWidget + jpf + liv + livmisc + livsh + livshtype + mylazy + pathfind + scandir + seq + tout + viewer + +BuildExample(liv, $(MODULES), $(SUPPORTED_FORMATS) lablgtk2) + diff -Nru camlimages-3.0.1/examples/liv-furuse/pathfind.ml camlimages-4.0.1/examples/liv-furuse/pathfind.ml --- camlimages-3.0.1/examples/liv-furuse/pathfind.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/pathfind.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,61 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: pathfind.ml,v 1.11 2004/09/23 07:20:20 weis Exp $ *) + +open Unix;; + +(* Tilde substitution *) + + +(* skip to next / *) +let rec next_slash s n = + if n >= String.length s || s.[n] = '/' + then n + else next_slash s (succ n);; + +let tilde_subst s = + try + if s = "" || s.[0] <> '~' then s else + let len = String.length s in + if len = 1 then Sys.getenv "HOME" else + match s.[1] with + | '/' -> Filename.concat (Sys.getenv "HOME") (String.sub s 2 (len - 2)) + | _ -> + let final = next_slash s 1 in + let user = String.sub s 1 (pred final) in + let pwnam = getpwnam user in + if succ final >= len then pwnam.pw_dir else + Filename.concat pwnam.pw_dir + (String.sub s (succ final) (len - succ final)) + with + | Unix_error (_, _, _) -> s + | Sys_error _ -> s + | Not_found -> s;; + +let find pathlist s = + if s.[0] = '/' then + if Sys.file_exists s then s else raise Not_found + else begin + let f = ref "" in + try + List.iter + (fun path -> + f := Filename.concat (tilde_subst path) s; + (* prerr_endline ("tring "^ !f); *) + if Sys.file_exists !f then raise Exit) + pathlist; + raise Not_found + with + | Exit -> !f + end;; + diff -Nru camlimages-3.0.1/examples/liv-furuse/README camlimages-4.0.1/examples/liv-furuse/README --- camlimages-3.0.1/examples/liv-furuse/README 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/README 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,39 @@ +This is an LablGtk2 application. +You need to install the library with lablgtk2 support. + +LV -- Labl image Viewer + + This is camlimages+lablgtk2 image viewer, like `xv', but much + limited. It works just with True or Direct colormodels. + No PseudoColor support. And more, it is UNDER CONSTRUCTION. + +Usage: + + lv imagefiles + +Options: + + -random + Images are displayed randomly. Use with -wait. + + -wait sec + Automatically display next image after waiting [sec] seconds. + Useful for image slideshow. + + -root [center|random] + Display images on root. [center] puts the images in + the center of the screen. [random] puts them at random + position. + + -transition [myst|transparent] + Use with -root. You can see some funny transition + animations. + + -size [w]x[h] + Set the maximum size of images upto [w]x[h]. + +LV shell (like Visual schnauzer of xv) + + Copy iconcap and the xpm files in this directory in + $HOME/.lv and type 'v' key in the image window of lv... + You will have something fancy, but still under development. diff -Nru camlimages-3.0.1/examples/liv-furuse/scandir.ml camlimages-4.0.1/examples/liv-furuse/scandir.ml --- camlimages-3.0.1/examples/liv-furuse/scandir.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/scandir.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,55 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: scandir.ml,v 1.10 2008/06/16 22:35:42 furuse Exp $ *) + +open Unix;; + +let ignore_dirs = ref [".xvpics"; ".livpics"; "0000HEADER"; "0000HEADERS"];; + +let scan_dir f fn = + let scanned = ref [] in + let rec sub fn = + let st = stat fn in + match st.st_kind with + | S_DIR when not (List.mem st.st_ino !scanned) -> + scanned := st.st_ino :: !scanned; + let dh = opendir fn in + let files = ref [] in + begin + try while true do files := readdir dh :: !files done with + | End_of_file -> () + | e -> prerr_endline ("readdir: " ^ Printexc.to_string e) + end; + closedir dh; + let files = Sort.list (>) !files in + let subdirs = ref [] in + let treat fn' = + if not (fn' = ".." || fn' = ".") then begin + let fn'' = Filename.concat (if fn = "." then "" else fn) fn' in + try + let st = Unix.stat fn'' in + match st.st_kind with + | S_DIR -> (* sub-dir check is delayed *) + if not (List.mem fn' !ignore_dirs) then + subdirs := fn'' :: !subdirs + | _ -> + f fn'' (* or sub fn', but it's more efficient *) + with + | Unix.Unix_error(_,"stat",_) -> + prerr_endline (fn'' ^ ": stat failed") + | e -> prerr_endline (fn'' ^ ": " ^ Printexc.to_string e) end in + List.iter treat files; + List.iter sub (List.rev !subdirs) + | S_DIR -> () + | _ -> f fn in + sub fn;; diff -Nru camlimages-3.0.1/examples/liv-furuse/seq.ml camlimages-4.0.1/examples/liv-furuse/seq.ml --- camlimages-3.0.1/examples/liv-furuse/seq.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/seq.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,24 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: seq.ml,v 1.3 2004/09/21 18:15:46 weis Exp $ *) + +open Images;; + +let load_sequence_as_pixmaps ~window file = + let seq = load_sequence file [] in + let seq = unoptimize_sequence seq in + List.map + (fun frame -> + Ximage2.pixmap_of_image window None + frame.frame_image, frame.frame_delay) + seq.seq_frames;; diff -Nru camlimages-3.0.1/examples/liv-furuse/sound.xpm camlimages-4.0.1/examples/liv-furuse/sound.xpm --- camlimages-3.0.1/examples/liv-furuse/sound.xpm 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/sound.xpm 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,263 @@ +/* XPM */ +static char * image_name[] = { +"48 48 212 2", +" c #618561856185", +". c #FFFFFFFFFFFF", +"X c #D75CD34CDF7D", +"o c #CF3CCF3CDF7D", +"O c #CF3CCB2BDF7D", +"+ c #C71BC30BDF7D", +"@ c #BEFBBEFBDF7D", +"# c #BEFBBAEADF7D", +"$ c #B6DAB6DADF7D", +"% c #B6DAB2CADF7D", +"& c #AEBAAEBADF7D", +"* c #AEBAAAAADF7D", +"= c #A699A699DF7D", +"- c #A699A289DF7D", +"; c #9E799E79DF7D", +": c #9E799A69DF7D", +"> c #96589658DF7D", +", c #96589248DF7D", +"< c #8E388E38DF7D", +"1 c #8E388A28DF7D", +"2 c #86178617DF7D", +"3 c #C71BC30BCF3C", +"4 c #596555555965", +"5 c #492449244924", +"6 c #492445144103", +"7 c #410341034103", +"8 c #41033CF34103", +"9 c #41033CF338E3", +"0 c #38E338E338E3", +"q c #410338E34103", +"w c #38E334D338E3", +"e c #30C230C230C2", +"r c #61855D7579E7", +"t c #A699A289D75C", +"y c #69A669A669A6", +"u c #20811C711861", +"i c #208118611861", +"p c #208114511861", +"a c #30C22CB228A2", +"s c #86178617AEBA", +"d c #28A21C712081", +"f c #5965596571C6", +"g c #86178207DF7D", +"h c #BEFBBAEAC71B", +"j c #38E334D330C2", +"k c #410338E338E3", +"l c #38E330C230C2", +"z c #28A228A228A2", +"x c #410334D328A2", +"c c #79E771C64103", +"v c #C71BC30B9658", +"b c #E79DDB6C6185", +"n c #F7DEEBAD5144", +"m c #186114511040", +"M c #28A220812081", +"N c #186118611861", +"B c #186114511861", +"V c #28A224921040", +"C c #861779E728A2", +"Z c #AEBAA69938E3", +"A c #E79DDB6C4103", +"S c #FFFFF3CE4924", +"D c #79E77DF7DF7D", +"F c #B6DAB2CAC71B", +"G c #6185596528A2", +"H c #EFBEE79D4924", +"J c #C71BBEFB79E7", +"K c #B6DAAAAAAEBA", +"L c #CF3CC71B4103", +"P c #8E38861738E3", +"I c #61854D342081", +"U c #96589658CF3C", +"Y c #79E779E7DF7D", +"T c #104014511040", +"R c #596555552081", +"E c #20811C712081", +"W c #30C22CB238E3", +"Q c #C71BBEFB9658", +"! c #186110401040", +"~ c #28A2249228A2", +"^ c #514449244924", +"/ c #51444D345144", +"( c #8E388617C71B", +") c #BEFBB6DA9E79", +"_ c #AEBAAAAAC71B", +"` c #618559655965", +"' c #596555551861", +"] c #861775D62081", +"[ c #AEBAA289AEBA", +"{ c #71C675D6DF7D", +"} c #18610C301040", +"| c #492445144924", +" . c #10400C301040", +".. c #28A2249230C2", +"X. c #BEFBB2CA9658", +"o. c #71C669A669A6", +"O. c #8E3886178E38", +"+. c #D75CCF3C79E7", +"@. c #EFBEE38D5965", +"#. c #E79DDF7D6185", +"$. c #71C671C6DF7D", +"%. c #104008201040", +"&. c #861782078617", +"*. c #965879E779E7", +"=. c #30C22CB230C2", +"-. c #38E330C20820", +";. c #D75CBEFB30C2", +":. c #71C675D6D75C", +">. c #A699A289AEBA", +",. c #104010401040", +"<. c #38E32CB21040", +"1. c #D75CCF3C4924", +"2. c #F7DEEFBE4924", +"3. c #8E386DB628A2", +"4. c #EFBECB2B38E3", +"5. c #8E387DF7AEBA", +"6. c #B6DAAEBA9658", +"7. c #69A66DB6DF7D", +"8. c #FFFFD75C2081", +"9. c #79E771C65144", +"0. c #86178617D75C", +"q. c #A6999E79AEBA", +"w. c #A699A699C71B", +"e. c #71C6659538E3", +"r. c #69A669A6DF7D", +"t. c #104008200820", +"y. c #514451445144", +"u. c #596559655965", +"i. c #28A2249238E3", +"p. c #9E79861779E7", +"a. c #61856595DF7D", +"s. c #61855D7569A6", +"d. c #71C671C679E7", +"f. c #79E775D679E7", +"g. c #79E779E7AEBA", +"h. c #71C66DB671C6", +"j. c #28A2208128A2", +"k. c #861782078E38", +"l. c #DF7DCF3C5144", +"z. c #79E775D69658", +"x. c #61856185DF7D", +"c. c #A699A289CF3C", +"v. c #79E779E78617", +"b. c #10400C300820", +"n. c #69A66DB6CF3C", +"m. c #9E799248AEBA", +"M. c #D75CCF3C71C6", +"N. c #86177DF78617", +"B. c #71C671C6C71B", +"V. c #AEBAAAAA9658", +"C. c #E79DDB6C5965", +"Z. c #59655D75DF7D", +"A. c #208120812081", +"S. c #9E799A69A699", +"D. c #86177DF78E38", +"F. c #6185596569A6", +"G. c #38E330C228A2", +"H. c #9E7996584103", +"J. c #69A66595D75C", +"K. c #A699A2899658", +"L. c #59655965DF7D", +"P. c #9E799E79CF3C", +"I. c #69A6618530C2", +"U. c #AEBAA2899658", +"Y. c #DF7DD34C4924", +"T. c #6185618569A6", +"R. c #96589248AEBA", +"E. c #51445555DF7D", +"W. c #596555556185", +"Q. c #965896589E79", +"!. c #8E388A289658", +"~. c #69A669A671C6", +"^. c #B6DAAAAA5965", +"/. c #96588E38AEBA", +"(. c #A6999E799E79", +"). c #49244D345144", +"_. c #861786179658", +"`. c #492445145965", +"'. c #69A6659569A6", +"]. c #79E771C638E3", +"[. c #51445144DF7D", +"{. c #AEBAA28971C6", +"}. c #96588A2838E3", +"|. c #AEBA9E799658", +" X c #861771C69E79", +".X c #61856595D75C", +"XX c #71C66595AEBA", +"oX c #BEFB8E381861", +"OX c #49244D34DF7D", +"+X c #A699A699AEBA", +"@X c #79E775D628A2", +"#X c #DF7DD34C69A6", +"$X c #61855D75BEFB", +"%X c #61855D75AEBA", +"&X c #71C6659528A2", +"*X c #61856595AEBA", +"=X c #59655965D75C", +"-X c #59655144C71B", +";X c #61854D3430C2", +":X c #69A64D340820", +">X c #30C22CB24103", +",X c #69A665959658", +" > , , , < < 1 1 . ", +" X X X o o O O O + + + + @ @ @ # # $ $ % % % & & * * * = = - - - ; ; : : > > , , , < < 1 1 2 . ", +" X X o 3 4 5 5 6 7 8 8 9 0 9 0 0 0 q 0 0 0 0 0 0 w e r t - - ; ; ; : : > > > , , < < 1 1 2 2 . ", +" X o X y u i i i i i p i i i i i i i i i i i i i i i a s - - ; ; : : > > , , , < < 1 1 2 2 2 . ", +" o o 3 u u i i i i i p u i i u i u u u u i u i i u u d f - ; ; : : > > , , , < < 1 1 2 2 2 g . ", +" o O h j 0 0 9 6 9 7 9 0 k j a l j e a a a e e a a z x c v b n : : > , , , < < 1 1 2 2 2 g g . ", +" O O h m d M N B p B B N i i i i p i i i i d V C Z A S S S S S > > , , , < < 1 1 2 2 2 g g D . ", +" O O F m 8 7 N p B N N N i i i i i i i i i i G S S S H J v K v > , , , < < 1 1 2 2 2 g g D D . ", +" O + F m j l m N N N N B B N i N i i i N i i G L P I i a U > v > , , < < 1 1 2 2 2 g g D D Y . ", +" + + F T m T m B i N p N m p M u i B N N N N R C i E i W > > Q , , < < 1 1 2 2 2 g g D D Y Y . ", +" + + F m m m m m ! m B m ~ 6 ^ / 5 ~ B B N B R C N N i W > , Q , < < ( ) 2 2 2 g g D D Y Y Y . ", +" + + _ T ! m ! m m m m d 9 ^ 4 ` ^ 8 ~ m m m ' ] N N i W , , Q < < < [ S 2 2 g g D D Y Y Y { . ", +" + @ _ } m ! m m m ! T 9 6 ^ 9 e ^ 5 | T ! m ' ] ! N N W , , Q < 1 1 [ b 2 g g D D Y Y Y { { . ", +" @ @ _ T ! .! ! ! ! T 6 6 ^ 0 j j / 5 ! ! m ' ] m m N .., < Q 1 1 1 [ X.g g D D Y Y Y { { { . ", +" @ @ _ .! ! ! m .m } 6 6 o.K O./ | | m m m ' ] T m m I +.@.#.1 2 2 [ X.g D D Y Y Y { { $.$.. ", +" @ # _ T m .! .! m %.z ^ 4 &.*.^ ^ =.m B m G ] i m -.S S S ;.:.1 g >.X.D D Y Y Y { { { $.$.. ", +" # # _ .m .m m .m } T a ^ ^ ^ 6 a ,.<.1.2.S 3.9 } V 2.S 4.5.2 2 g >.6.D Y Y Y { { $.$.$.7.. ", +" # $ _ . . . . .,.} } } ,.u l l d m m L S S 8.9.6 T m a ( 0.g g g g q.6.Y Y Y { { { $.$.7.7.. ", +" $ $ w. .} %. .} ,. . .} } } } .%.m m ] A 4.e.` e m m ..2 2 2 g g D q.6.Y Y { { $.$.$.7.7.r.. ", +" $ % w. .t. . .,.,.} t.} z y. / w N .T . .T T ! m ..2 2 g g D D [ 6.Y { { { $.$.7.7.r.r.. ", +" % % w.t. .t.} T . .z 4 ^ y.u.u.` / u.y.u } m m .! m i.2 g g 5.b 2.S p.{ { $.$.$.7.7.r.r.a.. ", +" % % w.t. .%. . .} w 5 s.&.&.d.y d.&.f.4 4 z .m m .m ..g g D b S S 8.g.{ { $.$.7.7.r.r.a.a.. ", +" % & w.t.%. .t.} e ^ &.h.l ~ M j.d j.7 k.y 7 i T ,. .m ..g D D X.@.l.z.{ $.$.$.7.7.r.r.r.a.a.. ", +" & & w.t.} %.t.z 8 k.^ a z z z ~ ~ j.~ u y y 0 B } ! ,...D D Y Y Y Y { $.$.$.7.7.r.r.a.a.a.x.. ", +" & * c.t. .t.N j v./ =.a a ~ M M M j.j.~ M d.5 =.b.m m ..D Y Y Y { { { $.$.7.n.m.6.M.n a.x.x.. ", +" * * c.} .t.z 5 h.l =.a ~ M l 9 ~ M j.~ ~ j.N.9 N m ...Y Y Y { { { B.V.v C.S S S S S x.x.Z.. ", +" * * c.} .T w d.8 l =.a A.=.k.S.v.M j.~ z u h.7 A.} ,...Y Y { { { $.m.S S S n M.V.5.V.x.Z.Z.. ", +" * = c.} .i 8 N.a =.e e i =.s.D.F.~ d j.~ G.H. a } ,...Y { { { $.$.m.b V.5.J.a.a.x.K.x.Z.L.. ", +" = = P.} .u 6 v.=.=.W =.B u e 8 =.i M ~ ~ I.S y l } m ..{ { $.$.$.7.m.U.r.a.a.a.x.x.K.Z.Z.L.. ", +" = - c.} } E 6 k.W e 0 q ~ B M j.i E ~ ~ ~ I.Y.T.l ,.T ..{ { $.$.7.7.m.U.r.a.a.x.x.x.K.L.L.L.. ", +" - - P.T %.i | D.e q 8 | 4 8 m ,.~ 0 =.a z I.H.u.a T ! ..$.$.$.7.7.r.R.U.a.a.x.x.Z.Z.K.L.L.E.. ", +" - - P.T m B 8 d.4 8 | / W.v.Q.!.~.7 q e a G ^.8 M m m ..$.$.7.7.r.r./.U.a.x.x.Z.Z.L.(.L.E.E.. ", +" - ; P.T ! } =.)._.`./ 4 '.~.~.~.W.| 8 w j ].^.l N m m ..$.7.7.r.r.a./.U.x.x.Z.Z.Z.L.(.E.E.[.. ", +" ; ; P.T m } d 5 v.d.W.F.y ~.'.'.s./ 6 8 q {.}.a ! B m i.7.7.r.r.a.a./.|.x.Z.Z. XJ C.b E.[.[.. ", +" ; : P.m m m } =.0 !.!.d.~.'.'.s.F.W.).).z.H.}.i N N B i.7.r.r.r.a..XR.|.Z.Z.XXS S S oX[.[.OX. ", +" : : P.m ! m } ! e 9 f.+X!.v.v.h.h.~.v._.4 e.@Xm m m m i.r.r.a.XX#X2.S *.Z.L.$X2.S 4.%X[.OXOX. ", +" : > U . .t.} ,.p j j 6 N.S.S.R.S._.'.6 0 &X] m m m m i.r.r.a.b S S 8.*XL.L.L.=X-X[.[.OXOXOX. ", +" > > U ,.%.t.t. .%.m z k a j 6 ^ 7 7 ;XL 2.S :XT ! ! T >Xa.a.a.|.@.l.,XL.L.L.E.E.[.[.OXOXOX , P. .%.%.%.t.} .} B u a l l a A.1XS S 8.V ! m ! ! `.a.a.x.x.Z.Z.Z.L.L.E.E.[.[.OXOXOX () : [ `FORCE | `DIR ] option -> unit);; +let nexttimeout = ref None;; + +let set_timeout () = + (* prerr_endline "set timeout"; *) + if !wait <> 0.0 then + nexttimeout := + Some + (Timeout.add + ~ms: (truncate (!wait *. 1000.0)) + ~callback: (fun () -> !hook_next None; false));; + +let remove_timeout () = + (* prerr_endline "remove timeout"; *) + may Timeout.remove !nexttimeout;; diff -Nru camlimages-3.0.1/examples/liv-furuse/viewer.ml camlimages-4.0.1/examples/liv-furuse/viewer.ml --- camlimages-3.0.1/examples/liv-furuse/viewer.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/liv-furuse/viewer.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,71 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: viewer.ml,v 1.5 2004/09/23 07:20:20 weis Exp $ *) + +open Gdk;; +open Gtk;; +open GObj;; +open Gui;; + +(* image viewer widget *) + +let sync () = while Glib.Main.iteration false do () done;; + +(* screen *) + +let screen_width = Gdk.Screen.width ();; +let screen_height = Gdk.Screen.height ();; + +(* the viewer *) + +class viewer ?border_width ?width ?height ?packing ?show () = + let fixed = GPack.fixed ?border_width ?width ?height ?packing ?show () in + (* let prog = + new_progress_bar ~packing: (fixed#put ~x:0 ~y:0) ~text: "" () in *) + let prog = GRange.progress_bar ~packing: (fixed#put ~x:0 ~y:0) () in + let visual = prog#misc#visual in + + object + inherit GPack.fixed (Obj.magic fixed#as_widget : Gtk.fixed obj) + + val colormap = Gdk.Color.get_system_colormap () + val color_create = Truecolor.color_creator visual + val color_parser = Truecolor.color_parser visual + + val mutable previous_size = (-1,-1) + + method progress = prog + + method display (ximage : OXimage2.ximage) = + let pixmap = + let win = fixed#misc#window in + let pix = + Gdk.Pixmap.create ~window: win + ~depth: (Gdk.Visual.depth visual) + ~width: ximage#width + ~height: ximage#height () in + let pixmap = new GDraw.drawable pix in + pixmap#put_image ~x:0 ~y:0 + ~width: ximage#width ~height: ximage#height + ~xsrc:0 ~ysrc:0 + ximage#data; + pix in + previous_size <- (ximage#width,ximage#height); + fixed#misc#set_size_request + ~width: ximage#width ~height: ximage#height (); + Gdk.Window.set_back_pixmap fixed#misc#window (`PIXMAP pixmap); + sync () +end;; + +let viewer ?border_width ?width ?height ?packing ?show () = + new viewer ?border_width ?width ?height ?packing ?show ();; diff -Nru camlimages-3.0.1/examples/Makefile.am camlimages-4.0.1/examples/Makefile.am --- camlimages-3.0.1/examples/Makefile.am 2007-01-08 16:04:48.000000000 +0200 +++ camlimages-4.0.1/examples/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,37 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.2 2007/01/08 14:04:48 rousse Exp $ *) - -SUBDIRS = crop normalize converter edgedetect imgstat monochrome resize - -if HAVE_LABLGTK -if HAVE_GIF -SUBDIRS += gifanim -endif -endif - -if HAVE_LABLGTK2 -if HAVE_JPEG -SUBDIRS += liv -endif -endif - -if HAVE_FREETYPE -SUBDIRS += ttfimg -endif - -if HAVE_TIFF -SUBDIRS += tiffps -endif diff -Nru camlimages-3.0.1/examples/Makefile.in camlimages-4.0.1/examples/Makefile.in --- camlimages-3.0.1/examples/Makefile.in 2007-10-11 10:50:42.000000000 +0200 +++ camlimages-4.0.1/examples/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,487 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.2 2007/01/08 14:04:48 rousse Exp $ *) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -@HAVE_GIF_TRUE@@HAVE_LABLGTK_TRUE@am__append_1 = gifanim -@HAVE_JPEG_TRUE@@HAVE_LABLGTK2_TRUE@am__append_2 = liv -@HAVE_FREETYPE_TRUE@am__append_3 = ttfimg -@HAVE_TIFF_TRUE@am__append_4 = tiffps -subdir = examples -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = crop normalize converter edgedetect imgstat monochrome \ - resize gifanim liv ttfimg tiffps -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = crop normalize converter edgedetect imgstat monochrome resize $(am__append_1) $(am__append_2) $(am__append_3) $(am__append_4) -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - else \ - include_option=--include; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ - || exit 1; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-recursive distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/monochrome/.cvsignore camlimages-4.0.1/examples/monochrome/.cvsignore --- camlimages-3.0.1/examples/monochrome/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/monochrome/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/monochrome/Makefile.am camlimages-4.0.1/examples/monochrome/Makefile.am --- camlimages-3.0.1/examples/monochrome/Makefile.am 2007-05-21 20:54:33.000000000 +0200 +++ camlimages-4.0.1/examples/monochrome/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,42 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:08 rousse Exp $ *) - -OCAMLSOURCES = monochrome.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += monochrome.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += monochrome.byt -endif - -monochrome_opt_SOURCES = $(OCAMLSOURCES) -monochrome_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -monochrome.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o monochrome.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -monochrome.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o monochrome.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/monochrome/Makefile.in camlimages-4.0.1/examples/monochrome/Makefile.in --- camlimages-3.0.1/examples/monochrome/Makefile.in 2007-10-11 10:50:43.000000000 +0200 +++ camlimages-4.0.1/examples/monochrome/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:08 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(monochrome_byt_SOURCES) $(monochrome_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = monochrome.opt -@BUILD_BYTECODE_TRUE@am__append_2 = monochrome.byt -DIST_COMMON = $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/monochrome -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = monochrome.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = monochrome.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_monochrome_byt_OBJECTS = $(am__objects_1) -monochrome_byt_OBJECTS = $(am_monochrome_byt_OBJECTS) -monochrome_byt_LDADD = $(LDADD) -am_monochrome_opt_OBJECTS = $(am__objects_1) -monochrome_opt_OBJECTS = $(am_monochrome_opt_OBJECTS) -monochrome_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(monochrome_byt_SOURCES) $(monochrome_opt_SOURCES) -DIST_SOURCES = $(monochrome_byt_SOURCES) $(monochrome_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = monochrome.ml -monochrome_opt_SOURCES = $(OCAMLSOURCES) -monochrome_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/monochrome/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/monochrome/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -monochrome.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o monochrome.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -monochrome.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o monochrome.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/monochrome/monochrome.ml camlimages-4.0.1/examples/monochrome/monochrome.ml --- camlimages-3.0.1/examples/monochrome/monochrome.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/monochrome/monochrome.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: monochrome.ml,v 1.6 2004/09/21 18:15:47 weis Exp $ *) +(* $Id: monochrome.ml,v 1.7 2009/02/08 15:25:37 weis Exp $ *) open Images;; open OImages;; @@ -31,11 +31,12 @@ for y = 0 to src#height - 1 do let rgb = src#get x y in let mono = Color.brightness rgb in - src#set x y {r= mono; g= mono; b= mono} + src#set x y { r = mono; g = mono; b = mono; } done done in let saver img = img#save dst None [] in mono src; -saver src;; +saver src +;; diff -Nru camlimages-3.0.1/examples/monochrome/OMakefile camlimages-4.0.1/examples/monochrome/OMakefile --- camlimages-3.0.1/examples/monochrome/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/monochrome/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(monochrome, monochrome, all) diff -Nru camlimages-3.0.1/examples/normalize/.cvsignore camlimages-4.0.1/examples/normalize/.cvsignore --- camlimages-3.0.1/examples/normalize/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/normalize/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/normalize/Makefile.am camlimages-4.0.1/examples/normalize/Makefile.am --- camlimages-3.0.1/examples/normalize/Makefile.am 2007-05-21 20:54:33.000000000 +0200 +++ camlimages-4.0.1/examples/normalize/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,42 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.7 2007/02/20 21:19:09 rousse Exp $ *) - -OCAMLSOURCES = normalize.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += normalize.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += normalize.byt -endif - -normalize_opt_SOURCES = $(OCAMLSOURCES) -normalize_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -normalize.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o normalize.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -normalize.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o normalize.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/normalize/Makefile.in camlimages-4.0.1/examples/normalize/Makefile.in --- camlimages-3.0.1/examples/normalize/Makefile.in 2007-10-11 10:50:43.000000000 +0200 +++ camlimages-4.0.1/examples/normalize/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.7 2007/02/20 21:19:09 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(normalize_byt_SOURCES) $(normalize_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = normalize.opt -@BUILD_BYTECODE_TRUE@am__append_2 = normalize.byt -DIST_COMMON = $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/normalize -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = normalize.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = normalize.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_normalize_byt_OBJECTS = $(am__objects_1) -normalize_byt_OBJECTS = $(am_normalize_byt_OBJECTS) -normalize_byt_LDADD = $(LDADD) -am_normalize_opt_OBJECTS = $(am__objects_1) -normalize_opt_OBJECTS = $(am_normalize_opt_OBJECTS) -normalize_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(normalize_byt_SOURCES) $(normalize_opt_SOURCES) -DIST_SOURCES = $(normalize_byt_SOURCES) $(normalize_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = normalize.ml -normalize_opt_SOURCES = $(OCAMLSOURCES) -normalize_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/normalize/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/normalize/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -normalize.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o normalize.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -normalize.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o normalize.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/normalize/OMakefile camlimages-4.0.1/examples/normalize/OMakefile --- camlimages-3.0.1/examples/normalize/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/normalize/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(normalize, normalize, all) diff -Nru camlimages-3.0.1/examples/OMakefile camlimages-4.0.1/examples/OMakefile --- camlimages-3.0.1/examples/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1 @@ +.SUBDIRS: edgedetect liv normalize ttfimg converter gifanim resize crop imgstat monochrome tiffps diff -Nru camlimages-3.0.1/examples/README.txt camlimages-4.0.1/examples/README.txt --- camlimages-3.0.1/examples/README.txt 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/README.txt 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,7 @@ +All the examples except converter-external can be built without +installing camlimages. Therefore, Makefiles and OMakefiles in these +directories are bit ad-hoc and not quite useful as examples to use +camlimages. + +converter-external serves an example of actual use of camlimages, +installed in `ocamlc -where`. diff -Nru camlimages-3.0.1/examples/resize/.cvsignore camlimages-4.0.1/examples/resize/.cvsignore --- camlimages-3.0.1/examples/resize/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/resize/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/resize/Makefile.am camlimages-4.0.1/examples/resize/Makefile.am --- camlimages-3.0.1/examples/resize/Makefile.am 2007-05-21 20:54:33.000000000 +0200 +++ camlimages-4.0.1/examples/resize/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,42 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:10 rousse Exp $ *) - -OCAMLSOURCES = resize.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += resize.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += resize.byt -endif - -resize_opt_SOURCES = $(OCAMLSOURCES) -resize_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -resize.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o resize.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -resize.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o resize.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/resize/Makefile.in camlimages-4.0.1/examples/resize/Makefile.in --- camlimages-3.0.1/examples/resize/Makefile.in 2007-10-11 10:50:44.000000000 +0200 +++ camlimages-4.0.1/examples/resize/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:10 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(resize_byt_SOURCES) $(resize_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = resize.opt -@BUILD_BYTECODE_TRUE@am__append_2 = resize.byt -DIST_COMMON = README $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/resize -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = resize.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = resize.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_resize_byt_OBJECTS = $(am__objects_1) -resize_byt_OBJECTS = $(am_resize_byt_OBJECTS) -resize_byt_LDADD = $(LDADD) -am_resize_opt_OBJECTS = $(am__objects_1) -resize_opt_OBJECTS = $(am_resize_opt_OBJECTS) -resize_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(resize_byt_SOURCES) $(resize_opt_SOURCES) -DIST_SOURCES = $(resize_byt_SOURCES) $(resize_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = resize.ml -resize_opt_SOURCES = $(OCAMLSOURCES) -resize_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/resize/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/resize/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -resize.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o resize.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -resize.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o resize.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/resize/OMakefile camlimages-4.0.1/examples/resize/OMakefile --- camlimages-3.0.1/examples/resize/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/resize/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(resize, resize, all) diff -Nru camlimages-3.0.1/examples/tiffps/.cvsignore camlimages-4.0.1/examples/tiffps/.cvsignore --- camlimages-3.0.1/examples/tiffps/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/tiffps/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/tiffps/Makefile.am camlimages-4.0.1/examples/tiffps/Makefile.am --- camlimages-3.0.1/examples/tiffps/Makefile.am 2007-05-21 20:54:33.000000000 +0200 +++ camlimages-4.0.1/examples/tiffps/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,42 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.7 2007/02/20 21:19:11 rousse Exp $ *) - -OCAMLSOURCES = tiffps.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += tiffps.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += tiffps.byt -endif - -tiffps_opt_SOURCES = $(OCAMLSOURCES) -tiffps_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -tiffps.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o tiffps.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -tiffps.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o tiffps.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/tiffps/Makefile.in camlimages-4.0.1/examples/tiffps/Makefile.in --- camlimages-3.0.1/examples/tiffps/Makefile.in 2007-10-11 10:50:44.000000000 +0200 +++ camlimages-4.0.1/examples/tiffps/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.7 2007/02/20 21:19:11 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(tiffps_byt_SOURCES) $(tiffps_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = tiffps.opt -@BUILD_BYTECODE_TRUE@am__append_2 = tiffps.byt -DIST_COMMON = README $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/tiffps -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = tiffps.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = tiffps.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_tiffps_byt_OBJECTS = $(am__objects_1) -tiffps_byt_OBJECTS = $(am_tiffps_byt_OBJECTS) -tiffps_byt_LDADD = $(LDADD) -am_tiffps_opt_OBJECTS = $(am__objects_1) -tiffps_opt_OBJECTS = $(am_tiffps_opt_OBJECTS) -tiffps_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(tiffps_byt_SOURCES) $(tiffps_opt_SOURCES) -DIST_SOURCES = $(tiffps_byt_SOURCES) $(tiffps_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = tiffps.ml -tiffps_opt_SOURCES = $(OCAMLSOURCES) -tiffps_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/tiffps/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/tiffps/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -tiffps.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o tiffps.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -tiffps.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o tiffps.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/tiffps/OMakefile camlimages-4.0.1/examples/tiffps/OMakefile --- camlimages-3.0.1/examples/tiffps/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/tiffps/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(tiffps, tiffps, tiff jpeg ps) diff -Nru camlimages-3.0.1/examples/tiffps/README camlimages-4.0.1/examples/tiffps/README --- camlimages-3.0.1/examples/tiffps/README 2000-02-07 15:28:52.000000000 +0200 +++ camlimages-4.0.1/examples/tiffps/README 2011-06-22 20:04:32.000000000 +0200 @@ -8,7 +8,7 @@ Command line options: There are many options. Try tiffps -help to print - help message. I hope it explains enought. + help message. I hope it explains enough. Note: Do not try tiffps for jpeg files. It works, but the result is @@ -18,4 +18,4 @@ http://www.pdflib.com/jpeg2ps/index.html - This is much smaller and faster. \ No newline at end of file + This is much smaller and faster. diff -Nru camlimages-3.0.1/examples/tiffps/tiffps.ml camlimages-4.0.1/examples/tiffps/tiffps.ml --- camlimages-3.0.1/examples/tiffps/tiffps.ml 2006-06-05 11:44:40.000000000 +0200 +++ camlimages-4.0.1/examples/tiffps/tiffps.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: tiffps.ml,v 1.10 2004/09/21 18:15:49 weis Exp $ *) +(* $Id: tiffps.ml,v 1.11 2008/05/17 19:55:50 furuse Exp $ *) open Images;; open Rgb24;; @@ -67,8 +67,9 @@ match Images.file_format name with | Jpeg, _ -> let w,h,ic = Jpeg.open_in name in + let y = ref 0 in w, h, 200.0, - { read_next_line = (fun buf -> Jpeg.read_scanline ic buf); + { read_next_line = (fun buf -> Jpeg.read_scanline ic buf !y; incr y); close = (fun () -> Jpeg.close_in ic) } | Tiff, _ -> let w, h, dpi, _, ic = Tiff.open_in name in diff -Nru camlimages-3.0.1/examples/ttfimg/.cvsignore camlimages-4.0.1/examples/ttfimg/.cvsignore --- camlimages-3.0.1/examples/ttfimg/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/ttfimg/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,6 @@ +ttfimg +ttfimg.byt +sample_micap.jpg +out.png +Makefile +Makefile.in diff -Nru camlimages-3.0.1/examples/ttfimg/Makefile.am camlimages-4.0.1/examples/ttfimg/Makefile.am --- camlimages-3.0.1/examples/ttfimg/Makefile.am 2007-05-21 20:54:33.000000000 +0200 +++ camlimages-4.0.1/examples/ttfimg/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,42 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:15 rousse Exp $ *) - -OCAMLSOURCES = ttfimg.ml - -noinst_PROGRAMS = -if BUILD_NATIVE -noinst_PROGRAMS += ttfimg.opt -endif -if BUILD_BYTECODE -noinst_PROGRAMS += ttfimg.byt -endif - -ttfimg_opt_SOURCES = $(OCAMLSOURCES) -ttfimg_byt_SOURCES = $(OCAMLSOURCES) - -include ../../Makefile.variables - -ttfimg.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o ttfimg.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -ttfimg.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o ttfimg.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -include ../../Makefile.rules diff -Nru camlimages-3.0.1/examples/ttfimg/Makefile.in camlimages-4.0.1/examples/ttfimg/Makefile.in --- camlimages-3.0.1/examples/ttfimg/Makefile.in 2007-10-11 10:50:44.000000000 +0200 +++ camlimages-4.0.1/examples/ttfimg/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,466 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:15 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SOURCES = $(ttfimg_byt_SOURCES) $(ttfimg_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = ttfimg.opt -@BUILD_BYTECODE_TRUE@am__append_2 = ttfimg.byt -DIST_COMMON = $(srcdir)/../../Makefile.rules \ - $(srcdir)/../../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_3 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_4 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_6 = lablgtk.cma -subdir = examples/ttfimg -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = ttfimg.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = ttfimg.byt$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am__objects_1 = -am_ttfimg_byt_OBJECTS = $(am__objects_1) -ttfimg_byt_OBJECTS = $(am_ttfimg_byt_OBJECTS) -ttfimg_byt_LDADD = $(LDADD) -am_ttfimg_opt_OBJECTS = $(am__objects_1) -ttfimg_opt_OBJECTS = $(am_ttfimg_opt_OBJECTS) -ttfimg_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(ttfimg_byt_SOURCES) $(ttfimg_opt_SOURCES) -DIST_SOURCES = $(ttfimg_byt_SOURCES) $(ttfimg_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = ttfimg.ml -ttfimg_opt_SOURCES = $(OCAMLSOURCES) -ttfimg_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_3) $(am__append_5) -CAMLIMAGES_LIBS = $(am__append_4) $(am__append_6) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../Makefile.variables $(srcdir)/../../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/ttfimg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/ttfimg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic \ - clean-noinstPROGRAMS distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -ttfimg.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o ttfimg.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -ttfimg.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o ttfimg.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/examples/ttfimg/OMakefile camlimages-4.0.1/examples/ttfimg/OMakefile --- camlimages-3.0.1/examples/ttfimg/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/examples/ttfimg/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,17 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:36:09 furuse Exp $ *) + +BuildExample(ttfimg, ttfimg, all freetype) diff -Nru camlimages-3.0.1/.hgignore camlimages-4.0.1/.hgignore --- camlimages-3.0.1/.hgignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/.hgignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,39 @@ +.*\.cm[a-z]+$ +.*~$ +\.(sp[io]t|annot|o|cm[a-z]+|orig|omc|lock|a|so)$ +\.(byt|opt|run)$ +\.omakedb$ +\.depend$ +CVS/.* + +autom4te\.cache/.* +\.\# +^missing$ +stamp-h1$ +config\.status$ +config\.log$ +config\.h$ + +src/camlimages\.ml$ +src/META$ + +doc/eng\.html +doc/sphinx/_build + +test/out\.image$ +test/test$ + +examples/converter/converter$ +examples/converter-external/converter$ +examples/crop/crop$ +examples/edgedetect/edge$ +examples/gifanim/gifanim$ +examples/imgstat/imgstat$ +examples/liv/liv$ +examples/monochrome/monochrome$ +examples/normalize/normalize$ +examples/resize/resize$ +examples/tiffps/tiffps$ +examples/ttfimg/ttfimg$ + +\.svn/ diff -Nru camlimages-3.0.1/.hgtags camlimages-4.0.1/.hgtags --- camlimages-3.0.1/.hgtags 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/.hgtags 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,4 @@ +ee82aa9b74ac04d5c8ee2e49825f96b4bc3f032c camlimages-4.0.0 +ff3f1ccc87431ff26bf9dda1495c953505ecbd23 v4.0.1 +ff3f1ccc87431ff26bf9dda1495c953505ecbd23 v4.0.1 +0000000000000000000000000000000000000000 v4.0.1 diff -Nru camlimages-3.0.1/INSTALL camlimages-4.0.1/INSTALL --- camlimages-3.0.1/INSTALL 2007-10-11 10:33:49.000000000 +0200 +++ camlimages-4.0.1/INSTALL 1970-01-01 02:00:00.000000000 +0200 @@ -1,143 +0,0 @@ -CamlImages - Objective Caml image processing library - -This library is reliable but still under development. - -*** Requirements - - To install CamlImages library, you need the following softwares: - - * ocaml 3.08 or higher - * GNU make - * automake (1.7.9 does not work. 1.9.6 works) - -and that is all. But note that this is the minimum requirement: you -can read/write BMP or PXM (PPM, PGM, PBM) image formats but no other -formats. If you want to deal with other image formats, you need to -install the corresponding external libraries: - - * libpng for PNG format - http://www.libpng.org/pub/png/libpng.html - http://sourceforge.net/projects/libpng/ - - * libjpeg for JPEG format - The Independent JPEG Group's software - ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz - - * libtiff for TIFF format - http://www.libtiff.org/ - ftp://ftp.remotesensing.org/pub/libtiff/ - - * libxpm for XPM format (could be already by the X server installation) - X contrib libraries ftp directory - ftp://ftp.x.org/contrib/libraries - - * freetype for drawing texts using truetype fonts - The FREETYPE Project - http://sourceforge.net/projects/freetype/ - - * libungif for GIF format - Because of the GIF patent problem of Unisys, we do not - recommend to use GIF file format. If you really want to - use GIF, do it in your own risk. - - Libungif, a library for using GIFs without compression. - http://sourceforge.net/projects/libungif/ - - * ghostscript for PS format - See http://www.ghostscript.com/ - -Additionaly, optional support for either lablgtk and lablgtk2 is provided, but -not both at once, as they use conflicting symbols: - - * lablgtk, an Objective Caml interface to gtk+ - http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html - -*** Installation procedure - Generating build scripts - ------------------------ - This is only needed if you're using CVS version directly. - - * make sure ocaml autoconf macros, available from bazar-ocaml/autoconf - directory, are present in aclocal macro search path, by any of the following - solution: - - export ACLOCAL='aclocal -I ' before invoking autoreconf - - set up a dirlist file in automake macro directory, as explained in aclocal - documentation - * run autoreconf --install - - Configuration - ------------- - - Just run the standard configure script: - % ./configure - - If the script can't find some installed external libraries, this is probably - because they are installed in locations not included in linker or - preprocessor configuration. You'll have to passe proper flags while running - configure script: - %./configure CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib - %./configure CFLAGS=-I/sw/include LDFLAGS=-L/sw/lib - - If problems persist, check config.log for failure details. - - The script allow some user configuration. Check help output for details: - % ./configure --help - - Compilation - ----------- - type - - % make - -and wait. - - Test - ---- - Before you actually install the library, you can check that it -really works, by running examples in the test directory. For the test -programs, - - % cd test - % make - % ./test - % ./test.byt - -(./test.byt is the bytecode executable and ./test the binary -executable). - - Installation - ------------ - - If there is no compilation error and the test works fine, -install the library, - - % make install - -This installs all the required files into the $(LIBDIR) directory -specified in Makefile.config (usually /usr/local/lib/ocaml/camlimages -or /usr/lib/ocaml/camlimages). - - If you want to create a toplevel with camlimages, type in - - % make top - -that creates a toplevel named "customtop". Then, - - % toplevel - -executes customtop with the appropriate options. - - Example applications - -------------------- - - In the examples directory you can find several example applications -using Camlimages. - - Some of the programs use the lablgtk GUI (in particular liv and -gifanim): you cannot compile them if the lablgtk library has not -been installed. - - To compile the examples execute: - - % cd examples - % make diff -Nru camlimages-3.0.1/INSTALL-old.txt camlimages-4.0.1/INSTALL-old.txt --- camlimages-3.0.1/INSTALL-old.txt 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/INSTALL-old.txt 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,143 @@ +*** This is OBSOLETE. + +This document describes how to build camlimages using automake, +which is now OBSOLETE and no longer supported. + + +*** Requirements + + To install CamlImages library, you need the following softwares: + + * ocaml 3.11 or higher + * GNU make + * automake (1.7.9 does not work. 1.9.6 works) + +and that is all. But note that this is the minimum requirement: you +can read/write BMP or PXM (PPM, PGM, PBM) image formats but no other +formats. If you want to deal with other image formats, you need to +install the corresponding external libraries: + + * libpng for PNG format + http://www.libpng.org/pub/png/libpng.html + http://sourceforge.net/projects/libpng/ + + * libjpeg for JPEG format + The Independent JPEG Group's software + ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz + + * libtiff for TIFF format + http://www.libtiff.org/ + ftp://ftp.remotesensing.org/pub/libtiff/ + + * libxpm for XPM format (could be already by the X server installation) + X contrib libraries ftp directory + ftp://ftp.x.org/contrib/libraries + + * freetype for drawing texts using truetype fonts + The FREETYPE Project + http://sourceforge.net/projects/freetype/ + + * libungif for GIF format + Because of the GIF patent problem of Unisys, we do not + recommend to use GIF file format. If you really want to + use GIF, do it in your own risk. + + Libungif, a library for using GIFs without compression. + http://sourceforge.net/projects/libungif/ + + * ghostscript for PS format + See http://www.ghostscript.com/ + + * lablgtk2, an Objective Caml interface to gtk+ + http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html + +*** Installation procedure by automake + + Generating build scripts + ------------------------ + + * make sure ocaml autoconf macros, available from bazar-ocaml/autoconf + directory (http://camlcvs.inria.fr/cgi-bin/cvsweb/bazar-ocaml/autoconf/), + are present in aclocal macro search path, by any of the following + solution: + - export ACLOCAL='aclocal -I ' before invoking autoreconf + - set up a dirlist file in automake macro directory, as explained in aclocal + documentation + * run autoreconf --install + + Configuration + ------------- + + Just run the standard configure script: + % ./configure + + If the script can't find some installed external libraries, this is probably + because they are installed in locations not included in linker or + preprocessor configuration. You'll have to passe proper flags while running + configure script: + %./configure CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib + %./configure CFLAGS=-I/sw/include LDFLAGS=-L/sw/lib + + If problems persist, check config.log for failure details. + + The script allow some user configuration. Check help output for details: + % ./configure --help + + Compilation + ----------- + type + + % make + +and wait. + + Test + ---- + Before you actually install the library, you can check that it +really works, by running examples in the test directory. For the test +programs, + + % cd test + % make + % ./test + % ./test.byt + +(./test.byt is the bytecode executable and ./test the binary +executable). + + Installation + ------------ + + If there is no compilation error and the test works fine, +install the library, + + % make install + +This installs all the required files into the $(LIBDIR) directory +specified in Makefile.config (usually /usr/local/lib/ocaml/camlimages +or /usr/lib/ocaml/camlimages). + + If you want to create a toplevel with camlimages, type in + + % make top + +that creates a toplevel named "customtop". Then, + + % toplevel + +executes customtop with the appropriate options. + + Example applications + -------------------- + + In the examples directory you can find several example applications +using Camlimages. + + Some of the programs use the lablgtk GUI (in particular liv and +gifanim): you cannot compile them if the lablgtk library has not +been installed. + + To compile the examples execute: + + % cd examples + % make diff -Nru camlimages-3.0.1/install-sh camlimages-4.0.1/install-sh --- camlimages-3.0.1/install-sh 2007-10-11 10:34:41.000000000 +0200 +++ camlimages-4.0.1/install-sh 2011-06-22 20:04:32.000000000 +0200 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2004-02-15.20 +scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -58,9 +58,6 @@ rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -transformbasename= -transform_arg= -instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= @@ -70,23 +67,27 @@ src= dst= dir_arg= +dstarg= +no_target_directory= -usage="Usage: $0 [OPTION]... SRCFILE DSTFILE +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 -d DIRECTORIES... + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... -In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. -In the second, create the directory path DIR. +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. Options: --b=TRANSFORMBASENAME --c copy source (using $cpprog) instead of moving (using $mvprog). +-c (ignored) -d create directories instead of installing files. --g GROUP $chgrp installed files to GROUP. --m MODE $chmod installed files to MODE. --o USER $chown installed files to USER. --s strip installed files (using $stripprog). --t=TRANSFORM +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. @@ -96,12 +97,7 @@ while test -n "$1"; do case $1 in - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - -c) instcmd=$cpprog - shift + -c) shift continue;; -d) dir_arg=true @@ -113,7 +109,7 @@ shift continue;; - --help) echo "$usage"; exit 0;; + --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift @@ -129,14 +125,20 @@ shift continue;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; - --version) echo "$0 $scriptversion"; exit 0;; + --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. - test -n "$dir_arg" && break + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do @@ -174,13 +176,13 @@ src= if test -d "$dst"; then - instcmd=: + mkdircmd=: chmodcmd= else - instcmd=$mkdirprog + mkdircmd=$mkdirprog fi else - # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then @@ -202,12 +204,16 @@ # 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: $dstarg: Is a directory" >&2 + exit 1 + fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. @@ -220,7 +226,8 @@ oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' - set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift IFS=$oIFS pathcomp= @@ -229,83 +236,83 @@ pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" || lasterr=$? + $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. - test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } + test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then - $doit $instcmd "$dst" \ + $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else - # If we're going to rename the final executable, determine the name now. - if test -z "$transformarg"; then - dstfile=`basename "$dst"` - else - dstfile=`basename "$dst" $transformbasename \ - | sed $transformarg`$transformbasename - fi - - # don't allow the sed command to completely eliminate the filename. - test -z "$dstfile" && dstfile=`basename "$dst"` + dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. - trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 - # Move or copy the file name to the temp name - $doit $instcmd "$src" "$dsttmp" && + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $instcmd $src $dsttmp" command. + # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - # 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. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit - } - else - : - fi - } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - fi || { (exit 1); exit; } + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # 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. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { - (exit 0); exit + (exit 0); exit 0 } # Local variables: diff -Nru camlimages-3.0.1/INSTALL.txt camlimages-4.0.1/INSTALL.txt --- camlimages-3.0.1/INSTALL.txt 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/INSTALL.txt 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,150 @@ +CamlImages - Objective Caml image processing library + +This library is reliable but still under development. + +*** Requirements + + To install CamlImages library, you need the following softwares: + + * ocaml 3.11.x or higher + * findlib (aka ocamlfind, + http://www.camlcity.org/archive/programming/findlib.html) + * omake (http://omake.metaprl.org/index.html) + +Note that this is the minimum requirement: you can read/write BMP or +PXM (PPM, PGM, PBM) image formats but no other formats. If you want to +deal with other image formats, you need to install the corresponding +external libraries: + + * libpng for PNG format + http://www.libpng.org/pub/png/libpng.html + http://sourceforge.net/projects/libpng/ + + * libjpeg for JPEG format + The Independent JPEG Group's software + ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz + + * libtiff for TIFF format + http://www.libtiff.org/ + ftp://ftp.remotesensing.org/pub/libtiff/ + + * libxpm for XPM format (could be already by the X server installation) + X contrib libraries ftp directory + ftp://ftp.x.org/contrib/libraries + + * freetype for drawing texts using truetype fonts + The FREETYPE Project + http://sourceforge.net/projects/freetype/ + + * libungif for GIF format + Because of the GIF patent problem of Unisys, we do not + recommend to use GIF file format. If you really want to + use GIF, do it in your own risk. + + Libungif, a library for using GIFs without compression. + http://sourceforge.net/projects/libungif/ + + * ghostscript for PS format + See http://www.ghostscript.com/ + + * lablgtk2, an Objective Caml interface to gtk+ + http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html + +*** Installation procedure by omake + + % omake + % omake install + +*** OLD installation procedure by automake (not supported any more) + + * GNU make + * automake (1.7.9 does not work. 1.9.6 works) + + Generating build scripts + ------------------------ + This is only needed if you're using CVS version directly. + + * make sure ocaml autoconf macros, available from bazar-ocaml/autoconf + directory, are present in aclocal macro search path, by any of the following + solution: + - export ACLOCAL='aclocal -I ' before invoking autoreconf + - set up a dirlist file in automake macro directory, as explained in aclocal + documentation + * run autoreconf --install + + Configuration + ------------- + + Just run the standard configure script: + % ./configure + + If the script can't find some installed external libraries, this is probably + because they are installed in locations not included in linker or + preprocessor configuration. You'll have to passe proper flags while running + configure script: + %./configure CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib + %./configure CFLAGS=-I/sw/include LDFLAGS=-L/sw/lib + + If problems persist, check config.log for failure details. + + The script allow some user configuration. Check help output for details: + % ./configure --help + + Compilation + ----------- + type + + % make + +and wait. + + Test + ---- + Before you actually install the library, you can check that it +really works, by running examples in the test directory. For the test +programs, + + % cd test + % make + % ./test + % ./test.byt + +(./test.byt is the bytecode executable and ./test the binary +executable). + + Installation + ------------ + + If there is no compilation error and the test works fine, +install the library, + + % make install + +This installs all the required files into the $(LIBDIR) directory +specified in Makefile.config (usually /usr/local/lib/ocaml/camlimages +or /usr/lib/ocaml/camlimages). + + If you want to create a toplevel with camlimages, type in + + % make top + +that creates a toplevel named "customtop". Then, + + % toplevel + +executes customtop with the appropriate options. + + Example applications + -------------------- + + In the examples directory you can find several example applications +using Camlimages. + + Some of the programs use the lablgtk GUI (in particular liv and +gifanim): you cannot compile them if the lablgtk library has not +been installed. + + To compile the examples execute: + + % cd examples + % make diff -Nru camlimages-3.0.1/License.txt camlimages-4.0.1/License.txt --- camlimages-3.0.1/License.txt 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/License.txt 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,501 @@ +This CamlImages library (the Library) is distributed under the terms of +the GNU Library General Public License version 2 (included below). + +As a special exception to the GNU Library General Public License, you +may link, statically or dynamically, a "work that uses the Library" +with a publicly distributed version of the Library to produce an +executable file containing portions of the Library, and distribute +that executable file under terms of your choice, without any of the +additional requirements listed in clause 6 of the GNU Library General +Public License. By "a publicly distributed version of the Library", +we mean either the unmodified Library as distributed by INRIA, or a +modified version of the Library that is distributed under the +conditions defined in clause 3 of the GNU Library General Public +License. This exception does not however invalidate any other reasons +why the executable file might be covered by the GNU Library General +Public License. + +---------------------------------------------------------------------- + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff -Nru camlimages-3.0.1/Makefile.am camlimages-4.0.1/Makefile.am --- camlimages-3.0.1/Makefile.am 2007-10-11 11:04:38.000000000 +0200 +++ camlimages-4.0.1/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,58 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/01/08 15:37:08 rousse Exp $ *) - -SUBDIRS = src examples doc - -if HAVE_FREETYPE -if HAVE_GIF -SUBDIRS += test -endif -endif - -CVSRELEASETAG = Release-$(subst .,_,$(VERSION)) -ANNOUNCEFILE = Announce-$(VERSION) - -WEBSITEDIR = /net/yquem/infosystems/www/$(PACKAGE) -FTPSITEDIR = /net/yquem/infosystems/ftp/$(PACKAGE) -CVSROOTDIR = /net/yquem/devel/caml/repository/ -CVSPKGDIR = bazar-ocaml/$(PACKAGE) - -cvstag: - cvs tag -c $(CVSRELEASETAG) - -cvsuntag: - cvs tag -d $(CVSRELEASETAG) - -announce: - mail -n -s "New release $(VERSION) of $(NAME)" \ - caml-announce@inria.fr < $(ANNOUNCEFILE) - -website: dist - if [ -d $(WEBSITEDIR) ]; then \ - : ; \ - else \ - $(INSTALL) -d -g caml -m 775 $(WEBSITEDIR); \ - fi - $(INSTALL) -g caml -m 755 $(DIST_ARCHIVES) $(WEBSITEDIR) - $(INSTALL) -g caml -m 775 doc/*.html $(WEBSITEDIR) - $(INSTALL) -g caml -m 775 doc/*.jpg $(WEBSITEDIR) - cd $(WEBSITEDIR) && ln -sf eng.html index.html - -# ftpsite: dist -# if [ ! -d $(FTPSITEDIR) ]; then \ -# $(INSTALL) -d -g caml -m g+w $(FTPSITEDIR); \ -# done -# $(INSTALL) -g caml -m g+w $(DISTFILE) $(FTPSITEDIR) diff -Nru camlimages-3.0.1/Makefile.in camlimages-4.0.1/Makefile.in --- camlimages-3.0.1/Makefile.in 2007-10-11 11:04:56.000000000 +0200 +++ camlimages-4.0.1/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,658 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/01/08 15:37:08 rousse Exp $ *) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -@HAVE_FREETYPE_TRUE@@HAVE_GIF_TRUE@am__append_1 = test -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure INSTALL install-sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = src examples doc test -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = src examples doc $(am__append_1) -CVSRELEASETAG = Release-$(subst .,_,$(VERSION)) -ANNOUNCEFILE = Announce-$(VERSION) -WEBSITEDIR = /net/yquem/infosystems/www/$(PACKAGE) -FTPSITEDIR = /net/yquem/infosystems/ftp/$(PACKAGE) -CVSROOTDIR = /net/yquem/devel/caml/repository/ -CVSPKGDIR = bazar-ocaml/$(PACKAGE) -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - else \ - include_option=--include; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/src - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ - || exit 1; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile config.h -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-recursive distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-info-am - - -cvstag: - cvs tag -c $(CVSRELEASETAG) - -cvsuntag: - cvs tag -d $(CVSRELEASETAG) - -announce: - mail -n -s "New release $(VERSION) of $(NAME)" \ - caml-announce@inria.fr < $(ANNOUNCEFILE) - -website: dist - if [ -d $(WEBSITEDIR) ]; then \ - : ; \ - else \ - $(INSTALL) -d -g caml -m 775 $(WEBSITEDIR); \ - fi - $(INSTALL) -g caml -m 755 $(DIST_ARCHIVES) $(WEBSITEDIR) - $(INSTALL) -g caml -m 775 doc/*.html $(WEBSITEDIR) - $(INSTALL) -g caml -m 775 doc/*.jpg $(WEBSITEDIR) - cd $(WEBSITEDIR) && ln -sf eng.html index.html - -# ftpsite: dist -# if [ ! -d $(FTPSITEDIR) ]; then \ -# $(INSTALL) -d -g caml -m g+w $(FTPSITEDIR); \ -# done -# $(INSTALL) -g caml -m g+w $(DISTFILE) $(FTPSITEDIR) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/Makefile.rules camlimages-4.0.1/Makefile.rules --- camlimages-3.0.1/Makefile.rules 2007-10-11 10:33:49.000000000 +0200 +++ camlimages-4.0.1/Makefile.rules 1970-01-01 02:00:00.000000000 +0200 @@ -1,36 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ diff -Nru camlimages-3.0.1/Makefile.variables camlimages-4.0.1/Makefile.variables --- camlimages-3.0.1/Makefile.variables 2007-10-11 10:33:49.000000000 +0200 +++ camlimages-4.0.1/Makefile.variables 1970-01-01 02:00:00.000000000 +0200 @@ -1,48 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src -CAMLIMAGES_LIBS = - -if HAVE_LABLGTK2 -CAMLIMAGES_INCLUDES += -I $(LABLGTK2DIR) -CAMLIMAGES_LIBS += lablgtk.cma -endif - -if HAVE_LABLGTK -CAMLIMAGES_INCLUDES += -I $(LABLGTKDIR) -CAMLIMAGES_LIBS += lablgtk.cma -endif - -CAMLIMAGES_LIBS += graphics.cma camlimages.cma - -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) - -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) - -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend diff -Nru camlimages-3.0.1/missing camlimages-4.0.1/missing --- camlimages-3.0.1/missing 2007-10-11 10:34:41.000000000 +0200 +++ camlimages-4.0.1/missing 1970-01-01 02:00:00.000000000 +0200 @@ -1,360 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2003-09-02.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program 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, 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. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# 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. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff -Nru camlimages-3.0.1/ocaml.m4 camlimages-4.0.1/ocaml.m4 --- camlimages-3.0.1/ocaml.m4 2007-10-11 10:34:19.000000000 +0200 +++ camlimages-4.0.1/ocaml.m4 2011-06-22 20:04:32.000000000 +0200 @@ -3,7 +3,7 @@ # Guillaume Rousse # inspired by previous work from: # Georges Mariano -# Jean-Christophe Filliâtre +# Jean-Christophe FilliÄtre # Olivier Andrieu # Grigory Batalov @@ -22,17 +22,17 @@ # allow the user to disable the use of optimized versions AC_ARG_ENABLE( - [opt], + [native-tools], AC_HELP_STRING( - [--enable-opt], - [use optimized versions of ocaml tools (default)] + [--enable-native-tools], + [use native versions of ocaml tools (default)] ), [case "$enableval" in - yes) ac_ocaml_enable_opt=$enableval;; - no) ac_ocaml_enable_opt=$enableval;; - *) AC_MSG_ERROR([bad value $enableval for --enable-opt]);; + yes) ac_ocaml_enable_native_tools=$enableval;; + no) ac_ocaml_enable_native_tools=$enableval;; + *) AC_MSG_ERROR([bad value $enableval for --enable-native-tools]);; esac], - [ac_ocaml_enable_opt=yes] + [ac_ocaml_enable_native_tools=yes] ) # Checking for OCaml compiler @@ -102,7 +102,7 @@ ) OCAMLLIB=$ac_cv_ocaml_library_path - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for ocamlc.opt _AC_OCAML_PATH_PROG_NONFATAL(OCAMLC_OPT, ocamlc.opt) if test -n "$OCAMLC_OPT"; then @@ -139,7 +139,7 @@ fi fi - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for ocamlopt.opt _AC_OCAML_PATH_PROG_NONFATAL(OCAMLOPT_OPT, ocamlopt.opt) if test -n "$OCAMLOPT_OPT"; then @@ -153,7 +153,7 @@ # Checking for ocamldep _AC_OCAML_PATH_PROG_NONFATAL(OCAMLDEP, ocamldep) - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for ocamldep.opt _AC_OCAML_PATH_PROG_NONFATAL(OCAMLDEP_OPT, ocamldep.opt) if test -n "$OCAMLDEP_OPT"; then @@ -161,6 +161,8 @@ fi fi + AC_ARG_VAR([OCAMLCFLAGS], [Ocaml compiler flags [none]]) + ]) # AC_PROG_OCAML # AC_PROG_OCAML_TOOL(VARIABLE, PROGRAM) @@ -173,7 +175,7 @@ # Checking for bytecode version _AC_OCAML_PATH_PROG_NONFATAL([$1], [$2]) - if test "$ac_ocaml_enable_opt" = "yes"; then + if test "$ac_ocaml_enable_native_tools" = "yes"; then # Checking for binary version, using AC_PATH_PROG directly # to avoid warnings AC_PATH_PROG([$1]_OPT, [$2].opt) diff -Nru camlimages-3.0.1/OMakefile camlimages-4.0.1/OMakefile --- camlimages-3.0.1/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,210 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +include OMyMakeroot + +# For the author's personal use +if $(defined WithOMyApt) + RequireAptPackages(libgif-dev libjpeg62-dev libtiff4-dev libpng12-dev libfreetype6-dev libxpm-dev) + +########################################## You may want to change these + +# Specify non standard include directories +INCLUDES[]= + /usr/include/X11 + /usr/local/include + +# Specify non standard library directories +LDFLAGS[]+= +# for example, +# LDFLAGS[]+= -L/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/ + +# Specify directories where X's rgb.txt can be found +PATH_RGB_TXT[]= + /etc/X11 + /usr/share/X11 + +BYTE_ENABLED=1 +NATIVE_ENABLED=1 + +######################################################################## + +VERSION=4.0.0 + +# for src/META +PACKAGE_NAME=camlimages +PACKAGE_VERSION=$(VERSION) + +OCAMLMKLIB=ocamlmklib + +##################################################### Auto configuration + +print_configured() = + println(--- Configuring) + println(wordsize $(WORD_SIZE)) + println(--- C libraries) + println(libgif: $(HAVE_GIF)) + println(libpng: $(HAVE_PNG)) + println(libjpeg: $(HAVE_JPEG)) + println(libtiff: $(HAVE_TIFF)) + println(libxpm: $(HAVE_XPM)) + println(libz: $(HAVE_Z)) + println(--- Subpackages) + println(gif: $(SUPPORT_GIF) \($(string $(LDFLAGS_gif)\))) + println(png: $(SUPPORT_PNG) \($(string $(LDFLAGS_png)\))) + println(jpeg: $(SUPPORT_JPEG) \($(string $(LDFLAGS_jpeg)\))) + println(tiff: $(SUPPORT_TIFF) \($(string $(LDFLAGS_tiff)\))) + println(xpm: $(SUPPORT_XPM) \($(string $(LDFLAGS_xpm)\))) + println(freetype: $(SUPPORT_FREETYPE) \($(PATH_FREETYPE_CONFIG)\) \($(string $(LDFLAGS_freetype))\)) + println(ps: $(SUPPORT_PS) \($(PATH_GS)\)) + println(rgb.txt: $(SUPPORT_RGB_TXT) \($(string $(PATH_RGB_TXT))\)) + println(lablgtk2: $(SUPPORT_LABLGTK2)) + println(graphics: $(SUPPORT_GRAPHICS)) + println(--- Summary) + println(supported subpackages: $(string $(SUPPORTED_SUBPACKAGES))) + println(supported formats: $(string $(SUPPORTED_FORMATS))) + println(supported non-formats: $(string $(SUPPORTED_NON_FORMATS))) + println(CFLAGS: $(string $(CFLAGS))) + println(LDFLAGS: $(string $(LDFLAGS))) + println(---) + +.STATIC: + # Variables must be initialized inside .STATIC, if they should be + # exported out. + + if $(not $(OCAMLFIND_EXISTS)) + eprintln(This project requires ocamlfind\, but is was not found.) + eprintln(You need to install ocamlfind and run "omake --configure".) + exit 1 + + OCAMLMKLIB_EXISTS = $(CheckProg $(OCAMLMKLIB)) + if $(not $(OCAMLMKLIB_EXISTS)) + eprintln(This project requires ocamlmklib, but is was not found.) + eprintln(You need to install ocamlmklib and run "omake --configure".) + exit 1 + + CFLAGS = $(addprefix -I , $(INCLUDES)) + + WORD_SIZE = $(Word_size) + + # Image formats implemented using external libraries or binaries + FORMATS= gif png jpeg tiff xpm ps + + # Image formats with necessary libraries supported + SUPPORTED_FORMATS[]= + + # GUI/font rendering libraries supported + SUPPORTED_NON_FORMATS[]= + + # SUPPORTED_FORMATS + SUPPORTED_NON_FORMATS + SUPPORTED_SUBPACKAGES[]= + + # OCaml packages found likable + OCAMLPACKS[]= + + HAVE_GIF = $(Check_header_library gif, gif_lib.h, DGifOpenFileName) + SUPPORT_GIF = $(HAVE_GIF) + LDFLAGS_gif= + if $(SUPPORT_GIF) + LDFLAGS_gif=-lgif + SUPPORTED_FORMATS+=gif + export + + HAVE_Z = $(Check_header_library z, zlib.h, zlibVersion) + HAVE_PNG = $(Check_header_library png, png.h, png_create_read_struct) + SUPPORT_PNG = $(and $(HAVE_Z) $(HAVE_PNG)) + LDFLAGS_png= + if $(SUPPORT_PNG) + LDFLAGS_png=-lpng -lz + SUPPORTED_FORMATS+=png + export + + HAVE_JPEG = $(Check_header_library jpeg, jpeglib.h, jpeg_read_header) + SUPPORT_JPEG = $(HAVE_JPEG) + LDFLAGS_jpeg= + if $(SUPPORT_JPEG) + LDFLAGS_jpeg=-ljpeg + SUPPORTED_FORMATS+=jpeg + export + + HAVE_TIFF = $(Check_header_library tiff, tiff.h, TIFFOpen) + SUPPORT_TIFF = $(and $(HAVE_Z) $(HAVE_JPEG) $(HAVE_TIFF)) + LDFLAGS_tiff= + if $(SUPPORT_TIFF) + LDFLAGS_tiff=$(array -ltiff -ljpeg -lz) + SUPPORTED_FORMATS+=tiff + export + + HAVE_XPM = $(Check_header_library Xpm, xpm.h, XpmReadFileToXpmImage) + SUPPORT_XPM = $(HAVE_XPM) + LDFLAGS_xpm= + if $(SUPPORT_XPM) + LDFLAGS_xpm=-lXpm + SUPPORTED_FORMATS+=xpm + export + + SUPPORT_PS = $(Check_prog_in_path gs) + PATH_GS = $(WHERE) + LDFLAGS_ps= + if $(SUPPORT_PS) + LDFLAGS_ps= + SUPPORTED_FORMATS+=ps + export + + SUPPORT_LABLGTK2 = $(Check_ocamlfind_package lablgtk2) + if $(SUPPORT_LABLGTK2) + SUPPORTED_NON_FORMATS+=lablgtk2 + OCAMLPACKS+=lablgtk2 + export + + # CR: ocamlfind registers graphics even if not available + SUPPORT_GRAPHICS = $(Check_ocamlfind_package_compilation graphics, Graphics) + if $(SUPPORT_GRAPHICS) + SUPPORTED_NON_FORMATS+=graphics + OCAMLPACKS+=graphics + export + + SUPPORT_FREETYPE = $(Check_prog_in_path freetype-config) + PATH_FREETYPE_CONFIG = $(WHERE) + LDFLAGS_freetype= + if $(SUPPORT_FREETYPE) + println(SUPPORT_FREETYPE=$(SUPPORT_FREETYPE)!) + CFLAGS= $(CFLAGS) $(shell freetype-config --cflags) + LDFLAGS_freetype= $(shell freetype-config --libs) + export + if $(SUPPORT_FREETYPE) + SUPPORTED_NON_FORMATS+=freetype + export + + SUPPORTED_SUBPACKAGES= $(SUPPORTED_FORMATS) $(SUPPORTED_NON_FORMATS) + + SUPPORT_RGB_TXT = $(Check_file_in_path $(PATH_RGB_TXT), rgb.txt) + PATH_RGB_TXT = $(WHERE) + + print_configured() + +# for config.h +CGeneratedFiles(config.h) +section: + PACKAGE=\"camlimages\" + PACKAGE_BUGREPORT=\"jun.furuse@gmail.com\" + PACKAGE_NAME=$(PACKAGE) + PACKAGE_STRING=\"camlimages $(VERSION)\" + PACKAGE_TARNAME=$(PACKAGE) + PACKAGE_VERSION=\"$(VERSION)\" + SIZEOF_LONG=$(WORD_SIZE) + VERSION=$(PACKAGE_VERSION) + ConfReplaceConfigH(config.h) + +.SUBDIRS: src test examples diff -Nru camlimages-3.0.1/OMakeroot camlimages-4.0.1/OMakeroot --- camlimages-3.0.1/OMakeroot 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/OMakeroot 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,45 @@ +######################################################################## +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this file, to deal in the File without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the File, and to permit persons to whom the +# File is furnished to do so, subject to the following condition: +# +# THE FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE FILE OR +# THE USE OR OTHER DEALINGS IN THE FILE. + +######################################################################## +# The standard OMakeroot file. +# You will not normally need to modify this file. +# By default, your changes should be placed in the +# OMakefile in this directory. +# +# If you decide to modify this file, note that it uses exactly +# the same syntax as the OMakefile. +# + +# +# Include the standard installed configuration files. +# Any of these can be deleted if you are not using them, +# but you probably want to keep the Common file. +# +open build/C +open build/OCaml +open build/LaTeX + +# +# The command-line variables are defined *after* the +# standard configuration has been loaded. +# +DefineCommandVars() + +# +# Include the OMakefile in this directory. +# +.SUBDIRS: . diff -Nru camlimages-3.0.1/OMyMakeroot camlimages-4.0.1/OMyMakeroot --- camlimages-3.0.1/OMyMakeroot 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/OMyMakeroot 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,192 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +DefineCommandVars() + +######################################################################## tools + +USE_OCAMLFIND = true + +OCAML_WHERE = $(shell ocamlc -where) + +##################################################################### configure + +open configure/Configure + +Check_header_library(xlib, xheader, xfunc) = + return $(and $(VerboseCheckCHeader $(xheader)), $(VerboseCheckCLib $(xlib), $(xfunc))) + +Have_library(libname, lib, header, func) = + setvar(this.HAVE_$(libname), $(Check_header_library $(lib), $(header), $(func))) + export + +Check_ocamlfind_package(package) = + ConfMsgChecking($(package)) + ConfMsgFound($(shell-success ocamlfind query $(package))) + +Check_pkg_config(package, option) = + ConfMsgChecking(Freetype) + ConfMsgFound($(shell-success $(package)-config $(option))) + +where1(com) = + WHERE = $(where $(prog)) + if $(WHERE) + value $(nth 0, $(WHERE)) + else + value + +# export $(WHERE) +Check_prog_in_path(prog) = + ConfMsgChecking(for $(prog)) + WHERE = $(where1 $(prog)) + export WHERE + if $(WHERE) + ConfMsgResult(found $(WHERE)) + return true + else + ConfMsgResult(FAILED - no $(prog) found) + return false + +# export $(WHERE) +Check_file_in_path(path, file) = + ConfMsgChecking(for $(file)) + WHERE = $(find-in-path-optional $(path), $(file)) + export WHERE + if $(WHERE) + WHERE = $(nth 0, $(WHERE)) + export WHERE + ConfMsgResult(found $(WHERE)) + return true + else + WHERE = + export WHERE + ConfMsgResult(FAILED - no $(file) found) + return false + export WHERE + +# Return the size of word in bytes. Uses omake's arithmetic which depends +# on OCaml's int +Word_size() = + if $(lt $(add $(int 1073741823) $(int 1)), $(int 0)) + value 4 + else + value 8 + +Check_ocamlfind_package_compilation(package, module) = + ConfMsgChecking($(package) compilability: open $(module)) + tmp_ml = $(file $(tmpfile omake, .ml)) + tmp = $(file $(replacesuffixes .ml, $"$(EMPTY)", $(tmp_ml))) + command[] = $(OCamlC) -c -package $(package) $(tmp_ml) + + # The program + program = $"""(* Configuration file; you can remove this. *) +open $(module) +""" + + # Compile it + fprint($(tmp_ml), $(program)) + + protected.result = $(shell-success-null $(command)) + + rm -f $(tmp_ml) $(tmp).cmi $(tmp).cmo $(tmp)$(EXE) + + return $(ConfMsgYesNo $(result)) + +#################################################################### build rule + +# annot, spot, spit files +%.annot %.spot: %.ml %.cmi + $(OCamlC) -c $< + +%.spit: %.mli + $(OCamlC) -c $< + +# of course it only works with unix +OCamlMkLibC(name, files, ldflags) = + protected.COBJS=$(addsuffix .o, $(files)) + dll$(name).so lib$(name).a: $(COBJS) + $(OCAMLMKLIB) -o $(name) $(LDFLAGS) $(ldflags) $(COBJS) + return $(array dll$(name).so, lib$(name).a) + +# If ocamlmklib does not work for you, you can do: +# 1. Put -verbose switch to the above call of $(OCAMLMKLIB) and see the command. +# 2. Tweak the commands ocamlmklib invokes for you environment. +# 3. Redefine OCamlMklibC with the tweaked commands. +# For example, in Linux, +# +# OCamlMkLibC(name, files, ldflags) = +# protected.COBJS=$(addsuffix .o, $(files)) +# dll$(name).so lib$(name).a: $(COBJS) +# # Change the following +# $(CC) -shared -o dll$(name).so $(LDFLAGS) $(ldflags) $(COBJS) +# ar rc lib$(name).a $(COBJS); ranlib lib$(name).a +# # Upto here +# return $(array dll$(name).so, lib$(name).a) + +################################################################ config replace + +ConfReplaceAt(file)= + $(file): $(file).in + section: # I dunno but section is required + stdout = $(fopen $(file), w) + fsubst($(file).in) + case $"@\([A-Z0-9_]+\)@" g + getvar($1) + close($(stdout)) + +ConfReplaceConfigH(file)= + $(file): $(file).in + section: # I dunno but section is required + stdout = $(fopen $(file), w) + fsubst($(file).in) + case $"#undef \([A-Z_0-9]+\)" g + try + v=$(getvar $1) + value $"#define $1 $(v)" + default + value $"/* undef $1 */" + close($(stdout)) + +##################################################################### directory + +ROOT = $(dir .) +SRCDIR = $(ROOT)/src + +################################################################### local build + +Subpackages_available(packs) = + sequence-forall($(fun elem, $(mem $(elem), all supported $(SUPPORTED_SUBPACKAGES))), $(packs)) + +BuildExample(namex, modules, packages) = + .PHONY: clean + if $(Subpackages_available $(packages)) + subs=core $(packages) + # the library is created with -dllib: no -custom required + OCAML_BYTE_LINK_FLAGS= + OCAMLINCLUDES += $(SRCDIR) + OCAML_LIBS+= $(addprefix $(SRCDIR)/camlimages_, $(subs)) + OCAML_BYTE_LINK_FLAGS+=-dllpath $(SRCDIR) + export + .DEFAULT: $(OCamlProgram $(namex), $(modules)) + else + println(Warning: $(namex) is not built: it requires $(string $(packages))) + + clean: + rm -f $(filter-proper-targets $(ls R, .)) + + export + + +############################################################################### + diff -Nru camlimages-3.0.1/src/bitmap.ml camlimages-4.0.1/src/bitmap.ml --- camlimages-3.0.1/src/bitmap.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/bitmap.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,9 +10,9 @@ (* *) (***********************************************************************) -(* $Id: bitmap.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: bitmap.ml,v 1.7 2009/07/04 03:39:28 furuse Exp $*) -let debug = ref false;; +let debug = ref true;; let debugs s = if !debug then prerr_endline s;; let maximum_live = ref 0;; (* around 3M words for example *) @@ -39,6 +39,16 @@ let string_create s = try String.create s with Invalid_argument _ -> raise Out_of_memory;; +module Block = struct + type t = { + width : int; + height : int; + x : int; + y : int; + dump : string; + } +end + module type Bitdepth = sig val bytes_per_pixel : int end;; @@ -48,8 +58,8 @@ type t = { (* The whole size *) - bmap_width : int; - bmap_height : int; + width : int; + height : int; (* block partition size *) block_size_width : int; block_size_height : int; @@ -64,15 +74,16 @@ (* Destruction *) (****************************************************************************) - let destroy t = ();; (* do nothing... *) + let destroy _t = ();; (* do nothing... *) let destroy_block blk = if blk.block_data = Destroyed then () else begin match blk.swap with | Some fname -> - begin match blk.block_data with - | Swapped -> Sys.remove fname; blk.block_data <- Destroyed - | _ -> () end + begin match blk.block_data with + | Swapped -> Sys.remove fname; blk.block_data <- Destroyed + | InMemory _ | Destroyed -> () + end | None -> () end; swappable_blocks := @@ -106,60 +117,55 @@ let memory width height init = (* try to have it whole in memory *) - (* first, try to make a huge string *) + check_init init; - try - let buf = string_create (width * height * bytes_per_pixel) in - begin match init with - | Some v -> fill_string buf v - | None -> () - end; - { bmap_width = width; - bmap_height = height; - block_size_width = width; - block_size_height = height; - blocks_x = 1; - blocks_y = 1; - data = - [| - [| { block_width = width; - block_height = height; - block_data = InMemory buf; - block_size = width * height * bytes_per_pixel; - last_used = 0.0; - swap = None; } - |] - |]; - access = (fun x y -> buf, (y * width + x) * bytes_per_pixel) - } - with - | Out_of_memory -> - (* Out of memory? then let's try to use scanlined format *) - let bufs = - Array.init height - (fun _ -> string_create (width * 1 * bytes_per_pixel)) in - begin match init with - | Some v -> Array.iter (fun s -> fill_string s v) bufs - | None -> () - end; - { bmap_width = width; - bmap_height = height; - block_size_width = width; - block_size_height = 1; - blocks_x = 1; - blocks_y = height; - data = - [| Array.init height - (fun h -> { - block_width = width; - block_height = 1; - block_data = InMemory bufs.(h); - block_size = width * 1 * bytes_per_pixel; - last_used = 0.0; - swap = None; - }) |]; - access = (fun x y -> bufs.(y), x * bytes_per_pixel) - };; + + (* we can have hsize lines at maximum in one string *) + let hsize = Sys.max_string_length / (width * bytes_per_pixel) in + + let hsize = min height hsize in + + (* how many caml strings required? *) + let blocks_y = (height - 1) / hsize + 1 in + let buf_size_heights = + Array.init blocks_y (fun by -> + let height = + if by = blocks_y - 1 then + let m = height mod hsize in + if m = 0 then hsize else m + else hsize + in + (* CR jfuruse: check overflow *) + let size = width * height * bytes_per_pixel in + string_create size, size, height) + in + let bufs = Array.map (fun (buf, _, _) -> buf) buf_size_heights in + begin match init with + | Some v -> Array.iter (fun s -> fill_string s v) bufs; + | None -> () + end; + { width = width; + height = height; + block_size_width = width; + block_size_height = hsize; + blocks_x = 1; + blocks_y = blocks_y; + data = [| Array.init blocks_y (fun h -> + let buf, size, height = buf_size_heights.(h) in + { block_width = width; + block_height = height; + block_data = InMemory buf; + block_size = size; + last_used = 0.0; + swap = None; + }) |]; + access = + if blocks_y = 1 then (fun x y -> + bufs.(0), (y * width + x) * bytes_per_pixel) + else (fun x y -> + bufs.(y / hsize), ((y mod hsize) * width + x) * bytes_per_pixel) + };; + let swap_out = function | {block_data = Destroyed} -> failwith "swap_out: Already destroyed" @@ -200,28 +206,29 @@ let swap_in = function | {block_data = Destroyed} -> raise (Failure "swap_in: Already destroyed") | {block_data = InMemory s} as blk -> - touch_block blk; - s + touch_block blk; + s | {swap = Some fname; block_data = Swapped; block_size = size} as blk -> - begin try - debugs ("swap in "^fname); - require size; - let ic = open_in_bin fname in - let s = string_create size in - really_input ic s 0 size; - close_in ic; - blk.block_data <- InMemory s; - Sys.remove fname; - touch_block blk; - s - with - | e -> prerr_endline - (Printf.sprintf "Swap-in failed (%s)" (Printexc.to_string e)); - raise e - end + begin try + debugs ("swap in "^fname); + require size; + let ic = open_in_bin fname in + let s = string_create size in + really_input ic s 0 size; + close_in ic; + blk.block_data <- InMemory s; + Sys.remove fname; + touch_block blk; + s + with + | e -> prerr_endline + (Printf.sprintf "Swap-in failed (%s)" (Printexc.to_string e)); + raise e + end | _ -> assert false;; let alloc_swappable_block width height init = + (* CR jfuruse: check overflow *) let size = bytes_per_pixel * width * height in require size; let s = string_create size in @@ -249,6 +256,7 @@ check_init init; (* determine the block size *) let rec get_block_size p = + (* CR jfuruse: check overflow *) let whole_words = (bytes_per_pixel * width * height + Camlimages.word_size - 1) / Camlimages.word_size in @@ -262,6 +270,7 @@ and block_size_height = height / p + (if height mod p <> 0 then 1 else 0) in try + (* CR jfuruse: check overflow *) p, string_create (block_size_width * block_size_height * bytes_per_pixel) with @@ -282,6 +291,7 @@ debugs (Printf.sprintf "creating %d x %d blocks (%dx%d)" blocks blocks block_size_width block_size_height); let data = + (* CR jfuruse: check overflow *) Array.init blocks_x (fun x -> Array.init blocks_y @@ -294,8 +304,8 @@ else height - block_size_height * (blocks_y - 1) in alloc_swappable_block w h init)) in let t = - { bmap_width = width; - bmap_height = height; + { width = width; + height = height; block_size_width = block_size_width; block_size_height = block_size_height; blocks_x = blocks_x; @@ -326,8 +336,8 @@ end;; let create_with width height buf = - { bmap_width = width; - bmap_height = height; + { width = width; + height = height; block_size_width = width; block_size_height = height; blocks_x = 1; @@ -336,6 +346,7 @@ [| [| { block_width = width; block_height = height; block_data = InMemory buf; + (* CR jfuruse: check overflow *) block_size = width * height * bytes_per_pixel; last_used = 0.0; swap = None; @@ -343,6 +354,42 @@ access = (fun x y -> buf, (y * width + x) * bytes_per_pixel); };; + let create_with_scanlines width height scanlines = + (* CR jfuruse: check overflow *) + let block_size = width * bytes_per_pixel in + if Array.length scanlines <> height then begin + Format.eprintf "scanline error %d (height=%d) (bpp=%d)@." + (Array.length scanlines) height bytes_per_pixel; + assert false + end; + for y = 0 to height - 1 do + if String.length scanlines.(y) <> block_size then begin + Format.eprintf "scanline error %d = block_size %d = %d * %d (y=%d)@." + (String.length scanlines.(y)) + block_size + width + bytes_per_pixel + y; + assert false + end + done; + { width = width; + height = height; + block_size_width = width; + block_size_height = 1; + blocks_x = 1; + blocks_y = height; + data = + [| Array.mapi (fun y scanline -> + { block_width = width; + block_height = 1; + block_data = InMemory scanlines.(y); + block_size = block_size; + last_used = 0.0; + swap = None }) scanlines |]; + access = (fun x y -> scanlines.(y), x * bytes_per_pixel); + };; + (****************************************************************************) (* Tool functions *) (****************************************************************************) @@ -427,24 +474,45 @@ done;; (* scanline access (special case of strip access) *) - let get_scanline t y = get_strip t 0 y t.bmap_width;; + let get_scanline t y = get_strip t 0 y t.width;; + + (* returns the scan line address and how many lines we can get *) + let get_scanline_ptr t = + match t.blocks_x, t.blocks_y with + | 1, 1 -> (* optimized *) + Some (fun y -> + let blk = t.data.(0).(0) in + let src = swap_in blk in + let adrs = (blk.block_width * y) * bytes_per_pixel in + (src, adrs), blk.block_height - y) + | 1, _ -> (* optimized *) + Some (fun y -> + let bly = y / t.block_size_height in + let y' = y mod t.block_size_height in + let blk = Array.unsafe_get (Array.unsafe_get t.data 0) bly in + let src = swap_in blk in + let adrs = (blk.block_width * y') * bytes_per_pixel in + (src, adrs), blk.block_height - y') + | _, _ -> None let set_scanline t y str = - if String.length str <> t.bmap_width * B.bytes_per_pixel then + (* CR jfuruse: check overflow *) + if String.length str <> t.width * B.bytes_per_pixel then failwith (Printf.sprintf "scan=%d width=%d bbp=%d" - (String.length str) t.bmap_width B.bytes_per_pixel); - set_strip t 0 y t.bmap_width str;; + (String.length str) t.width B.bytes_per_pixel); + set_strip t 0 y t.width str;; (* dump : of course this does not work for large images *) let dump t = - let size = bytes_per_pixel * t.bmap_width * t.bmap_height in + (* CR jfuruse: check overflow *) + let size = bytes_per_pixel * t.width * t.height in match t.blocks_x, t.blocks_y with | 1, 1 -> swap_in t.data.(0).(0) | 1, h -> let s = string_create size in - let scanline_size = bytes_per_pixel * t.bmap_width in + let scanline_size = bytes_per_pixel * t.width in for y = 0 to h - 1 do let str = swap_in t.data.(0).(y) in String.unsafe_blit str 0 s (scanline_size * y) scanline_size @@ -459,7 +527,7 @@ let scanline_size = bytes_per_pixel * blk.block_width in for i = 0 to blk.block_height - 1 do String.unsafe_blit str (scanline_size * i) - s (((y * t.block_size_height + i) * t.bmap_width + + s (((y * t.block_size_height + i) * t.width + x * t.block_size_width) * bytes_per_pixel) scanline_size done @@ -469,8 +537,8 @@ (* sub-bitmap *) let sub t x y w h = - Region.check t.bmap_width t.bmap_height x y; - Region.check t.bmap_width t.bmap_height (x + w - 1) (y + h - 1); + Region.check t.width t.height x y; + Region.check t.width t.height (x + w - 1) (y + h - 1); let dst = create w h None in try for i = 0 to h - 1 do set_scanline dst i (get_strip t x (y + i) w) done; @@ -478,15 +546,34 @@ with | e -> destroy dst; raise e;; - let copy t = sub t 0 0 t.bmap_width t.bmap_height;; + let copy t = sub t 0 0 t.width t.height;; let blit src sx sy dst dx dy w h = - Region.check src.bmap_width src.bmap_height sx sy; - Region.check src.bmap_width src.bmap_height (sx + w - 1) (sy + h - 1); - Region.check dst.bmap_width dst.bmap_height dx dy; - Region.check dst.bmap_width dst.bmap_height (dx + w - 1) (dy + h - 1); + Region.check src.width src.height sx sy; + Region.check src.width src.height (sx + w - 1) (sy + h - 1); + Region.check dst.width dst.height dx dy; + Region.check dst.width dst.height (dx + w - 1) (dy + h - 1); for i = 0 to h - 1 do set_strip dst dx (dy + i) w (get_strip src sx (sy + i) w) done;; + let blocks bmp = bmp.blocks_x, bmp.blocks_y + + let dump_block bmp x y = + let blk = bmp.data.(x).(y) in + let at_x = x * bmp.block_size_width in + let at_y = y * bmp.block_size_height in + let w = + if x = bmp.blocks_x - 1 then bmp.width - at_x + else bmp.block_size_width + in + let h = + if y = bmp.blocks_y - 1 then bmp.height - at_y + else bmp.block_size_height + in + { Block.width = w; + height = h; + x = at_x; + y = at_y; + dump = swap_in blk } end;; diff -Nru camlimages-3.0.1/src/bitmap.mli camlimages-4.0.1/src/bitmap.mli --- camlimages-3.0.1/src/bitmap.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/bitmap.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: bitmap.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: bitmap.mli,v 1.5 2009/07/04 03:39:28 furuse Exp $*) (* Bitmaps used in images. Bitmaps are partitioned into blocks. Usually only one block is @@ -47,6 +47,16 @@ The defaults are both 0. (i.e. swapping is disabled ) *) +module Block : sig + type t = { + width : int; + height : int; + x : int; + y : int; + dump : string; + } +end + module type Bitdepth = sig val bytes_per_pixel : int end;; @@ -64,6 +74,8 @@ (* [create_with width height initdata] creates a bitmap whose initial data is [initdata]. *) + val create_with_scanlines : int -> int -> string array -> t + val destroy : t -> unit (* Destroy bitmaps *) @@ -87,6 +99,9 @@ [set_scanline t y str] writes [str] to the scanline of [t] at [y]. *) + (* only for one row *) + val get_scanline_ptr : t -> (int -> (string * int) * int) option + val dump : t -> string (* Create a string representation of a bitmap. It may easily raise an exception Out_of_memory for large images. *) @@ -103,5 +118,9 @@ (sx, sy) - (sx + width - 1, sy + height - 1) to [dst], at (dx, dy) - (dx + width - 1, dy + height - 1) *) -end;; + val blocks : t -> int * int + (* returns number of blocks in row and column *) + + val dump_block : t -> int -> int -> Block.t +end;; diff -Nru camlimages-3.0.1/src/blend.ml camlimages-4.0.1/src/blend.ml --- camlimages-3.0.1/src/blend.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/blend.ml 2011-06-22 20:04:32.000000000 +0200 @@ -6,7 +6,7 @@ (* look at gxblend.c of ghostscript *) let blend = function - | Normal -> fun src dst -> src + | Normal -> fun src _dst -> src | Multiply -> fun src dst -> let t = dst * src + 0x80 in @@ -68,7 +68,7 @@ let blender = blend blendmode in match srcalpha with - | 0 -> fun src dst -> dst + | 0 -> fun _src dst -> dst | 255 -> fun src dst -> {r = blender src.r dst.r; diff -Nru camlimages-3.0.1/src/bmp.ml camlimages-4.0.1/src/bmp.ml --- camlimages-3.0.1/src/bmp.ml 2007-01-18 12:29:56.000000000 +0200 +++ camlimages-4.0.1/src/bmp.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: bmp.ml,v 1.1 2007/01/18 10:29:56 rousse Exp $ *) +(* $Id: bmp.ml,v 1.3 2009/02/08 14:59:17 weis Exp $ *) (* Loading and saving image in the bmp format. *) @@ -91,10 +91,10 @@ field contains up to 256 entries. In this case, each byte in the array represents a single pixel. *) | ColorM - (* 24 The bitmap has a maximum of 2^24 colors. The bmiColors - field is NULL, and each three bytes in the bitmap array - represents the relative intensities of red, green, and blue, - respectively, of a pixel. *) + (* 24 The bitmap has a maximum of 2^24 colors. The bmiColors + field is NULL, and each three bytes in the bitmap array + represents the relative intensities of red, green, and blue, + respectively, of a pixel. *) ;; (* =================================================================== *) @@ -106,13 +106,15 @@ let bytes_read = ref 0;; let read_byte ic = incr bytes_read; input_byte ic;; -let skip_byte ic = incr bytes_read; let _ = input_byte ic in ();; +let skip_byte ic = incr bytes_read; ignore (input_byte ic) +;; let read_word ic = let b0 = read_byte ic in let b1 = read_byte ic in (* little-endian form *) - (b1 lsl 8) + b0;; + (b1 lsl 8) + b0 +;; let read_dword ic = let b0 = read_byte ic in @@ -120,12 +122,14 @@ let b2 = read_byte ic in let b3 = read_byte ic in (* little-endian form *) - (b3 lsl 24) + (b2 lsl 16) + (b1 lsl 8) + b0;; + (b3 lsl 24) + (b2 lsl 16) + (b1 lsl 8) + b0 +;; let read_bit_count ic = match read_word ic with | 1 -> Monochrome | 4 -> Color16 | 8 -> Color256 | 24 -> ColorM - | n -> failwith ("invalid colors number : " ^ string_of_int n);; + | n -> failwith ("invalid colors number : " ^ string_of_int n) +;; (* #define BI_RGB 0L @@ -134,7 +138,8 @@ let read_compression ic = match read_dword ic with | 0 -> BI_RGB | 1 -> BI_RLE8 | 2 -> BI_RLE4 - | n -> failwith ("invalid compression mode : " ^ string_of_int n);; + | n -> failwith ("invalid compression mode : " ^ string_of_int n) +;; (* Entries of color maps stored on disk have the following format @@ -147,11 +152,11 @@ The RGBQUAD structure contains the following fields: -Field Description -rgbBlue Specifies the intensity of blue in the color. -rgbGreen Specifies the intensity of green in the color. -rgbRed Specifies the intensity of red in the color. -rgbReserved Is not used and must be set to zero. +Field Description +rgbBlue Specifies the intensity of blue in the color. +rgbGreen Specifies the intensity of green in the color. +rgbRed Specifies the intensity of red in the color. +rgbReserved Is not used and must be set to zero. When loading a bmp we simply skip the rgbReserved field. *) let load_rgbquad ic = @@ -159,7 +164,8 @@ let g = read_byte ic in let r = read_byte ic in let _u = read_byte ic in - { b = b; g = g; r = r };; + { b = b; g = g; r = r; } +;; let load_bitmapfileheader ic = let bfType = read_word ic in @@ -170,7 +176,8 @@ let bfOffBits = read_dword ic in { bfType = bfType; bfSize = bfSize; bfReserved1 = bfReserved1; bfReserved2 = bfReserved2; bfOffBits = bfOffBits; - };; + } +;; let load_bitmapinfoheader ic = (* Found a tagBITMAPINFO *) @@ -191,9 +198,10 @@ biCompression = biCompression; biSizeImage = biSizeImage; biXPelsPerMeter = biXPelsPerMeter; biYPelsPerMeter = biYPelsPerMeter; biClrUsed = biClrUsed; biClrImportant = biClrImportant; - };; + } +;; -let load_colors bfh bih ic = +let load_colors bfh _bih ic = (* Reading RGBQUADs *) (* If biClrUsed = 0 then the whole color range is used, else only *) (* the amount given by biClrUsed is effectively used in the bmp. *) @@ -208,7 +216,8 @@ (* In fact, some savers store the whole colormap, instead of *) (* the number of entries given by biClrUsed... *) (bfh.bfOffBits - 54) / 4 in - Array.init cmaplength (fun i -> load_rgbquad ic);; + Array.init cmaplength (fun _i -> load_rgbquad ic) +;; (* Loads image data when image has 8 bit depth *) let load_image8data bih ic = @@ -321,7 +330,7 @@ let c = ref 0 in for i = bih.biHeight - 1 downto 0 do - let bitmapindex = ref (i * bih.biWidth) in + let bitmapindex = ref (i * bih.biWidth) in let nyblenum = ref 0 in for j = 0 to pad -1 do if !nyblenum land 1 = 0 then @@ -351,7 +360,7 @@ (* Escape codes *) begin match read_byte ic with - | 0 -> + | 0 -> (* End of line *) x := 0; incr y; @@ -425,10 +434,11 @@ ;; let skip_to ic n = - while !bytes_read <> n do skip_byte ic done;; + while !bytes_read <> n do skip_byte ic done +;; -let check_header filename = - let ic = open_in_bin filename in +let check_header fname = + let ic = open_in_bin fname in bytes_read := 0; try let _bfh = load_bitmapfileheader ic in @@ -436,41 +446,48 @@ close_in ic; { header_width = bih.biWidth; header_height = bih.biHeight; - header_infos = [] } + header_infos = []; } with | _ -> close_in ic; raise Wrong_file_type ;; -let load_bmp filename = - let ic = open_in_bin filename in +let read_bmp ic = bytes_read := 0; let bfh = load_bitmapfileheader ic in let bih = load_bitmapinfoheader ic in let colormap = load_colors bfh bih ic in skip_to ic bfh.bfOffBits; let bitmap = load_imagedata bih ic in - close_in ic; { bmpFileHeader = bfh; bmpInfoHeader = bih; bmpRgbQuad = colormap; - bmpBytes = bitmap };; + bmpBytes = bitmap; } +;; + +let read_bmp_file fname = + let ic = open_in_bin fname in + let bmp = read_bmp ic in + close_in ic; + bmp +;; let image_of_bmp = function - { bmpFileHeader = bfh; + { bmpFileHeader = _bfh; bmpInfoHeader = bih; bmpRgbQuad = colormap; - bmpBytes = bitmap } -> + bmpBytes = bitmap; } -> match bih.biBitCount with | ColorM -> Rgb24 (Rgb24.create_with bih.biWidth bih.biHeight [] bitmap) | _ -> - Index8 (Index8.create_with bih.biWidth bih.biHeight [] - {map= colormap; max= 256} (-1) bitmap) + Index8 + (Index8.create_with bih.biWidth bih.biHeight [] + { map = colormap; max = 256; } (-1) bitmap) ;; -let load filename opts = image_of_bmp (load_bmp filename);; +let load fname _opts = image_of_bmp (read_bmp_file fname);; (* =================================================================== *) (* ============= Writting images as bmp files. ======================= *) @@ -491,7 +508,8 @@ let write_word oc w = output_word oc w; - bytes_written := !bytes_written + 2;; + bytes_written := !bytes_written + 2 +;; let output_dword oc dw = (* little-endian form *) @@ -502,11 +520,13 @@ output_byte oc b0; output_byte oc b1; output_byte oc b2; - output_byte oc b3;; + output_byte oc b3 +;; let write_dword oc dw = output_dword oc dw; - bytes_written := !bytes_written + 4;; + bytes_written := !bytes_written + 4 +;; let write_bit_count oc bc = let byte = match bc with @@ -517,7 +537,8 @@ let write_compression oc c = let dword = match c with | BI_RGB -> 0 | BI_RLE8 -> 1 | BI_RLE4 -> 2 in - write_dword oc dword;; + write_dword oc dword +;; let write_rgbquad oc rgb = let b = rgb.b in @@ -527,7 +548,8 @@ write_byte oc b; write_byte oc g; write_byte oc r; - write_byte oc u;; + write_byte oc u; +;; let write_bmpFileHeader oc = function { (* WORD *) bfType = bft; @@ -545,7 +567,8 @@ let bfOffBits_index = !bytes_written in write_dword oc bfob; let end_bmpFileHeader = !bytes_written in - start_index, bfSize_index, bfOffBits_index, end_bmpFileHeader;; + start_index, bfSize_index, bfOffBits_index, end_bmpFileHeader +;; let write_bmpInfoHeader oc = function { (* DWORD *) biSize = bis; @@ -574,13 +597,15 @@ write_dword oc bicu; write_dword oc bici; let end_bmpInfoHeader = !bytes_written in - biSize_index, biSizeImage_index, end_bmpInfoHeader;; + biSize_index, biSizeImage_index, end_bmpInfoHeader +;; let write_colors oc color_map = (* If color_map is empty, should output a NULL character *) if Array.length color_map = 0 then write_byte oc 0 (* Otherwise write the rgb colors of the colormap *) - else Array.iter (write_rgbquad oc) color_map;; + else Array.iter (write_rgbquad oc) color_map +;; (* To denote the end of a scan line *) let write_end_of_scan_line oc = write_byte oc 0; write_byte oc 0;; @@ -599,17 +624,19 @@ write_byte oc c end else begin write_rle_code oc 255 c; - write_rle_code oc (n - 255) c end;; + write_rle_code oc (n - 255) c end +;; let write_rle oc n char = write_rle_code oc n (Char.code char);; (* In biRLE4 encoded mode the color byte is interpreted as two 4 bits colors to alternatively write even and odd pixels. - Color is a char with 4 significant bytes. + Color is a char with 4 significant bytes. We duplicate them to get 2 identical colors, for run-length encoding. *) let write_rle4 oc n char = let code = Char.code char in - write_rle_code oc n (code lsl 4 + code);; + write_rle_code oc n (code lsl 4 + code) +;; (* (4 - (n mod 4)) mod 4 *) let pad_bytes n = (4 - (n mod 4)) land 0x03;; @@ -646,7 +673,8 @@ write_pad oc extra_padding_bytes; done; let end_bitmap_index = !bytes_written in - start_bitmap_index, end_bitmap_index;; + start_bitmap_index, end_bitmap_index +;; let write_image24data bmp oc = let bih = bmp.bmpInfoHeader in @@ -677,7 +705,8 @@ write_pad oc extra_padding_bytes; done; let end_bitmap_index = !bytes_written in - start_bitmap_index, end_bitmap_index;; + start_bitmap_index, end_bitmap_index +;; let write_image4data bmp oc = let bih = bmp.bmpInfoHeader in @@ -814,13 +843,14 @@ | Monochrome -> write_image1data bmp oc | Color16 -> write_image4data bmp oc | Color256 -> write_image8data bmp oc - | ColorM -> write_image24data bmp oc;; + | ColorM -> write_image24data bmp oc +;; let bmp_of_image img = match img with - | Rgb24 bitmap -> - let biW = bitmap.Rgb24.width - and biH = bitmap.Rgb24.height + | Rgb24 bitmap -> + let biW = bitmap.Rgb24.width + and biH = bitmap.Rgb24.height and data = Rgb24.dump bitmap in let bfh = { (* WORD *) bfType = 19778 (* BM *); @@ -861,8 +891,8 @@ | Index8 bitmap -> let colormap = bitmap.Index8.colormap.map and biW = bitmap.Index8.width - and biH = bitmap.Index8.height - and data = Index8.dump bitmap in + and biH = bitmap.Index8.height + and data = Index8.dump bitmap in let bfh = { (* WORD *) bfType = 19778 (* BM *); (* DWORD *) bfSize = -1 (* Unknown to be updated *); @@ -870,7 +900,7 @@ (* WORD *) bfReserved2 = 0; (* DWORD *) bfOffBits = -1 (* Unknown to be updated *) } in - let biBitCount,biClrUsed,biCompression,biClrImportant = + let biBitCount,biClrUsed,biCompression,biClrImportant = let col_map_len = Array.length colormap in match col_map_len with | n when n <= 2 -> Monochrome, 2, BI_RGB, 2 @@ -878,7 +908,7 @@ | n when n <= 16 -> Color16, col_map_len, BI_RLE4, 0 | 256 -> Color256, col_map_len, BI_RGB, 0 | n when n <= 256 -> Color256, col_map_len, BI_RLE8, 0 - | n -> failwith "Too many colors for a bitmap with 8 bits per pixel" in + | _n -> failwith "Too many colors for a bitmap with 8 bits per pixel" in let bih = { biSize = -1; biWidth = biW; biHeight = biH; biPlanes = 1; biBitCount = biBitCount; @@ -892,12 +922,11 @@ bmpBytes = data; } | _ -> raise Wrong_image_type;; -let save_bmp filename = function +let write_bmp oc = function { bmpFileHeader = bmpFileHeader; bmpInfoHeader = bmpInfoHeader; bmpRgbQuad = colormap; - bmpBytes = bitmap } as bmp -> - let oc = open_out_bin filename in + bmpBytes = _bitmap } as bmp -> bytes_written := 0; let start_index, bfSize_index, bfOffBits_index, end_bmpFileHeader = write_bmpFileHeader oc bmpFileHeader in @@ -911,30 +940,44 @@ write_image_data oc bmp in (* Correcting sizes: bfSize, bfOffBits, biSize, bisizeImage *) - let bfSize = (* Given in bytes! not DWORDs *) (!bytes_written - start_index) in + let bfSize = (* Given in bytes! not in DWORDs *) + !bytes_written - start_index in seek_out oc bfSize_index; output_dword oc bfSize; - let bfOffBits = (* Given in bytes *) start_bitmap_index - start_index in + let bfOffBits = (* Given in bytes *) + start_bitmap_index - start_index in seek_out oc bfOffBits_index; output_dword oc bfOffBits; - - let biSize = (* Given in bytes *) end_bmpInfoHeader - start_bmpInfoHeader in + + let biSize = (* Given in bytes *) + end_bmpInfoHeader - start_bmpInfoHeader in seek_out oc biSize_index; output_dword oc biSize; - let biSizeImage = (* Given in bytes *) end_bitmap_index - start_bitmap_index in + let biSizeImage = (* Given in bytes *) + end_bitmap_index - start_bitmap_index in seek_out oc biSizeImage_index; output_dword oc biSizeImage; +;; - close_out oc;; +let write_bmp_file fname bmp = + let oc = open_out_bin fname in + write_bmp oc bmp; + close_out oc; +;; -let save filename opts img = save_bmp filename (bmp_of_image img);; +let save fname _opts img = write_bmp_file fname (bmp_of_image img);; add_methods Bmp - { check_header = check_header; + { check_header = check_header; load = Some load; save = Some save; load_sequence = None; save_sequence = None; - };; + } +;; + +let save_bmp = write_bmp_file +and load_bmp = read_bmp_file +;; diff -Nru camlimages-3.0.1/src/bmp.mli camlimages-4.0.1/src/bmp.mli --- camlimages-3.0.1/src/bmp.mli 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/bmp.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: bmp.mli,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: bmp.mli,v 1.2 2009/02/08 14:27:00 weis Exp $ *) val check_header : string -> Images.header;; (** Checks the file header *) @@ -81,31 +81,31 @@ and bibitcount = | Monochrome - (** 1 The bitmap is monochrome, and the bmiColors field must - contain two entries. Each bit in the bitmap array represents a + (** 1 The bitmap is monochrome, and the bmiColors field must + contain two entries. Each bit in the bitmap array represents a pixel. If the bit is clear, the pixel is displayed with the color of the first entry in the bmiColors table; if the bit is set, the pixel has the color of the second entry in the table. *) | Color16 - (** 4 The bitmap has a maximum of 16 colors, and the bmiColors - field contains up to 16 entries. Each pixel in the bitmap is + (** 4 The bitmap has a maximum of 16 colors, and the bmiColors + field contains up to 16 entries. Each pixel in the bitmap is represented by a four-bit index into the color table. - For example, if the first byte in the bitmap is 0x1F, then the - byte represents two pixels. The first pixel contains the color - in the second table entry, and the second pixel contains the + For example, if the first byte in the bitmap is 0x1F, then the + byte represents two pixels. The first pixel contains the color + in the second table entry, and the second pixel contains the color in the 16th table entry. *) | Color256 - (** 8 The bitmap has a maximum of 256 colors, and the bmiColors - field contains up to 256 entries. In this case, each byte in the + (** 8 The bitmap has a maximum of 256 colors, and the bmiColors + field contains up to 256 entries. In this case, each byte in the array represents a single pixel. *) | ColorM - (** 24 The bitmap has a maximum of 2^24 colors. The bmiColors - field is NULL, and each three bytes in the bitmap array - represents the relative intensities of red, green, and blue, + (** 24 The bitmap has a maximum of 2^24 colors. The bmiColors + field is NULL, and each three bytes in the bitmap array + represents the relative intensities of red, green, and blue, respectively, of a pixel. *) ;; val load_bmp : string -> bmp;; val save_bmp : string -> bmp -> unit;; - (** Load and save fnctions for BMP images. *) + (** Load and save functions for BMP images. *) diff -Nru camlimages-3.0.1/src/camlimages.ml.in camlimages-4.0.1/src/camlimages.ml.in --- camlimages-3.0.1/src/camlimages.ml.in 2006-12-15 18:49:49.000000000 +0200 +++ camlimages-4.0.1/src/camlimages.ml.in 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: camlimages.ml.in,v 1.3 2006/12/15 16:49:49 rousse Exp $ *) +(* $Id: camlimages.ml.in,v 1.3.2.1 2010/05/13 13:14:47 furuse Exp $ *) let version = "@VERSION@";; @@ -27,7 +27,7 @@ (* External files *) let path_rgb_txt = "@PATH_RGB_TXT@";; -let path_gs = "@GS@";; +let path_gs = "@PATH_GS@";; (* They are written in ML, so always supported *) let lib_ppm = true;; diff -Nru camlimages-3.0.1/src/cmyk32.ml camlimages-4.0.1/src/cmyk32.ml --- camlimages-3.0.1/src/cmyk32.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/cmyk32.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: cmyk32.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: cmyk32.ml,v 1.4 2009/07/04 03:39:28 furuse Exp $*) (* CMYK 32 bit depth image format *) @@ -71,6 +71,12 @@ rawimage = RI.create_with width height data; infos = infos; };; +let create_with_scanlines width height infos data = + { width = width; + height = height; + rawimage = RI.create_with_scanlines width height data; + infos = infos; };; + let rawimage = C.rawimage;; let create = IMAGE.create;; let make = IMAGE.make;; @@ -89,7 +95,9 @@ let sub = IMAGE.sub;; let blit = IMAGE.blit;; let map = IMAGE.map;; - +let blocks = IMAGE.blocks;; +let dump_block = IMAGE.dump_block;; + open Color;; (* image resize with smoothing *) diff -Nru camlimages-3.0.1/src/cmyk32.mli camlimages-4.0.1/src/cmyk32.mli --- camlimages-3.0.1/src/cmyk32.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/cmyk32.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: cmyk32.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: cmyk32.mli,v 1.4 2009/07/04 03:39:28 furuse Exp $*) (* CMYK 32 bit depth image format *) @@ -45,7 +45,10 @@ val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit;; val map : (elt -> elt -> elt) -> t -> int -> int -> t -> int -> int -> int -> int -> unit;; +val blocks : t -> int * int +val dump_block : t -> int -> int -> Bitmap.Block.t val create_with : int -> int -> Info.info list -> string -> t;; +val create_with_scanlines : int -> int -> Info.info list -> string array -> t;; val create : int -> int -> t;; val make : int -> int -> elt -> t;; val copy : t -> t;; diff -Nru camlimages-3.0.1/src/colorhist.mli camlimages-4.0.1/src/colorhist.mli --- camlimages-3.0.1/src/colorhist.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/colorhist.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,14 @@ +type t = int array +val create : unit -> int array +val total_samples : int array -> int +val store_sample : int array -> Color.rgb -> unit +val normalize : float -> int array -> Color.rgb -> Color.rgb +val gamma : + float -> + < height : int; unsafe_get : int -> int -> Color.rgb; width : int; .. > -> + OImages.rgb24 +val filter : + ('a -> int array -> Color.rgb -> Color.rgb) -> + 'a -> + < height : int; unsafe_get : int -> int -> Color.rgb; width : int; .. > -> + OImages.rgb24 diff -Nru camlimages-3.0.1/src/color.ml camlimages-4.0.1/src/color.ml --- camlimages-3.0.1/src/color.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/color.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: color.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: color.ml,v 1.1.2.1 2010/05/16 01:45:54 furuse Exp $*) exception Too_many_colors;; @@ -220,6 +220,7 @@ let color_name_table = ref None;; +(* CR jfuruse: path_rgb_txt may not exist *) let color_table_load () = let ic = open_in Camlimages.path_rgb_txt in let table = Hashtbl.create 107 in diff -Nru camlimages-3.0.1/src/.cvsignore camlimages-4.0.1/src/.cvsignore --- camlimages-3.0.1/src/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,6 @@ +Makefile +Makefile.in +*.spot +*.spit +camlimages.ml +META diff -Nru camlimages-3.0.1/src/ftintf_na.c camlimages-4.0.1/src/ftintf_na.c --- camlimages-3.0.1/src/ftintf_na.c 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/ftintf_na.c 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,41 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt */ +/* Pierre Weis, projet Cristal, INRIA Rocquencourt */ +/* Jun Furuse, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1999,2000 */ +/* Institut National de Recherche en Informatique et en Automatique. */ +/* Distributed only by permission. */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include + +value init_FreeType(){ failwith("unsupported"); } +value done_FreeType(){ failwith("unsupported"); } +value new_Face(){ failwith("unsupported"); } +value face_info(){ failwith("unsupported"); } +value done_Face(){ failwith("unsupported"); } +value get_num_glyphs(){ failwith("unsupported"); } +value set_Char_Size(){ failwith("unsupported"); } +value set_Pixel_Sizes(){ failwith("unsupported"); } +value val_CharMap(){ failwith("unsupported"); } +value get_CharMaps(){ failwith("unsupported"); } +value set_CharMap(){ failwith("unsupported"); } +value get_Char_Index(){ failwith("unsupported"); } +value load_Glyph(){ failwith("unsupported"); } +value load_Char(){ failwith("unsupported"); } +value render_Glyph_of_Face(){ failwith("unsupported"); } +value render_Char(){ failwith("unsupported"); } +value set_Transform(){ failwith("unsupported"); } +value get_Bitmap_Info(){ failwith("unsupported"); } +value read_Bitmap(){ failwith("unsupported"); } +value get_Glyph_Metrics(){ failwith("unsupported"); } +value get_Size_Metrics(){ failwith("unsupported"); } +value get_Outline_Contents(){ failwith("unsupported"); } diff -Nru camlimages-3.0.1/src/ftlow.ml camlimages-4.0.1/src/ftlow.ml --- camlimages-3.0.1/src/ftlow.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/ftlow.ml 2011-06-22 20:04:32.000000000 +0200 @@ -16,10 +16,6 @@ type library -external init : unit -> library = "init_FreeType";; - -external close : library -> unit = "done_FreeType";; - type face;; type face_info = { @@ -39,24 +35,8 @@ has_multiple_masters : bool; };; -external new_face : library -> string -> int -> face = "new_Face";; -external face_info : face -> face_info = "face_info";; -external done_face : face -> unit = "done_Face";; - -external get_num_glyphs : face -> int = "get_num_glyphs";; - -external set_char_size : - face -> int -> int -> int -> int -> unit = "set_Char_Size";; - -external set_pixel_sizes : face -> int -> int -> unit = "set_Pixel_Sizes";; - type charmap = { platform_id : int; encoding_id : int; };; -external get_charmaps : face -> charmap list = "get_CharMaps";; -external set_charmap : face -> charmap -> unit = "set_CharMap";; - -external get_char_index : face -> int -> int = "get_Char_Index";; - type render_mode = | Render_Normal (* default *) | Render_Mono;; @@ -67,37 +47,6 @@ type flags = int;; -let encode_flags flags = - let int_of_flag = function - | Load_no_scale -> 1 - | Load_no_hinting -> 2 in - List.fold_left (fun v f -> v lor int_of_flag f) 0 flags;; - -external load_glyph_raw : face -> int -> flags -> int * int = "load_Glyph";; - -let load_glyph face code flags = load_glyph_raw face code (encode_flags flags);; - -external load_char_raw : face -> int -> flags -> int * int = "load_Char";; - -let load_char face code flags = load_char_raw face code (encode_flags flags);; - -external render_glyph_of_face : - face -> render_mode -> unit = "render_Glyph_of_Face";; - -external render_char_raw : - face -> int -> flags -> render_mode -> int * int = "render_Char";; - -let render_glyph face idx flags render_mode = - let adv = load_glyph face idx flags in - render_glyph_of_face face render_mode; - adv;; - -let render_char face code flags render_mode = - render_char_raw face code (encode_flags flags) render_mode;; - -external set_transform : - face -> (int * int * int * int) -> (int * int) -> unit = "set_Transform";; - type bitmap_info = { bitmap_left : int; bitmap_top : int; @@ -105,10 +54,6 @@ bitmap_height : int; };; -external get_bitmap_info : face -> bitmap_info = "get_Bitmap_Info";; - -external read_bitmap : face -> int -> int -> int = "read_Bitmap";; - (* glyph metrics *) type bbox = { xmin : int; (* 26.6 *) @@ -130,8 +75,6 @@ gm_vert : bearing_advance; };; -external get_glyph_metrics : face -> glyph_metrics = "get_Glyph_Metrics";; - (* size metrics *) type size_metrics = { x_ppem : int; @@ -140,8 +83,6 @@ y_scale : int; (* 16.16 *) };; -external get_size_metrics : face -> size_metrics = "get_Size_Metrics";; - (* outline info *) type outline_tag = On_point | Off_point_conic | Off_point_cubic;; @@ -153,5 +94,52 @@ contours : int array; };; -external get_outline_contents : - face -> outline_contents = "get_Outline_Contents";; +module C = struct + external init : unit -> library = "init_FreeType";; + external close : library -> unit = "done_FreeType";; + external new_face : library -> string -> int -> face = "new_Face";; + external face_info : face -> face_info = "face_info";; + external done_face : face -> unit = "done_Face";; + external get_num_glyphs : face -> int = "get_num_glyphs";; + external set_char_size : + face -> int -> int -> int -> int -> unit = "set_Char_Size";; + external set_pixel_sizes : face -> int -> int -> unit = "set_Pixel_Sizes";; + external get_charmaps : face -> charmap list = "get_CharMaps";; + external set_charmap : face -> charmap -> unit = "set_CharMap";; + external get_char_index : face -> int -> int = "get_Char_Index";; + external load_glyph_raw : face -> int -> flags -> int * int = "load_Glyph";; + external load_char_raw : face -> int -> flags -> int * int = "load_Char";; + external render_glyph_of_face : + face -> render_mode -> unit = "render_Glyph_of_Face";; + external render_char_raw : + face -> int -> flags -> render_mode -> int * int = "render_Char";; + external set_transform : + face -> (int * int * int * int) -> (int * int) -> unit = "set_Transform";; + external get_bitmap_info : face -> bitmap_info = "get_Bitmap_Info";; + external read_bitmap : face -> int -> int -> int = "read_Bitmap";; + external get_glyph_metrics : face -> glyph_metrics = "get_Glyph_Metrics";; + external get_size_metrics : face -> size_metrics = "get_Size_Metrics";; + external get_outline_contents : + face -> outline_contents = "get_Outline_Contents";; +end + +include C + +let encode_flags flags = + let int_of_flag = function + | Load_no_scale -> 1 + | Load_no_hinting -> 2 in + List.fold_left (fun v f -> v lor int_of_flag f) 0 flags;; + +let load_glyph face code flags = load_glyph_raw face code (encode_flags flags);; + +let load_char face code flags = load_char_raw face code (encode_flags flags);; + +let render_glyph face idx flags render_mode = + let adv = load_glyph face idx flags in + render_glyph_of_face face render_mode; + adv;; + +let render_char face code flags render_mode = + render_char_raw face code (encode_flags flags) render_mode;; + diff -Nru camlimages-3.0.1/src/ftlow.mli camlimages-4.0.1/src/ftlow.mli --- camlimages-3.0.1/src/ftlow.mli 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/ftlow.mli 2011-06-22 20:04:32.000000000 +0200 @@ -19,10 +19,10 @@ type library;; -val init : unit -> library;; -val close : library -> unit;; +val init : unit -> library +val close : library -> unit -type face;; +type face type face_info = { num_faces : int; @@ -39,54 +39,54 @@ has_fast_glyphs : bool; has_glyph_names : bool; has_multiple_masters : bool; - };; + } -val new_face : library -> string -> int -> face;; -val face_info : face -> face_info;; -val done_face : face -> unit;; +val new_face : library -> string -> int -> face +val face_info : face -> face_info +val done_face : face -> unit -val get_num_glyphs : face -> int;; +val get_num_glyphs : face -> int -val set_char_size : face -> int -> int -> int -> int -> unit;; +val set_char_size : face -> int -> int -> int -> int -> unit -val set_pixel_sizes : face -> int -> int -> unit;; +val set_pixel_sizes : face -> int -> int -> unit -type charmap = { platform_id : int; encoding_id : int; };; -val get_charmaps : face -> charmap list;; -val set_charmap : face -> charmap -> unit;; +type charmap = { platform_id : int; encoding_id : int; } +val get_charmaps : face -> charmap list +val set_charmap : face -> charmap -> unit -val get_char_index : face -> int -> int;; +val get_char_index : face -> int -> int type render_mode = | Render_Normal (** default *) - | Render_Mono;; + | Render_Mono type load_flag = | Load_no_scale - | Load_no_hinting;; + | Load_no_hinting -val load_glyph : face -> int -> load_flag list -> int * int;; +val load_glyph : face -> int -> load_flag list -> int * int -val load_char : face -> int -> load_flag list -> int * int;; +val load_char : face -> int -> load_flag list -> int * int -val render_glyph_of_face : face -> render_mode -> unit;; +val render_glyph_of_face : face -> render_mode -> unit -val render_glyph : face -> int -> load_flag list -> render_mode -> int * int;; +val render_glyph : face -> int -> load_flag list -> render_mode -> int * int -val render_char : face -> int -> load_flag list -> render_mode -> int * int;; +val render_char : face -> int -> load_flag list -> render_mode -> int * int -val set_transform : face -> (int * int * int * int) -> (int * int) -> unit;; +val set_transform : face -> (int * int * int * int) -> (int * int) -> unit type bitmap_info = { bitmap_left : int; bitmap_top : int; bitmap_width : int; bitmap_height : int; - };; + } -val get_bitmap_info : face -> bitmap_info;; +val get_bitmap_info : face -> bitmap_info -val read_bitmap : face -> int -> int -> int;; +val read_bitmap : face -> int -> int -> int (** glyph metrics *) type bbox = { @@ -94,22 +94,22 @@ ymin : int; (** 26.6 *) xmax : int; (** 26.6 *) ymax : int; (** 26.6 *) - };; + } type bearing_advance = { bearingx : int; (** 26.6 *) bearingy : int; (** 26.6 *) advance : int; (** 26.6 *) - };; + } type glyph_metrics = { gm_width : int (** 26.6 *); gm_height : int (** 26.6 *); gm_hori : bearing_advance; gm_vert : bearing_advance; - };; + } -val get_glyph_metrics : face -> glyph_metrics;; +val get_glyph_metrics : face -> glyph_metrics (** size metrics *) type size_metrics = { @@ -117,12 +117,12 @@ y_ppem : int; x_scale : int; (** 16.16 *) y_scale : int; (** 16.16 *) - };; + } -val get_size_metrics : face -> size_metrics;; +val get_size_metrics : face -> size_metrics (** outline info *) -type outline_tag = On_point | Off_point_conic | Off_point_cubic;; +type outline_tag = On_point | Off_point_conic | Off_point_cubic type outline_contents = { n_contours : int; @@ -130,6 +130,6 @@ points : (int * int) array; tags : outline_tag array; contours : int array; - };; + } -val get_outline_contents : face -> outline_contents;; +val get_outline_contents : face -> outline_contents diff -Nru camlimages-3.0.1/src/fttext.ml camlimages-4.0.1/src/fttext.ml --- camlimages-3.0.1/src/fttext.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/fttext.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: fttext.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: fttext.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) open Images;; open Freetype;; @@ -23,7 +23,7 @@ g = if org.g > level then level else org.g; b = if org.b > level then level else org.b };; -let func_red_only org level = { r = 255; g = 0; b = 0 };; +let func_red_only _org _level = { r = 255; g = 0; b = 0 };; let unicode_of_latin s = let ary = Array.create (String.length s) 0 in diff -Nru camlimages-3.0.1/src/genimage.ml camlimages-4.0.1/src/genimage.ml --- camlimages-3.0.1/src/genimage.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/genimage.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,53 +12,11 @@ (* *) (***********************************************************************) -(* $Id: genimage.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: genimage.ml,v 1.6 2009/07/04 03:39:28 furuse Exp $ *) open Color;; open Bitmap;; - -module type ENCODE = sig - type t - val bytes_per_pixel : int - val get : string -> int -> t - val set : string -> int -> t -> unit - val make : t -> string -end;; - -module type RAWIMAGE = sig - module Encode : ENCODE - type elt - type bitmap - - type t = { - width: int; - height: int; - bitmap: bitmap; - } - - val width : t -> int - val height : t -> int - val dump : t -> string - - val create_with : int -> int -> string -> t - val create : int -> int -> t - val make : int -> int -> elt -> t - val unsafe_access : t -> int -> int -> string * int - val get_strip : t -> int -> int -> int -> string - val set_strip : t -> int -> int -> int -> string -> unit - val get_scanline : t -> int -> string - val set_scanline : t -> int -> string -> unit - val unsafe_get : t -> int -> int -> elt - val unsafe_set : t -> int -> int -> elt -> unit - val get : t -> int -> int -> elt - val set : t -> int -> int -> elt -> unit - val destroy : t -> unit - val copy : t -> t - val sub : t -> int -> int -> int -> int -> t - val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit - val map : (elt -> elt -> elt) -> - t -> int -> int -> t -> int -> int -> int -> int -> unit -end;; +open Image_intf module MakeRawImage(E:ENCODE) = struct module Bitmap= Bitmap.Make(E) @@ -84,6 +42,13 @@ } ;; + let create_with_scanlines width height init_scanlines = + { width= width; + height= height; + bitmap= Bitmap.create_with_scanlines width height init_scanlines; + } + ;; + let create width height = { width= width; height= height; @@ -102,6 +67,7 @@ let get_strip t = Bitmap.get_strip t.bitmap let set_strip t = Bitmap.set_strip t.bitmap let get_scanline t = Bitmap.get_scanline t.bitmap + let get_scanline_ptr t = Bitmap.get_scanline_ptr t.bitmap let set_scanline t = Bitmap.set_scanline t.bitmap let unsafe_get t x y = @@ -150,81 +116,9 @@ unsafe_set dst dx' dy' (f s d) done done -end;; -module type CONTAINER = sig - type container - type rawimage - val rawimage : container -> rawimage - val create_default : int -> int -> rawimage -> container - val create_duplicate : container -> int -> int -> rawimage -> container -end;; - -module type IMAGE = sig - type t - type elt - - (* Image creation *) - - val create : int -> int -> t - (* [create w h] creates an image with a size [w]x[h]. The content is - the image is not initialized. *) - - val make : int -> int -> elt -> t - (* [make w h c] creates an image with a size [w]x[h]. The content is - the image is initialized to the color [c]. *) - - val destroy : t -> unit - (* [destroy t] explicitly frees the image content of [t]. - If you do not use bitmap swap files, you do not need to call - this function, since GC will free unreachable image data automatically. - Read bitmap.mli for more details. *) - - (* Pixel access *) - - val get : t -> int -> int -> elt - (* [get t x y] gets image pixel of [t] at [x],[y]. If [x],[y] is - outside of the image size, Images.Out_of_image exception is raised. *) - - val set : t -> int -> int -> elt -> unit - (* [set t x y c] sets image pixel of [t] at [x],[y] by the color [c]. - If [x],[y] is outside of the image size, Images.Out_of_image exception - is raised. *) - - val unsafe_get : t -> int -> int -> elt - val unsafe_set : t -> int -> int -> elt -> unit - (* Unsafe versions of [get] and [set]. It does not perform any image - boundary check. If the coordinates are out of the given image, - the result is undefined. Use carefully. *) - - (* Image copy *) - - val copy : t -> t - (* [copy t] duplicates the image [t]. *) - - val sub : t -> int -> int -> int -> int -> t - (* [sub t x y w h] duplicates a subimage of [t] of size [w]x[h], - whose origin (0,0) is at (x,y) of [t]. *) - - val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit - (* [blit src x y dst x' y' w h] copies rectangular area of [src] at - [x],[y] with size [w]x[h], to an image [dst]. The origin of - the subimage comes at [x'],[y'] of [dst]. *) - - val map : (elt -> elt -> elt) -> - t -> int -> int -> t -> int -> int -> int -> int -> unit - (* [map f src x y dst x' y' w h] maps pixels of the rectangular area - of [src] at [x],[y] with size [w]x[h], to an image [dst], - using color conversion function [f]. The origin of the subimage - comes at [x'],[y'] of [dst]. *) - - (* functions for internal use *) - val dump : t -> string - val unsafe_access : t -> int -> int -> string * int - val get_strip : t -> int -> int -> int -> string - val set_strip : t -> int -> int -> int -> string -> unit - val get_scanline : t -> int -> string - val set_scanline : t -> int -> string -> unit + let blocks img = Bitmap.blocks img.bitmap + let dump_block img = Bitmap.dump_block img.bitmap end;; module Make(RI:RAWIMAGE)(CON:CONTAINER with type rawimage = RI.t) = struct @@ -243,6 +137,7 @@ let get_strip t = RI.get_strip (CON.rawimage t) let set_strip t = RI.set_strip (CON.rawimage t) let get_scanline t = RI.get_scanline (CON.rawimage t) + let get_scanline_ptr t = RI.get_scanline_ptr (CON.rawimage t) let set_scanline t = RI.set_scanline (CON.rawimage t) let unsafe_get t = RI.unsafe_get (CON.rawimage t) @@ -260,89 +155,9 @@ RI.blit (CON.rawimage src) sx sy (CON.rawimage dst) dx dy w h let map f src sx sy dst dx dy w h = RI.map f (CON.rawimage src) sx sy (CON.rawimage dst) dx dy w h -end;; - -module type CONTAINER_INDEXED = sig - type container - type rawimage - type mapelt - val rawimage : container -> rawimage - val create_default : int -> int -> rawimage -> container - val create_duplicate : container -> int -> int -> rawimage -> container - val colormap : container -> mapelt Color.map -end;; -module type IMAGEINDEXED = sig - type t - type elt - type mapelt - - (* Image creation *) - - val create : int -> int -> t - (* [create w h] creates an image with a size [w]x[h]. The content is - the image is not initialized. *) - - val make : int -> int -> elt -> t - (* [make w h c] creates an image with a size [w]x[h]. The content is - the image is initialized to the color [c]. *) - - val destroy : t -> unit - (* [destroy t] explicitly frees the image content of [t]. - If you do not use bitmap swap files, you do not need to call - this function, since GC will free unreachable image data automatically. - Read bitmap.mli for more details. *) - - (* Pixel access *) - - val get : t -> int -> int -> elt - (* [get t x y] gets image pixel of [t] at [x],[y]. If [x],[y] is - outside of the image size, Images.Out_of_image exception is raised. *) - - val get_color : t -> int -> int -> mapelt - (* [get_color x y] returns image pixel color value of [t] at [x],[y]. - If [x],[y] is outside of the image size, Images.Out_of_image exception - is raised. *) - - val set : t -> int -> int -> elt -> unit - (* [set t x y c] sets image pixel of [t] at [x],[y] by the color [c]. - If [x],[y] is outside of the image size, Images.Out_of_image exception - is raised. *) - - val unsafe_get : t -> int -> int -> elt - val unsafe_get_color : t -> int -> int -> mapelt - val unsafe_set : t -> int -> int -> elt -> unit - (* Unsafe versions of [get] and [set]. It does not perform any image - boundary check. If the coordinates are out of the given image, - the result is undefined. Use carefully. *) - - (* Image copy *) - val copy : t -> t - (* [copy t] duplicates the image [t]. *) - - val sub : t -> int -> int -> int -> int -> t - (* [sub t x y w h] duplicates a subimage of [t] of size [w]x[h], - whose origin (0,0) is at (x,y) of [t]. *) - - val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit - (* [blit src x y dst x' y' w h] copies rectangular area of [src] at - [x],[y] with size [w]x[h], to an image [dst]. The origin of - the subimage comes at [x'],[y'] of [dst]. *) - - val map : (elt -> elt -> elt) -> - t -> int -> int -> t -> int -> int -> int -> int -> unit - (* [map f src x y dst x' y' w h] maps pixels of the rectangular area - of [src] at [x],[y] with size [w]x[h], to an image [dst], - using color conversion function [f]. The origin of the subimage - comes at [x'],[y'] of [dst]. *) - - (* functions for internal use *) - val dump : t -> string - val unsafe_access : t -> int -> int -> string * int - val get_strip : t -> int -> int -> int -> string - val set_strip : t -> int -> int -> int -> string -> unit - val get_scanline : t -> int -> string - val set_scanline : t -> int -> string -> unit + let blocks img = RI.blocks (CON.rawimage img) + let dump_block img = RI.dump_block (CON.rawimage img) end;; module MakeIndexed(RI:RAWIMAGE with type elt = int) diff -Nru camlimages-3.0.1/src/genimage.mli camlimages-4.0.1/src/genimage.mli --- camlimages-3.0.1/src/genimage.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/genimage.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,214 +12,18 @@ (* *) (***********************************************************************) -(* $Id: genimage.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: genimage.mli,v 1.6 2009/03/01 11:24:10 furuse Exp $ *) -(** color to string encoder/decoder module type *) -module type ENCODE = - sig - type t - val bytes_per_pixel : int - val get : string -> int -> t - val set : string -> int -> t -> unit - val make : t -> string - end;; +open Image_intf -(** low level image module type *) -module type RAWIMAGE = sig - module Encode : ENCODE - type elt - and bitmap - and t = { width : int; height : int; bitmap : bitmap; } - val width : t -> int - val height : t -> int - val dump : t -> string - val create_with : int -> int -> string -> t - val create : int -> int -> t - val make : int -> int -> elt -> t - val unsafe_access : t -> int -> int -> string * int - val get_strip : t -> int -> int -> int -> string - val set_strip : t -> int -> int -> int -> string -> unit - val get_scanline : t -> int -> string - val set_scanline : t -> int -> string -> unit - val unsafe_get : t -> int -> int -> elt - val unsafe_set : t -> int -> int -> elt -> unit - val get : t -> int -> int -> elt - val set : t -> int -> int -> elt -> unit - val destroy : t -> unit - val copy : t -> t - val sub : t -> int -> int -> int -> int -> t - val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit - val map : (elt -> elt -> elt) -> - t -> int -> int -> t -> int -> int -> int -> int -> unit -end;; - -(** low level image creater *) +(** Low level image creator *) module MakeRawImage : functor (E : ENCODE) -> (RAWIMAGE with type elt = E.t);; -(** low image container module type *) -module type CONTAINER = sig - type container - type rawimage - val rawimage : container -> rawimage - val create_default : int -> int -> rawimage -> container - val create_duplicate : container -> int -> int -> rawimage -> container -end;; - -module type IMAGE = sig - type t - type elt - - (** Image creation *) - - val create : int -> int -> t - (** [create w h] creates an image with a size [w]x[h]. The content is - the image is not initialized. *) - - val make : int -> int -> elt -> t - (** [make w h c] creates an image with a size [w]x[h]. The content is - the image is initialized to the color [c]. *) - - val destroy : t -> unit - (** [destroy t] explicitly frees the image content of [t]. - If you do not use bitmap swap files, you do not need to call - this function, since GC will free unreachable image data automatically. - Read bitmap.mli for more details. *) - - (** Pixel access *) - - val get : t -> int -> int -> elt - (** [get t x y] gets image pixel of [t] at [x],[y]. If [x],[y] is - outside of the image size, Images.Out_of_image exception is raised. *) - - val set : t -> int -> int -> elt -> unit - (** [set t x y c] sets image pixel of [t] at [x],[y] by the color [c]. - If [x],[y] is outside of the image size, Images.Out_of_image exception - is raised. *) - - val unsafe_get : t -> int -> int -> elt - val unsafe_set : t -> int -> int -> elt -> unit - (** Unsafe versions of [get] and [set]. It does not perform any image - boundary check. If the coordinates are out of the given image, - the result is undefined. Use carefully. *) - - (** Image copy *) - - val copy : t -> t - (** [copy t] duplicates the image [t]. *) - - val sub : t -> int -> int -> int -> int -> t - (** [sub t x y w h] duplicates a subimage of [t] of size [w]x[h], - whose origin (0,0) is at (x,y) of [t]. *) - - val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit - (** [blit src x y dst x' y' w h] copies rectangular area of [src] at - [x],[y] with size [w]x[h], to an image [dst]. The origin of - the subimage comes at [x'],[y'] of [dst]. *) - - val map : (elt -> elt -> elt) -> - t -> int -> int -> t -> int -> int -> int -> int -> unit - (** [map f src x y dst x' y' w h] maps pixels of the rectangular area - of [src] at [x],[y] with size [w]x[h], to an image [dst], - using color conversion function [f]. The origin of the subimage - comes at [x'],[y'] of [dst]. *) - - (** functions for internal use *) - val dump : t -> string - val unsafe_access : t -> int -> int -> string * int - val get_strip : t -> int -> int -> int -> string - val set_strip : t -> int -> int -> int -> string -> unit - val get_scanline : t -> int -> string - val set_scanline : t -> int -> string -> unit -end;; - module Make : functor (RI : RAWIMAGE) -> functor (CON : CONTAINER with type rawimage = RI.t) -> IMAGE with type t = CON.container and type elt = RI.elt;; -module type CONTAINER_INDEXED = sig - type container - type rawimage - type mapelt - val rawimage : container -> rawimage - val create_default : int -> int -> rawimage -> container - val create_duplicate : container -> int -> int -> rawimage -> container - val colormap : container -> mapelt Color.map -end;; - -module type IMAGEINDEXED = sig - type t - type elt - type mapelt - - (** Image creation *) - - val create : int -> int -> t - (** [create w h] creates an image with a size [w]x[h]. The content is - the image is not initialized. *) - - val make : int -> int -> elt -> t - (** [make w h c] creates an image with a size [w]x[h]. The content is - the image is initialized to the color [c]. *) - - val destroy : t -> unit - (** [destroy t] explicitly frees the image content of [t]. - If you do not use bitmap swap files, you do not need to call - this function, since GC will free unreachable image data automatically. - Read bitmap.mli for more details. *) - - (** Pixel access *) - - val get : t -> int -> int -> elt - (** [get t x y] gets image pixel of [t] at [x],[y]. If [x],[y] is - outside of the image size, Images.Out_of_image exception is raised. *) - - val get_color : t -> int -> int -> mapelt - (** [get_color x y] returns image pixel color value of [t] at [x],[y]. - If [x],[y] is outside of the image size, Images.Out_of_image exception - is raised. *) - - val set : t -> int -> int -> elt -> unit - (** [set t x y c] sets image pixel of [t] at [x],[y] by the color [c]. - If [x],[y] is outside of the image size, Images.Out_of_image exception - is raised. *) - - val unsafe_get : t -> int -> int -> elt - val unsafe_get_color : t -> int -> int -> mapelt - val unsafe_set : t -> int -> int -> elt -> unit - (** Unsafe versions of [get] and [set]. It does not perform any image - boundary check. If the coordinates are out of the given image, - the result is undefined. Use carefully. *) - - (** Image copy *) - val copy : t -> t - (** [copy t] duplicates the image [t]. *) - - val sub : t -> int -> int -> int -> int -> t - (** [sub t x y w h] duplicates a subimage of [t] of size [w]x[h], - whose origin (0,0) is at (x,y) of [t]. *) - - val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit - (** [blit src x y dst x' y' w h] copies rectangular area of [src] at - [x],[y] with size [w]x[h], to an image [dst]. The origin of - the subimage comes at [x'],[y'] of [dst]. *) - - val map : (elt -> elt -> elt) -> - t -> int -> int -> t -> int -> int -> int -> int -> unit - (** [map f src x y dst x' y' w h] maps pixels of the rectangular area - of [src] at [x],[y] with size [w]x[h], to an image [dst], - using color conversion function [f]. The origin of the subimage - comes at [x'],[y'] of [dst]. *) - - (** functions for internal use *) - val dump : t -> string - val unsafe_access : t -> int -> int -> string * int - val get_strip : t -> int -> int -> int -> string - val set_strip : t -> int -> int -> int -> string -> unit - val get_scanline : t -> int -> string - val set_scanline : t -> int -> string -> unit -end;; - module MakeIndexed(RI:RAWIMAGE with type elt = int) (CON:CONTAINER_INDEXED with type rawimage = RI.t) : IMAGEINDEXED with type t = CON.container diff -Nru camlimages-3.0.1/src/geometry.mli camlimages-4.0.1/src/geometry.mli --- camlimages-3.0.1/src/geometry.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/geometry.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,15 @@ +type size = Scale of float | Pixel of int | Guess +type aspect_opts = Keep_at_most | Keep_at_least | Dont_keep +type resize_switch = Always | Bigger_only | Smaller_only +type from = TopLeft | BottomRight | Center +type position = AtPixel of from * int | AtScale of from * float +type t = { geom_width : int; geom_height : int; geom_x : int; geom_y : int; } +type spec = { + spec_width : size; + spec_height : size; + spec_aspect : aspect_opts; + spec_switch : resize_switch; + spec_x : int; + spec_y : int; +} +val compute : spec -> int -> int -> t diff -Nru camlimages-3.0.1/src/gif.ml camlimages-4.0.1/src/gif.ml --- camlimages-3.0.1/src/gif.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/gif.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: gif.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: gif.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) open Images;; open Index8;; @@ -229,7 +229,7 @@ then interlace_reader () else normal_reader () with - | Failure e -> prerr_endline "Short file"; + | Failure _e -> prerr_endline "Short file"; end; let frame = { diff -Nru camlimages-3.0.1/src/gif_na.c camlimages-4.0.1/src/gif_na.c --- camlimages-3.0.1/src/gif_na.c 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/gif_na.c 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,35 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt */ +/* Pierre Weis, projet Cristal, INRIA Rocquencourt */ +/* Jun Furuse, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1999,2000 */ +/* Institut National de Recherche en Informatique et en Automatique. */ +/* Distributed only by permission. */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include + +value Val_GifColorType(){ failwith("unsupported"); } +value Val_ColorMapObject(){ failwith("unsupported"); } +value Val_GifImageDesc(){ failwith("unsupported"); } +value Val_ScreenInfo(){ failwith("unsupported"); } +value dGifOpenFileName(){ failwith("unsupported"); } +value dGifCloseFile(){ failwith("unsupported"); } +value dGifGetRecordType(){ failwith("unsupported"); } +value dGifGetImageDesc(){ failwith("unsupported"); } +value dGifGetLine(){ failwith("unsupported"); } +value dGifGetExtension(){ failwith("unsupported"); } +value eGifOpenFileName(){ failwith("unsupported"); } +value eGifCloseFile(){ failwith("unsupported"); } +value eGifPutScreenDesc(){ failwith("unsupported"); } +value eGifPutImageDesc(){ failwith("unsupported"); } +value eGifPutLine(){ failwith("unsupported"); } +value eGifPutExtension(){ failwith("unsupported"); } diff -Nru camlimages-3.0.1/src/gifread.c camlimages-4.0.1/src/gifread.c --- camlimages-3.0.1/src/gifread.c 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/gifread.c 2011-06-22 20:04:32.000000000 +0200 @@ -20,6 +20,8 @@ #include #include +#include "oversized.h" + #include #include @@ -191,6 +193,9 @@ GifFileType *GifFile = (GifFileType*) hdl; + if( oversized( GifFile->Image.Width, sizeof(GifPixelType) ) ){ + failwith_oversized("gif"); + } buf = alloc_string( GifFile->Image.Width * sizeof(GifPixelType) ); if( DGifGetLine(GifFile, String_val(buf), GifFile->Image.Width ) diff -Nru camlimages-3.0.1/src/graphic_image.ml camlimages-4.0.1/src/graphic_image.ml --- camlimages-3.0.1/src/graphic_image.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/graphic_image.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,42 +12,39 @@ (* *) (***********************************************************************) -(* $Id: graphic_image.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: graphic_image.ml,v 1.2 2009/02/08 15:01:56 weis Exp $ *) + +open Images;; open Graphics;; -open Images;; - let array_of_image img = match img with - | Index8 bitmap -> + | Images.Index8 bitmap -> let w = bitmap.Index8.width and h = bitmap.Index8.height - and colormap = bitmap.Index8.colormap.map - in - let cmap = Array.map (fun {r = r; g = g; b = b} -> rgb r g b) colormap in + and colormap = bitmap.Index8.colormap.map in + let cmap = Array.map (fun {r = r; g = g; b = b} -> Graphics.rgb r g b) colormap in if bitmap.Index8.transparent <> -1 then - cmap.(bitmap.Index8.transparent) <- transp; + cmap.(bitmap.Index8.transparent) <- transp; Array.init h (fun i -> - Array.init w (fun j -> cmap.(Index8.unsafe_get bitmap j i))) + Array.init w (fun j -> cmap.(Index8.unsafe_get bitmap j i))) | Index16 bitmap -> let w = bitmap.Index16.width and h = bitmap.Index16.height - and colormap = bitmap.Index16.colormap.map - in + and colormap = bitmap.Index16.colormap.map in let cmap = Array.map (fun {r = r; g = g; b = b} -> rgb r g b) colormap in - if bitmap.Index16.transparent <> -1 then - cmap.(bitmap.Index16.transparent) <- transp; + if bitmap.Index16.transparent <> -1 then + cmap.(bitmap.Index16.transparent) <- transp; Array.init h (fun i -> - Array.init w (fun j -> cmap.(Index16.unsafe_get bitmap j i))) + Array.init w (fun j -> cmap.(Index16.unsafe_get bitmap j i))) | Rgb24 bitmap -> let w = bitmap.Rgb24.width - and h = bitmap.Rgb24.height - in + and h = bitmap.Rgb24.height in Array.init h (fun i -> - Array.init w (fun j -> - let {r=r; g=g; b=b} = Rgb24.unsafe_get bitmap j i in - rgb r g b)) + Array.init w (fun j -> + let {r = r; g = g; b = b} = Rgb24.unsafe_get bitmap j i in + rgb r g b)) | Rgba32 _ | Cmyk32 _ -> failwith "RGBA and CMYK not supported" ;; @@ -55,12 +52,11 @@ let draw_image img x y = Graphics.draw_image (of_image img) x y;; -let image_of grpimg = +let image_of grpimg = let rgb_of_color color = - { r= (color lsr 16) land 255; - g= (color lsr 8) land 255; - b= color land 255 } - in + { r = (color lsr 16) land 0xFF; + g = (color lsr 8) land 0xFF; + b = color land 0xFF; } in let array = Graphics.dump_image grpimg in let height = Array.length array in let width = Array.length array.(0) in diff -Nru camlimages-3.0.1/src/graphic_image.mli camlimages-4.0.1/src/graphic_image.mli --- camlimages-3.0.1/src/graphic_image.mli 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/graphic_image.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: graphic_image.mli,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: graphic_image.mli,v 1.2 2009/02/08 15:00:49 weis Exp $ *) (** Interface of images from this library to images of the Caml [Graphics] library. *) @@ -23,8 +23,8 @@ (** Draw an [Images.t] value into the graphic window. *) val get_image : int -> int -> int -> int -> Rgb24.t - (** Capture the contents of a rectangle of the graphic window - with lower left corner at [x,y], width [w] and height [h] *) + (** [get_image x y w h] Capture the contents of a rectangle of the graphic + window with lower left corner at [x,y], width [w] and height [h] *) (** lower interface *) @@ -34,5 +34,5 @@ val of_image : Images.t -> Graphics.image;; (** Convert an [Images.t] value to a graphic image. *) -val image_of : Graphics.image -> Rgb24.t +val image_of : Graphics.image -> Rgb24.t;; (** Convert an [Graphics.image] value to *our* image *) diff -Nru camlimages-3.0.1/src/imagegdk.ml camlimages-4.0.1/src/imagegdk.ml --- camlimages-3.0.1/src/imagegdk.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/imagegdk.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,76 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: imagegdk.ml,v 1.2 2009/03/01 09:49:53 furuse Exp $*) + +open Images + +let initialized = ref None +;; + +let try_initialize () = + if !initialized = None then begin + Gdk.Rgb.init (); + initialized := Some (Gdk.Rgb.get_visual (), Gdk.Rgb.get_cmap ()) + end +;; + +open OImages + +let draw (obj : #GDraw.drawable) ?x ?y ?dither image = + try_initialize (); + match tag image, image#blocks with + | Rgb24 image, (1,1) -> + let string = fst (image#unsafe_access 0 0) in + let buf = Gpointer.region_of_string string in + obj#put_rgb_data ~width: image#width ~height: image#height + ?x ?y ?dither ~row_stride:(image#width * 3) buf + | _ -> failwith "Gdkrgb.draw" +;; + +let to_pixbuf image = + match tag image, image#blocks with + | Rgb24 image, (1,1) -> + let string = fst (image#unsafe_access 0 0) in + let buf = Gpointer.region_of_string string in + (* string may be GC'ed here? *) + let pixbuf = + GdkPixbuf.from_data ~width: image#width ~height: image#height + ~bits: 8 ~rowstride:(image#width * 3) ~has_alpha: false buf + in + pixbuf + | Rgb24 image, (w,h) -> + let dest = GdkPixbuf.create + ~width:image#width ~height:image#height + ~bits: 8 ~has_alpha: false () + in + for x = 0 to w - 1 do + for y = 0 to h - 1 do + let blk = image#dump_block x y in + let width = blk.Bitmap.Block.width in + let height = blk.Bitmap.Block.height in + let buf = Gpointer.region_of_string blk.Bitmap.Block.dump in + let pixbuf = + GdkPixbuf.from_data ~width ~height ~bits: 8 + ~rowstride:(width * 3) ~has_alpha: false buf + in + GdkPixbuf.copy_area ~dest + ~dest_x: blk.Bitmap.Block.x + ~dest_y: blk.Bitmap.Block.y + ~width ~height + pixbuf + done + done; + dest + | Cmyk32 _, _ -> failwith "Gdkrgb.draw cmyk32" + | _ -> failwith "Gdkrgb.draw" +;; diff -Nru camlimages-3.0.1/src/imagegdk.mli camlimages-4.0.1/src/imagegdk.mli --- camlimages-3.0.1/src/imagegdk.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/imagegdk.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,18 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +val draw : + #GDraw.drawable -> + ?x:int -> ?y:int -> ?dither:Gdk.Tags.rgb_dither -> + OImages.oimage -> unit + +val to_pixbuf : OImages.oimage -> GdkPixbuf.pixbuf diff -Nru camlimages-3.0.1/src/image_intf.mli camlimages-4.0.1/src/image_intf.mli --- camlimages-3.0.1/src/image_intf.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/image_intf.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,163 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* FraníÐis Pessaux, projet Cristal, INRIA Rocquencourt *) +(* Pierre Weis, projet Cristal, INRIA Rocquencourt *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: image_intf.mli,v 1.2 2009/07/04 03:39:28 furuse Exp $ *) + +(** Color to string encoder/decoder module type *) +module type ENCODE = + sig + type t + val bytes_per_pixel : int + val get : string -> int -> t + val set : string -> int -> t -> unit + val make : t -> string + end;; + +(** Low level image module type *) +module type RAWIMAGE = sig + module Encode : ENCODE + type elt + and bitmap + and t = { width : int; height : int; bitmap : bitmap; } + val width : t -> int + val height : t -> int + val dump : t -> string + val create_with : int -> int -> string -> t + val create_with_scanlines : int -> int -> string array -> t + val create : int -> int -> t + val make : int -> int -> elt -> t + val unsafe_access : t -> int -> int -> string * int + val get_strip : t -> int -> int -> int -> string + val set_strip : t -> int -> int -> int -> string -> unit + val get_scanline : t -> int -> string + val get_scanline_ptr : t -> (int -> (string * int) * int) option + val set_scanline : t -> int -> string -> unit + val unsafe_get : t -> int -> int -> elt + val unsafe_set : t -> int -> int -> elt -> unit + val get : t -> int -> int -> elt + val set : t -> int -> int -> elt -> unit + val destroy : t -> unit + val copy : t -> t + val sub : t -> int -> int -> int -> int -> t + val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit + val map : (elt -> elt -> elt) -> + t -> int -> int -> t -> int -> int -> int -> int -> unit + val blocks : t -> int * int + val dump_block : t -> int -> int -> Bitmap.Block.t +end;; + +(** low image container module type *) +module type CONTAINER = sig + type container + type rawimage + val rawimage : container -> rawimage + val create_default : int -> int -> rawimage -> container + val create_duplicate : container -> int -> int -> rawimage -> container +end;; + +module type IMAGE = sig + type t + type elt + + (** Image creation *) + + val create : int -> int -> t + (** [create w h] creates an image with a size [w]x[h]. The content is + the image is not initialized. *) + + val make : int -> int -> elt -> t + (** [make w h c] creates an image with a size [w]x[h]. The content is + the image is initialized to the color [c]. *) + + val destroy : t -> unit + (** [destroy t] explicitly frees the image content of [t]. + If you do not use bitmap swap files, you do not need to call + this function, since GC will free unreachable image data automatically. + Read bitmap.mli for more details. *) + + (** Pixel access *) + + val get : t -> int -> int -> elt + (** [get t x y] gets image pixel of [t] at [x],[y]. If [x],[y] is + outside of the image size, Images.Out_of_image exception is raised. *) + + val set : t -> int -> int -> elt -> unit + (** [set t x y c] sets image pixel of [t] at [x],[y] by the color [c]. + If [x],[y] is outside of the image size, Images.Out_of_image exception + is raised. *) + + val unsafe_get : t -> int -> int -> elt + val unsafe_set : t -> int -> int -> elt -> unit + (** Unsafe versions of [get] and [set]. It does not perform any image + boundary check. If the coordinates are out of the given image, + the result is undefined. Use carefully. *) + + (** Image copy *) + + val copy : t -> t + (** [copy t] duplicates the image [t]. *) + + val sub : t -> int -> int -> int -> int -> t + (** [sub t x y w h] duplicates a subimage of [t] of size [w]x[h], + whose origin (0,0) is at (x,y) of [t]. *) + + val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit + (** [blit src x y dst x' y' w h] copies rectangular area of [src] at + [x],[y] with size [w]x[h], to an image [dst]. The origin of + the subimage comes at [x'],[y'] of [dst]. *) + + val map : (elt -> elt -> elt) -> + t -> int -> int -> t -> int -> int -> int -> int -> unit + (** [map f src x y dst x' y' w h] maps pixels of the rectangular area + of [src] at [x],[y] with size [w]x[h], to an image [dst], + using color conversion function [f]. The origin of the subimage + comes at [x'],[y'] of [dst]. *) + + (** functions for internal use *) + val dump : t -> string + val unsafe_access : t -> int -> int -> string * int + val get_strip : t -> int -> int -> int -> string + val set_strip : t -> int -> int -> int -> string -> unit + val get_scanline : t -> int -> string + val get_scanline_ptr : t -> (int -> (string * int) * int) option + val set_scanline : t -> int -> string -> unit + val blocks : t -> int * int + val dump_block : t -> int -> int -> Bitmap.Block.t +end;; + +module type CONTAINER_INDEXED = sig + type container + type rawimage + type mapelt + val rawimage : container -> rawimage + val create_default : int -> int -> rawimage -> container + val create_duplicate : container -> int -> int -> rawimage -> container + val colormap : container -> mapelt Color.map +end;; + +module type IMAGEINDEXED = sig + include IMAGE + + type mapelt + + (** Pixel access *) + + val get_color : t -> int -> int -> mapelt + (** [get_color x y] returns image pixel color value of [t] at [x],[y]. + If [x],[y] is outside of the image size, Images.Out_of_image exception + is raised. *) + + val unsafe_get_color : t -> int -> int -> mapelt +end;; + diff -Nru camlimages-3.0.1/src/images.ml camlimages-4.0.1/src/images.ml --- camlimages-3.0.1/src/images.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/images.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: images.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: images.ml,v 1.3 2008/06/16 22:35:42 furuse Exp $ *) (* The image data structure definition. *) @@ -218,7 +218,7 @@ let load filename load_options = let result = ref None in try - List.iter (fun (format, methods) -> + List.iter (fun (_format, methods) -> try let _ = methods.check_header filename in match methods.load with @@ -351,7 +351,7 @@ let load_sequence filename load_options = let result = ref None in try - List.iter (fun (format, methods) -> + List.iter (fun (_format, methods) -> try let _ = methods.check_header filename in match methods.load_sequence, methods.load with @@ -385,3 +385,11 @@ | Not_found -> raise Wrong_file_type;; +let blocks img = + match img with + | Index8 img -> Index8.blocks img + | Rgb24 img -> Rgb24.blocks img + | Index16 img -> Index16.blocks img + | Rgba32 img -> Rgba32.blocks img + | Cmyk32 img -> Cmyk32.blocks img + diff -Nru camlimages-3.0.1/src/images.mli camlimages-4.0.1/src/images.mli --- camlimages-3.0.1/src/images.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/images.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: images.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: images.mli,v 1.3 2009/02/08 15:04:20 weis Exp $ *) (** The image data structure definition. *) @@ -195,3 +195,5 @@ (** [blit src sx sy dst dx dy width height] copies the rectangle region of [src] at (sx, sy) - (sx + width - 1, sy + height - 1) to [dst], at (dx, dy) - (dx + width - 1, dy + height - 1). *) + +val blocks : t -> int * int;; diff -Nru camlimages-3.0.1/src/index16.ml camlimages-4.0.1/src/index16.ml --- camlimages-3.0.1/src/index16.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/index16.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: index16.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: index16.ml,v 1.4 2009/07/04 03:39:28 furuse Exp $*) module E = struct open Color @@ -75,6 +75,14 @@ transparent = transparent; infos = infos; };; +let create_with_scanlines width height infos colormap transparent data = + { width = width; + height = height; + rawimage = RI.create_with_scanlines width height data; + colormap = colormap; + transparent = transparent; + infos = infos; };; + let rawimage = C.rawimage;; let create = IMAGE.create;; let make = IMAGE.make;; @@ -95,6 +103,8 @@ let sub = IMAGE.sub;; let blit = IMAGE.blit;; let map = IMAGE.map;; +let blocks = IMAGE.blocks;; +let dump_block = IMAGE.dump_block;; let unsafe_get_rgb = unsafe_get_color;; let get_rgb = get_color;; diff -Nru camlimages-3.0.1/src/index16.mli camlimages-4.0.1/src/index16.mli --- camlimages-3.0.1/src/index16.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/index16.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: index16.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: index16.mli,v 1.4 2009/07/04 03:39:28 furuse Exp $*) (** Indexed 16 bit depth image format *) @@ -57,8 +57,12 @@ val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit;; val map : (elt -> elt -> elt) -> t -> int -> int -> t -> int -> int -> int -> int -> unit;; +val blocks : t -> int * int +val dump_block : t -> int -> int -> Bitmap.Block.t val create_with : int -> int -> Info.info list -> Color.rgb Color.map -> int -> string -> t;; +val create_with_scanlines : int -> int -> + Info.info list -> Color.rgb Color.map -> int -> string array -> t;; val create : int -> int -> t;; val make : int -> int -> elt -> t;; val copy : t -> t;; diff -Nru camlimages-3.0.1/src/index8.ml camlimages-4.0.1/src/index8.ml --- camlimages-3.0.1/src/index8.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/index8.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: index8.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: index8.ml,v 1.4 2009/07/04 03:39:28 furuse Exp $*) module E = struct open Color @@ -75,6 +75,14 @@ transparent = transparent; infos= infos; };; +let create_with_scanlines width height infos colormap transparent data = + { width= width; + height= height; + rawimage= RI.create_with_scanlines width height data; + colormap = colormap; + transparent = transparent; + infos= infos; };; + let rawimage = C.rawimage;; let create = IMAGE.create;; let make = IMAGE.make;; @@ -95,6 +103,8 @@ let sub = IMAGE.sub;; let blit = IMAGE.blit;; let map = IMAGE.map;; +let blocks = IMAGE.blocks;; +let dump_block = IMAGE.dump_block;; let unsafe_get_rgb = unsafe_get_color;; let get_rgb = get_color;; diff -Nru camlimages-3.0.1/src/index8.mli camlimages-4.0.1/src/index8.mli --- camlimages-3.0.1/src/index8.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/index8.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: index8.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $*) +(* $Id: index8.mli,v 1.4 2009/07/04 03:39:28 furuse Exp $*) (** Indexed 8 bit depth image format *) @@ -55,10 +55,14 @@ val get_rgb : t -> int -> int -> Color.rgb;; val destroy : t -> unit;; val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit;; +val blocks : t -> int * int +val dump_block : t -> int -> int -> Bitmap.Block.t val map : (elt -> elt -> elt) -> t -> int -> int -> t -> int -> int -> int -> int -> unit;; val create_with : int -> int -> Info.info list -> Color.rgb Color.map -> int -> string -> t;; +val create_with_scanlines : int -> int -> + Info.info list -> Color.rgb Color.map -> int -> string array -> t;; val create : int -> int -> t;; val make : int -> int -> elt -> t;; val copy : t -> t;; diff -Nru camlimages-3.0.1/src/jpeg.ml camlimages-4.0.1/src/jpeg.ml --- camlimages-3.0.1/src/jpeg.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/jpeg.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: jpeg.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: jpeg.ml,v 1.4 2009/07/04 03:39:28 furuse Exp $ *) open Images;; open Rgb24;; @@ -30,8 +30,10 @@ = "jpeg_set_scale_denom";; external open_in_start : in_handle -> int * int * in_handle = "open_jpeg_file_for_read_start";; -external read_scanline : in_handle -> string -> unit +external read_scanline : in_handle -> string -> int -> unit = "read_jpeg_scanline";; +external read_scanlines : in_handle -> string -> int -> int -> unit + = "read_jpeg_scanlines";; external close_in : in_handle -> unit = "close_jpeg_file_for_read";; @@ -67,41 +69,51 @@ if scale < 2 then 1 else if scale < 4 then 2 else if scale < 8 then 4 else 8 in -(* - prerr_endline (Printf.sprintf "Denom %d" denom); -*) set_scale_denom ic denom; image_width, image_height, open_in_start ic;; -let load name load_opts = - let prog = Images.load_progress load_opts in - let w, h, ic = open_in name in - let img = Rgb24.create w h in - let scanline = String.create (w * 3) in - for y = 0 to h - 1 do - read_scanline ic scanline; - Rgb24.set_scanline img y scanline; +let load_aux prog ic w h = + let prog y = match prog with | Some p -> p (float (y + 1) /. float h) | None -> () - done; + in + let img = Rgb24.create w h in + begin match Rgb24.get_scanline_ptr img with + | Some f -> + let load_once_at = max 1 (h / 10) in + let rec load_scanlines y = + if y >= h then () + else begin + let (string, off), at_most = f y in + let lines_read = min load_once_at at_most in + read_scanlines ic string off lines_read; + prog y; + load_scanlines (y + lines_read) + end + in + load_scanlines 0 + | None -> + (* CR jfuruse: check overflow *) + let scanline = String.create (w * 3) in + for y = 0 to h - 1 do + read_scanline ic scanline 0; + Rgb24.set_scanline img y scanline; + prog y + done + end; close_in ic; Rgb24 img;; +let load name load_opts = + let w, h, ic = open_in name in + let prog = Images.load_progress load_opts in + load_aux prog ic w h + let load_thumbnail name load_opts geom_spec = let prog = Images.load_progress load_opts in let ow, oh, (w, h, ic) = open_in_thumbnail name geom_spec in - let img = Rgb24.create w h in - let scanline = String.create (w * 3) in - for y = 0 to h - 1 do - read_scanline ic scanline; - Rgb24.set_scanline img y scanline; - match prog with - | Some p -> p (float (y + 1) /. float h) - | None -> () - done; - close_in ic; - ow, oh, Rgb24 img;; + ow, oh, load_aux prog ic w h let save name opts image = let quality = diff -Nru camlimages-3.0.1/src/jpeg.mli camlimages-4.0.1/src/jpeg.mli --- camlimages-3.0.1/src/jpeg.mli 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/jpeg.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: jpeg.mli,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: jpeg.mli,v 1.2 2008/05/17 19:55:50 furuse Exp $ *) val load : string -> Images.load_option list -> Images.t;; (** Loads a jpeg image. *) @@ -37,7 +37,7 @@ val open_in : string -> int * int * in_handle;; val open_in_thumbnail : string -> Geometry.spec -> int * int * (int * int * in_handle);; -val read_scanline : in_handle -> string -> unit;; +val read_scanline : in_handle -> string -> int -> unit;; val close_in : in_handle -> unit;; type out_handle;; diff -Nru camlimages-3.0.1/src/jpeg_na.c camlimages-4.0.1/src/jpeg_na.c --- camlimages-3.0.1/src/jpeg_na.c 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/jpeg_na.c 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,32 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt */ +/* Pierre Weis, projet Cristal, INRIA Rocquencourt */ +/* Jun Furuse, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1999,2000 */ +/* Institut National de Recherche en Informatique et en Automatique. */ +/* Distributed only by permission. */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include + +value jpeg_set_scale_denom(){ failwith("unsupported"); } +value open_jpeg_file_for_read(){ failwith("unsupported"); } +value open_jpeg_file_for_read_start(){ failwith("unsupported"); } +value read_jpeg_scanline(){ failwith("unsupported"); } +value read_jpeg_scanlines(){ failwith("unsupported"); } +value close_jpeg_file_for_read(){ failwith("unsupported"); } +value open_jpeg_file_for_write_colorspace(){ failwith("unsupported"); } +value open_jpeg_file_for_write(){ failwith("unsupported"); } +value open_jpeg_file_for_write_cmyk(){ failwith("unsupported"); } +value write_jpeg_scanline(){ failwith("unsupported"); } +value close_jpeg_file_for_write(){ failwith("unsupported"); } +value read_JPEG_file(){ failwith("unsupported"); } +value write_JPEG_file(){ failwith("unsupported"); } diff -Nru camlimages-3.0.1/src/jpegread.c camlimages-4.0.1/src/jpegread.c --- camlimages-3.0.1/src/jpegread.c 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/jpegread.c 2011-06-22 20:04:32.000000000 +0200 @@ -11,6 +11,9 @@ /* Distributed only by permission. */ /* */ /***********************************************************************/ + +/* $Id: jpegread.c,v 1.5 2009/10/16 16:08:33 weis Exp $ */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -20,6 +23,8 @@ #include #include +#include "oversized.h" + #include #include @@ -156,6 +161,12 @@ */ /* JSAMPLEs per row in output buffer */ + if( oversized(cinfo.output_width, cinfo.output_components) ){ + jpeg_destroy_decompress(&cinfo); + fclose(infile); + failwith_oversized("jpeg"); + } + row_stride = cinfo.output_width * cinfo.output_components; /* Make a one-row-high sample array that will go away when done with image */ @@ -177,6 +188,12 @@ jpeg_read_scanlines(&cinfo, buffer + cinfo.output_scanline, 1); } + if( oversized(row_stride, cinfo.output_height) ){ + jpeg_destroy_decompress(&cinfo); + fclose(infile); + failwith_oversized("jpeg"); + } + { CAMLlocalN(r,3); r[0] = Val_int(cinfo.output_width); @@ -225,6 +242,7 @@ struct jpeg_decompress_struct *cinfop; cinfop = (struct jpeg_decompress_struct *) Field ( jpegh, 0 ); + cinfop->scale_num = 1; cinfop->scale_denom = Int_val( denom ); CAMLreturn(Val_unit); } @@ -352,6 +370,7 @@ { CAMLlocalN(r,3); + // CR jfuruse: integer overflow r[0] = Val_int(cinfop->output_width); r[1] = Val_int(cinfop->output_height); r[2] = alloc_tuple(3); @@ -368,26 +387,39 @@ CAMLreturn(res); } -value read_jpeg_scanline( jpegh, buf ) -value jpegh, buf; +value read_jpeg_scanline( jpegh, buf, offset ) +value jpegh, offset, buf; { - CAMLparam2(jpegh,buf); - + CAMLparam3(jpegh,offset,buf); struct jpeg_decompress_struct *cinfop; JSAMPROW row[1]; cinfop = (struct jpeg_decompress_struct *) Field( jpegh, 0 ); - - row[0] = String_val( buf ); - - /* - fprintf(stderr, "scan %d %d ...\n", cinfop->output_scanline, cinfop->output_height); - fflush(stderr); - */ + row[0] = String_val( buf ) + Int_val( offset ); jpeg_read_scanlines( cinfop, row, 1 ); + CAMLreturn(Val_unit); } +/* no boundary checks */ +value read_jpeg_scanlines( value jpegh, value buf, value offset, value lines ) +{ + CAMLparam4(jpegh,offset,buf,lines); + struct jpeg_decompress_struct *cinfop; + JSAMPROW row[1]; + int clines = Int_val(lines); + int i; + row[0] = String_val(buf) + Int_val(offset); + cinfop = (struct jpeg_decompress_struct *) Field( jpegh, 0 ); + // width is NOT image_width since we may have scale_denom <> 1 + int scanline_bytes = cinfop->output_width * 3; // no padding (size 3 is fixed? ) + for(i=0; i camlimages.ml.tmp - mv camlimages.ml.tmp camlimages.ml - -top: all - $(OCAMLMKTOP) -custom -o customtop -ccopt "-L." \ - $(WITH_UNIX) \ - $(WITH_CAMLIMAGES) - -include ../Makefile.rules diff -Nru camlimages-3.0.1/src/Makefile.in camlimages-4.0.1/src/Makefile.in --- camlimages-3.0.1/src/Makefile.in 2007-10-11 10:50:44.000000000 +0200 +++ camlimages-4.0.1/src/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,628 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.23 2007/02/20 21:19:17 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -@BUILD_NATIVE_TRUE@am__append_1 = camlimages.cmxa -@BUILD_BYTECODE_TRUE@am__append_2 = camlimages.cma -@HAVE_LABLGTK_TRUE@am__append_3 = ximage.ml \ -@HAVE_LABLGTK_TRUE@ oXimage.ml - -@HAVE_LABLGTK_TRUE@am__append_4 = ximage.mli \ -@HAVE_LABLGTK_TRUE@ oXimage.mli - -@HAVE_LABLGTK_TRUE@am__append_5 = -I $(LABLGTKDIR) -@HAVE_LABLGTK2_TRUE@am__append_6 = ximage2.ml \ -@HAVE_LABLGTK2_TRUE@ oXimage2.ml - -@HAVE_LABLGTK2_TRUE@am__append_7 = ximage2.mli \ -@HAVE_LABLGTK2_TRUE@ oXimage2.mli - -@HAVE_LABLGTK2_TRUE@am__append_8 = -I $(LABLGTK2DIR) -@HAVE_GIF_TRUE@am__append_9 = gif.ml \ -@HAVE_GIF_TRUE@ oGif.ml - -@HAVE_GIF_TRUE@am__append_10 = gif.mli -@HAVE_GIF_TRUE@am__append_11 = gifread.c \ -@HAVE_GIF_TRUE@ gifwrite.c - -@HAVE_PNG_TRUE@am__append_12 = png.ml \ -@HAVE_PNG_TRUE@ oPng.ml - -@HAVE_PNG_TRUE@am__append_13 = png.mli -@HAVE_PNG_TRUE@am__append_14 = pngread.c \ -@HAVE_PNG_TRUE@ pngwrite.c - -@HAVE_JPEG_TRUE@am__append_15 = jpeg.ml \ -@HAVE_JPEG_TRUE@ oJpeg.ml - -@HAVE_JPEG_TRUE@am__append_16 = jpeg.mli -@HAVE_JPEG_TRUE@am__append_17 = jpegread.c \ -@HAVE_JPEG_TRUE@ jpegwrite.c - -@HAVE_TIFF_TRUE@am__append_18 = tiff.ml \ -@HAVE_TIFF_TRUE@ oTiff.ml - -@HAVE_TIFF_TRUE@am__append_19 = tiff.mli -@HAVE_TIFF_TRUE@am__append_20 = tiffread.c \ -@HAVE_TIFF_TRUE@ tiffwrite.c - -@HAVE_TIFF_TRUE@am__append_21 = jis_table.cmi -@HAVE_XPM_TRUE@am__append_22 = xpm.ml \ -@HAVE_XPM_TRUE@ oXpm.ml - -@HAVE_XPM_TRUE@am__append_23 = xpm.mli -@HAVE_XPM_TRUE@am__append_24 = xpmread.c \ -@HAVE_XPM_TRUE@ xpmwrite.c - -@HAVE_XPM_TRUE@am__append_25 = $(INCXPM) -@HAVE_FREETYPE_TRUE@am__append_26 = ftlow.ml \ -@HAVE_FREETYPE_TRUE@ freetype.ml \ -@HAVE_FREETYPE_TRUE@ jis_table.ml \ -@HAVE_FREETYPE_TRUE@ jis_unicode.ml \ -@HAVE_FREETYPE_TRUE@ fttext.ml \ -@HAVE_FREETYPE_TRUE@ oFreetype.ml - -@HAVE_FREETYPE_TRUE@am__append_27 = ftlow.mli \ -@HAVE_FREETYPE_TRUE@ freetype.mli \ -@HAVE_FREETYPE_TRUE@ jis_unicode.mli \ -@HAVE_FREETYPE_TRUE@ fttext.mli - -@HAVE_FREETYPE_TRUE@am__append_28 = ftintf.c -@HAVE_FREETYPE_TRUE@am__append_29 = $(INCFREETYPE) -@HAVE_PS_TRUE@am__append_30 = ps.ml \ -@HAVE_PS_TRUE@ oPs.ml - -@HAVE_PS_TRUE@am__append_31 = ps.mli -DIST_COMMON = $(srcdir)/../Makefile.rules $(srcdir)/META.in \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -subdir = src -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = META -SOURCES = -DIST_SOURCES = -am__installdirs = "$(DESTDIR)$(ocamlsitelibdir)" "$(DESTDIR)$(ocamlstublibdir)" -ocamlsitelibDATA_INSTALL = $(INSTALL_DATA) -ocamlstublibDATA_INSTALL = $(INSTALL_DATA) -DATA = $(ocamlsitelib_DATA) $(ocamlstublib_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -ocamlsitelibdir = $(libdir)/ocaml/site-lib/camlimages -ocamlsitelib_DATA = camlimages.a \ - libcamlimages.a \ - $(OCAMLINTERFACES) \ - $(OCAMLINTERFACES:.mli=.cmi) \ - META\ -$(am__append_1) $(am__append_2) $(am__append_21) -ocamlstublibdir = $(libdir)/ocaml/stublibs -ocamlstublib_DATA = dllcamlimages.so -BUILT_SOURCES = $(OCAMLBUILTSOURCES) -OCAMLCFLAGS = -warn-error A -LINKFLAGS = -AM_OCAMLCFLAGS = $(am__append_5) $(am__append_8) -AM_CFLAGS = -I .. -DHAVE_CONFIG_H $(am__append_25) $(am__append_29) - -# use two different variables here to avoid a circular dependency -# between Makefile and .depend file -OCAMLBUILTSOURCES = camlimages.ml -OCAMLSOURCES = mstring.ml \ - color.ml \ - region.ml \ - tmpfile.ml \ - bitmap.ml \ - genimage.ml \ - rgba32.ml \ - rgb24.ml \ - index8.ml \ - index16.ml \ - cmyk32.ml \ - images.ml \ - oColor.ml \ - oImages.ml \ - reduce.ml \ - geometry.ml \ - colorhist.ml \ - blend.ml \ - graphic_image.ml \ - oGraphic.ml \ - bmp.ml \ - oBmp.ml \ - ppm.ml \ - oPpm.ml \ - xvthumb.ml \ - oXvthumb.ml\ -$(am__append_3) $(am__append_6) $(am__append_9) $(am__append_12) $(am__append_15) $(am__append_18) $(am__append_22) $(am__append_26) $(am__append_30) -OCAMLINTERFACES = info.mli \ - mstring.mli \ - color.mli \ - region.mli \ - tmpfile.mli \ - bitmap.mli \ - genimage.mli \ - rgba32.mli \ - rgb24.mli \ - index8.mli \ - index16.mli \ - cmyk32.mli \ - images.mli \ - oColor.mli \ - oImages.mli \ - reduce.mli \ - blend.mli \ - graphic_image.mli \ - bmp.mli \ - ppm.mli \ - xvthumb.mli \ - oXvthumb.mli\ -$(am__append_4) $(am__append_7) $(am__append_10) $(am__append_13) $(am__append_16) $(am__append_19) $(am__append_23) $(am__append_27) $(am__append_31) -CSOURCES = $(am__append_11) $(am__append_14) $(am__append_17) $(am__append_20) $(am__append_24) $(am__append_28) -EXTRA_DIST = $(OCAMLSOURCES) $(OCAMLINTERFACES) $(CSOURCES) camlimages.ml.in META.in -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLBUILTSOURCES:.ml=.cmi) \ - $(OCAMLSOURCES:.ml=.cmi) \ - info.cmi \ - $(COBJS) \ - libcamlimages.a \ - dllcamlimages.so \ - camlimages.cma \ - camlimages.cmxa \ - camlimages.a \ - camlimages.ml \ - META \ - .depend - -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) -EXTCLIB = $(LIBFREETYPE) $(LIBXPM) $(LIBTIFF) \ - $(LIBPNG) $(LIBJPEG) $(LIBGIF) - -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -META: $(top_builddir)/config.status $(srcdir)/META.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -uninstall-info-am: -install-ocamlsitelibDATA: $(ocamlsitelib_DATA) - @$(NORMAL_INSTALL) - test -z "$(ocamlsitelibdir)" || $(mkdir_p) "$(DESTDIR)$(ocamlsitelibdir)" - @list='$(ocamlsitelib_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(ocamlsitelibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(ocamlsitelibdir)/$$f'"; \ - $(ocamlsitelibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(ocamlsitelibdir)/$$f"; \ - done - -uninstall-ocamlsitelibDATA: - @$(NORMAL_UNINSTALL) - @list='$(ocamlsitelib_DATA)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f '$(DESTDIR)$(ocamlsitelibdir)/$$f'"; \ - rm -f "$(DESTDIR)$(ocamlsitelibdir)/$$f"; \ - done -install-ocamlstublibDATA: $(ocamlstublib_DATA) - @$(NORMAL_INSTALL) - test -z "$(ocamlstublibdir)" || $(mkdir_p) "$(DESTDIR)$(ocamlstublibdir)" - @list='$(ocamlstublib_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(ocamlstublibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(ocamlstublibdir)/$$f'"; \ - $(ocamlstublibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(ocamlstublibdir)/$$f"; \ - done - -uninstall-ocamlstublibDATA: - @$(NORMAL_UNINSTALL) - @list='$(ocamlstublib_DATA)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f '$(DESTDIR)$(ocamlstublibdir)/$$f'"; \ - rm -f "$(DESTDIR)$(ocamlstublibdir)/$$f"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(ocamlsitelibdir)" "$(DESTDIR)$(ocamlstublibdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-ocamlsitelibDATA install-ocamlstublibDATA - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-ocamlsitelibDATA \ - uninstall-ocamlstublibDATA - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-ocamlsitelibDATA install-ocamlstublibDATA \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am uninstall-ocamlsitelibDATA \ - uninstall-ocamlstublibDATA - - -camlimages.a libcamlimages.a dllcamlimages.so: $(COBJS) - $(OCAMLMKLIB) -o camlimages $(EXTCLIB) $(LDFLAGS) $(COBJS) - -camlimages.cma: $(OCAMLBYTOBJS) camlimages.a dllcamlimages.so - $(OCAMLMKLIB) -linkall -o camlimages $(EXTCLIB) $(LDFLAGS) $(OCAMLBYTOBJS) - -camlimages.cmxa: $(OCAMLOPTOBJS) camlimages.a dllcamlimages.so - $(OCAMLMKLIB) -linkall -o camlimages $(EXTCLIB) $(LDFLAGS) $(OCAMLOPTOBJS) - -camlimages.ml: $(top_srcdir)/config.status camlimages.ml.in - rm -f camlimages.ml camlimages.ml.tmp - sed \ - -e 's,@VERSION\@,$(VERSION),g' \ - -e 's,@SUPPORT_GIF\@,$(SUPPORT_GIF),g' \ - -e 's,@SUPPORT_PNG\@,$(SUPPORT_PNG),g' \ - -e 's,@SUPPORT_JPEG\@,$(SUPPORT_JPEG),g' \ - -e 's,@SUPPORT_TIFF\@,$(SUPPORT_TIFF),g' \ - -e 's,@SUPPORT_FREETYPE\@,$(SUPPORT_FREETYPE),g' \ - -e 's,@SUPPORT_PS\@,$(SUPPORT_PS),g' \ - -e 's,@SUPPORT_XPM\@,$(SUPPORT_XPM),g' \ - -e 's,@PATH_RGB_TXT\@,$(PATH_RGB_TXT),g' \ - -e 's,@GS\@,$(GS),g' \ - -e 's,@WORD_SIZE\@,$(WORD_SIZE),g' \ - $(srcdir)/camlimages.ml.in > camlimages.ml.tmp - mv camlimages.ml.tmp camlimages.ml - -top: all - $(OCAMLMKTOP) -custom -o customtop -ccopt "-L." \ - $(WITH_UNIX) \ - $(WITH_CAMLIMAGES) - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/src/META.in camlimages-4.0.1/src/META.in --- camlimages-3.0.1/src/META.in 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/META.in 2011-06-22 20:04:32.000000000 +0200 @@ -1,18 +1,69 @@ name = "CamlImages" version = "@PACKAGE_VERSION@" description = "Objective Caml image processing library" -requires = "@REQUIRES@" -archive(byte) = "@PACKAGE_NAME@.cma" -archive(native) = "@PACKAGE_NAME@.cmxa" - -package "lablgtk" ( - directory = "+lablgtk" - archive(byte) = "lablgtk.cma" - archive(native) = "lablgtk.cmxa" + +archive(byte) = "camlimages.cma" +archive(native) = "camlimages.cmxa" + +package "core" ( + archive(byte) = "camlimages_core.cma" + archive(native) = "camlimages_core.cmxa" +) + +package "gif" ( + requires = "camlimages.core" + archive(byte) = "camlimages_gif.cma" + archive(native) = "camlimages_gif.cmxa" +) + +package "jpeg" ( + requires = "camlimages.core" + archive(byte) = "camlimages_jpeg.cma" + archive(native) = "camlimages_jpeg.cmxa" +) + +package "png" ( + requires = "camlimages.core" + archive(byte) = "camlimages_png.cma" + archive(native) = "camlimages_png.cmxa" +) + +package "tiff" ( + requires = "camlimages.core" + archive(byte) = "camlimages_tiff.cma" + archive(native) = "camlimages_tiff.cmxa" +) + +package "freetype" ( + requires = "camlimages.core" + archive(byte) = "camlimages_freetype.cma" + archive(native) = "camlimages_freetype.cmxa" +) + +package "xpm" ( + requires = "camlimages.core" + archive(byte) = "camlimages_xpm.cma" + archive(native) = "camlimages_xpm.cmxa" +) + +package "ps" ( + requires = "camlimages.core" + archive(byte) = "camlimages_ps.cma" + archive(native) = "camlimages_ps.cmxa" +) + +package "graphics" ( + requires = "camlimages.core, graphics" + archive(byte) = "camlimages_graphics.cma" + archive(native) = "camlimages_graphics.cmxa" ) package "lablgtk2" ( - directory = "+lablgtk2" - archive(byte) = "lablgtk.cma" - archive(native) = "lablgtk.cmxa" + requires = "camlimages.core, lablgtk2" + archive(byte) = "camlimages_lablgtk2.cma" + archive(native) = "camlimages_lablgtk2.cmxa" +) + +package "all_formats" ( + requires = "camlimages.gif, camlimages.jpeg, camlimages.png, camlimages.tiff, camlimages.xpm, camlimages.ps" ) diff -Nru camlimages-3.0.1/src/oFreetype.ml camlimages-4.0.1/src/oFreetype.ml --- camlimages-3.0.1/src/oFreetype.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/oFreetype.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: oFreetype.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: oFreetype.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) open Images;; open Freetype;; @@ -27,9 +27,9 @@ class face file id = let library = get_library () in - let face,info = new_face library file id in + let face, _info = new_face library file id in - object (self) + object method library = library method face = face diff -Nru camlimages-3.0.1/src/oGif.ml camlimages-4.0.1/src/oGif.ml --- camlimages-3.0.1/src/oGif.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/oGif.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: oGif.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: oGif.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) open OImages;; open Gif;; @@ -22,6 +22,6 @@ let save_image name opts image = let img = image#image in match img with - | Images.Index8 bmp -> + | Images.Index8 _bmp -> Gif.save_image name opts img | _ -> raise Wrong_image_class;; diff -Nru camlimages-3.0.1/src/oImages.ml camlimages-4.0.1/src/oImages.ml --- camlimages-3.0.1/src/oImages.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/oImages.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: oImages.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: oImages.ml,v 1.5 2009/03/01 09:49:53 furuse Exp $ *) open Images;; @@ -54,9 +54,13 @@ method save : string -> format option -> save_option list -> unit method coerce : oimage + + method blocks : int * int + + method dump_block : int -> int -> Bitmap.Block.t end;; -(* Impl *) +(* Implementation *) class virtual oimage_impl = object (self) method virtual image_class : image_class @@ -82,10 +86,16 @@ destroy : _; dump : _; save : _; - coerce : _ >) + coerce : _; + blocks : _; + dump_block : _>) + + method virtual blocks : int * int + method virtual dump_block : int -> int -> Bitmap.Block.t end;; open Rgba32;; +open Rgb24;; class type rgba32_class = object inherit oimage @@ -94,73 +104,65 @@ method sub : int -> int -> int -> int -> rgba32_class method blit : int -> int -> rgba32_class -> int -> int -> int -> int -> unit method resize : (float -> unit) option -> int -> int -> rgba32_class + method to_rgb24 : rgb24_class +end + +and rgb24_class = object + inherit oimage + inherit [Color.rgb] map + + method sub : int -> int -> int -> int -> rgb24_class + method blit : int -> int -> rgb24_class -> int -> int -> int -> int -> unit + method resize : (float -> unit) option -> int -> int -> rgb24_class + method to_rgba32 : rgba32_class end;; -class rgba32_wrapper img = object (self) +class rgba32_wrapper img = object inherit oimage_impl method image_class = ClassRgba32 method image = Images.Rgba32 img - method width = img.width - method height = img.height - method infos = img.infos - method dump = dump img - - method set_infos infos = img.infos <- infos + method width = img.Rgba32.width + method height = img.Rgba32.height + method infos = img.Rgba32.infos + method dump = Rgba32.dump img + + method set_infos infos = img.Rgba32.infos <- infos + + method unsafe_access = Rgba32.unsafe_access img + method unsafe_get = Rgba32.unsafe_get img + method unsafe_set = Rgba32.unsafe_set img + method get = Rgba32.get img + method set = Rgba32.set img - method unsafe_access = unsafe_access img - method unsafe_get = unsafe_get img - method unsafe_set = unsafe_set img - method get = get img - method set = set img + method destroy = Rgba32.destroy img - method destroy = destroy img - - method sub x y w h = new rgba32_wrapper (sub img x y w h) + method sub x y w h = new rgba32_wrapper (Rgba32.sub img x y w h) method blit sx sy (dst : rgba32_class) = Images.blit (Rgba32 img) sx sy dst#image - method resize prog nw nh = new rgba32_wrapper (resize prog img nw nh) + method resize prog nw nh = new rgba32_wrapper (Rgba32.resize prog img nw nh) method save name format opts = Images.save name format opts (Rgba32 img) -end;; - -class rgba32 width height = object - inherit rgba32_wrapper (create width height) -end;; - -class rgba32_filled width height init = object - inherit rgba32_wrapper (make width height init) -end;; - -class rgba32_with width height data bitmap = object - inherit rgba32_wrapper (create_with width height data bitmap) -end;; - -open Rgb24;; -class type rgb24_class = object - inherit oimage - inherit [Color.rgb] map + method to_rgb24 = new rgb24_wrapper (Rgb24.of_rgba32 img) - method sub : int -> int -> int -> int -> rgb24_class - method blit : int -> int -> rgb24_class -> int -> int -> int -> int -> unit - method resize : (float -> unit) option -> int -> int -> rgb24_class - method to_rgba32 : rgba32_class -end;; + method blocks = Rgba32.blocks img + method dump_block = Rgba32.dump_block img +end -class rgb24_wrapper img = object (self) +and rgb24_wrapper img = object inherit oimage_impl method image_class = ClassRgb24 method image = Images.Rgb24 img - method width = img.width - method height = img.height - method infos = img.infos + method width = img.Rgb24.width + method height = img.Rgb24.height + method infos = img.Rgb24.infos method dump = dump img - method set_infos infos = img.infos <- infos + method set_infos infos = img.Rgb24.infos <- infos method unsafe_access = unsafe_access img method unsafe_get = unsafe_get img @@ -178,6 +180,21 @@ method save name format opts = Images.save name format opts (Rgb24 img) method to_rgba32 = new rgba32_wrapper (Rgb24.to_rgba32 img) + + method blocks = Rgb24.blocks img + method dump_block = Rgb24.dump_block img +end;; + +class rgba32 width height = object + inherit rgba32_wrapper (Rgba32.create width height) +end;; + +class rgba32_filled width height init = object + inherit rgba32_wrapper (Rgba32.make width height init) +end;; + +class rgba32_with width height data bitmap = object + inherit rgba32_wrapper (Rgba32.create_with width height data bitmap) end;; class rgb24 width height = object @@ -245,6 +262,9 @@ method to_rgb24 = new rgb24_wrapper (Index8.to_rgb24 img) method to_rgba32 = new rgba32_wrapper (Index8.to_rgba32 img) + + method blocks = Index8.blocks img + method dump_block = Index8.dump_block img end;; class index8 width height = object @@ -312,6 +332,9 @@ method to_rgba32 = new rgba32_wrapper (Index16.to_rgba32 img) method save name format opts = Images.save name format opts (Index16 img) + + method blocks = Index16.blocks img + method dump_block = Index16.dump_block img end;; class index16 width height = object @@ -337,7 +360,7 @@ method resize : (float -> unit) option -> int -> int -> cmyk32_class end;; -class cmyk32_wrapper img = object (self) +class cmyk32_wrapper img = object inherit oimage_impl method image_class = ClassCmyk32 @@ -364,6 +387,9 @@ method resize prog nw nh = new cmyk32_wrapper (resize prog img nw nh) method save name format opts = Images.save name format opts (Cmyk32 img) + + method blocks = Cmyk32.blocks img + method dump_block = Cmyk32.dump_block img end;; class cmyk32 width height = object diff -Nru camlimages-3.0.1/src/oImages.mli camlimages-4.0.1/src/oImages.mli --- camlimages-3.0.1/src/oImages.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/oImages.mli 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: oImages.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: oImages.mli,v 1.5 2009/03/01 11:24:10 furuse Exp $ *) (** Class interface for Images *) @@ -57,6 +57,9 @@ method save : string -> format option -> save_option list -> unit method coerce : oimage + + method blocks : int * int + method dump_block : int -> int -> Bitmap.Block.t end;; class type rgba32_class = object @@ -66,15 +69,11 @@ method sub : int -> int -> int -> int -> rgba32_class method blit : int -> int -> rgba32_class -> int -> int -> int -> int -> unit method resize : (float -> unit) option -> int -> int -> rgba32_class -end;; - -class rgba32_wrapper : Rgba32.t -> rgba32_class;; + method to_rgb24 : rgb24_class +end -class rgba32 : int -> int -> rgba32_class;; -class rgba32_filled : int -> int -> Color.rgba -> rgba32_class;; -class rgba32_with : int -> int -> Info.info list -> string -> rgba32_class;; -class type rgb24_class = object +and rgb24_class = object inherit oimage inherit [Color.rgb] map @@ -84,6 +83,12 @@ method to_rgba32 : rgba32_class end;; +class rgba32_wrapper : Rgba32.t -> rgba32_class;; + +class rgba32 : int -> int -> rgba32_class;; +class rgba32_filled : int -> int -> Color.rgba -> rgba32_class;; +class rgba32_with : int -> int -> Info.info list -> string -> rgba32_class;; + class rgb24_wrapper : Rgb24.t -> rgb24_class;; class rgb24 : int -> int -> rgb24_class;; diff -Nru camlimages-3.0.1/src/oJpeg.mli camlimages-4.0.1/src/oJpeg.mli --- camlimages-3.0.1/src/oJpeg.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/oJpeg.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,9 @@ +val load : string -> Images.load_option list -> OImages.oimage +val load_thumbnail : + string -> + Images.load_option list -> Geometry.spec -> int * int * OImages.oimage +val save : string -> Images.save_option list -> OImages.oimage -> unit +val save_as_cmyk : + string -> + Images.save_option list -> + (Images.rgb -> int * int * int * int) -> OImages.oimage -> unit diff -Nru camlimages-3.0.1/src/OMakefile camlimages-4.0.1/src/OMakefile --- camlimages-3.0.1/src/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,279 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +.PHONY: all clean libraries install + +.DEFAULT: all + +LIBRARY_PREFIX=camlimages + +####################################################################### C FILES + +CFILES_freetype[]= + ftintf + +CFILES_freetype_na[]= + ftintf_na + +CFILES_gif[]= + gifread + gifwrite + +CFILES_gif_na[]= + gif_na + +CFILES_jpeg[]= + jpegread + jpegwrite + +CFILES_jpeg_na[]= + jpeg_na + +CFILES_png[]= + pngread + pngwrite + +CFILES_png_na[]= + png_na + +CFILES_tiff[]= + tiffread + tiffwrite + +CFILES_tiff_na[]= + tiff_na + +CFILES_xpm[]= + xpmread + xpmwrite + +CFILES_xpm_na[]= + xpm_na + +CFILES_ps[]= + +CFILES_ps_na[]= + +CFILES_lib(name) = + CFILES_VAR = $(if $(mem $(name), all supported $(SUPPORTED_SUBPACKAGES)), CFILES_$(name), CFILES_$(name)_na) + value $(getvar $(CFILES_VAR)) + +CFILES_supported= + foreach(p, $(SUPPORTED_FORMATS)) + value $(CFILES_lib $(p)) + +CFILES_all= + foreach(p, $(FORMATS)) + value $(CFILES_lib $(p)) + +###################################################################### ML FILES + +FILES_core[]= + bitmap + blend + camlimages + cmyk32 + color + colorhist + genimage + geometry + images + index16 + index8 + jis_table + jis_unicode + mstring + oColor + oImages + reduce + region + rgb24 + rgba32 + tmpfile + units + bmp + oBmp + ppm + oPpm + xvthumb + oXvthumb + +FILES_gif[]= + gif + oGif + +FILES_jpeg[]= + jpeg + oJpeg + +FILES_png[]= + png + oPng + +FILES_tiff[]= + tiff + oTiff + +FILES_freetype[]= + freetype + ftlow + fttext + oFreetype + +FILES_xpm[]= + xpm + oXpm + +FILES_ps[]= + ps + oPs + +FILES_supported= + foreach(p, $(SUPPORTED_FORMATS)) + value $(getvar FILES_$(p)) + +FILES_all= + foreach(p, $(FORMATS)) + value $(getvar FILES_$(p)) + +FILES_graphics[]= + graphic_image + oGraphic + +FILES_lablgtk2[]= + imagegdk + oXimage + oXimage2 + ximage + ximage2 + +####################################################################### LDFLAGS + +LDFLAGS_core[]= + +#LDFLAGS_supported= +# foreach(p, $(SUPPORTED_FORMATS)) +# value $(getvar LDFLAGS_$(p)) + +LDFLAGS_supported= + x= + foreach(p, $(SUPPORTED_FORMATS)) + x+= $(getvar LDFLAGS_$(p)) + export + value $(x) + +LDFLAGS_all= + x= + foreach(p, $(FORMATS)) + x+= $(getvar LDFLAGS_$(p)) + export + value $(x) + +###################################################################### PACKAGES + +PACKS_graphics[]= + graphics + +PACKS_lablgtk2[]= + lablgtk2 + +################################################################## C BUILD RULE + +CFLAGS+= -fPIC -I $(OCAML_WHERE) + +MakeLibC(name) = + OCamlMkLibC($(LIBRARY_PREFIX)_$(name), \ + $(CFILES_lib $(name)), \ + $(getvar LDFLAGS_$(name))) + +################################################################# ML BUILD RULE + +MakeLibOCaml(name) = + + OCAMLPACKS= + try + getvar(PACKS_$(name)) + default + array() # default is empty + + pure= + try $(equal 0, $(length $(getvar CFILES_$(name)))) + default + value true + + if $(pure) + # pure ocaml library + OCAML_LIB_FLAGS= + try + -linkall $(mapprefix -cclib, $(LDFLAGS) $(getvar LDFLAGS_$(name))) + default + array() + OCamlLibrary($(LIBRARY_PREFIX)_$(name), $(getvar FILES_$(name))) + + else # inpure + $(LIBRARY_PREFIX)_$(name).cma $(LIBRARY_PREFIX)_$(name).cmxa: $(MakeLibC $(name)) + # OCAML_{BYTE,NATIVE}_LINK_FLAGS do not work for OCamlLibrary + # Bit dirty workaround + OCAMLCFLAGS+=-dllib -l$(LIBRARY_PREFIX)_$(name) + OCAMLOPTFLAGS+=-cclib -l$(LIBRARY_PREFIX)_$(name) + # use mapprefix instead of addprefix, otherwise "-cclib -lgif" + # is considered one option. + OCAML_LIB_FLAGS=-linkall $(mapprefix -cclib, $(LDFLAGS) $(getvar LDFLAGS_$(name))) + OCamlLibrary($(LIBRARY_PREFIX)_$(name), $(getvar FILES_$(name))) + +LIBRARIES= + # CR jfurue: lablgtk2, freetype and graphics may not be buildable + foreach(i, core $(FORMATS) supported all $(SUPPORTED_NON_FORMATS)) + MakeLibOCaml($(i)) + +libraries: $(LIBRARIES) + +clean: + rm -f $(LIBRARY_PREFIX).spot + rm -f $(filter-proper-targets $(ls R, .)) + +LocalOCamlGeneratedFiles(camlimages.ml) +ConfReplaceAt(camlimages.ml) + +ConfReplaceAt(META) + +all: libraries META + +INSTALL_TARGETS()= + value META \ + $(glob i, *.mli) \ + $(glob i, *.cmi) \ + $(glob i, *.spot) \ + $(glob i, *.spit) \ + $(glob i, *.cma) \ + $(glob i, *.cmxa) \ + $(glob i, *.a) \ + $(glob i, *.so) + +INSTALL()= + value $(OCAMLFIND) install $(LIBRARY_PREFIX) $(INSTALL_TARGETS) + +UNINSTALL()= + value $(OCAMLFIND) remove $(LIBRARY_PREFIX) + +install: all + $(INSTALL) + +# Author's personal thing +if $(defined BIG_ROOT) + %.cmx %.cmo %.cmi %.cma %.cmxa %.annot %.spot %.spit: $(INSTALLED)/lablgtk2 + $(INSTALLED)/camlimages: $(LIBRARIES) META + $(touch_installed_md5 camlimages, $(INSTALL_TARGETS)) + $(UNINSTALL) + $(INSTALL) diff -Nru camlimages-3.0.1/src/oPng.mli camlimages-4.0.1/src/oPng.mli --- camlimages-3.0.1/src/oPng.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/oPng.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,3 @@ +val load_as_rgb24 : string -> Images.load_option list -> OImages.oimage +val load : string -> Images.load_option list -> OImages.oimage +val save : string -> Images.save_option list -> < image : Images.t; .. > -> unit diff -Nru camlimages-3.0.1/src/oversized.h camlimages-4.0.1/src/oversized.h --- camlimages-3.0.1/src/oversized.h 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/oversized.h 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,9 @@ +#include +/* Test if x or y are negative, or if multiplying x * y would cause an + * arithmetic overflow. + */ +#define oversized(x, y) \ + ((x) < 0 || (y) < 0 || ((y) != 0 && (x) > INT_MAX / (y))) + +#define failwith_oversized(lib) \ + failwith("#lib error: image contains oversized or bogus width and height"); diff -Nru camlimages-3.0.1/src/oXimage2.ml camlimages-4.0.1/src/oXimage2.ml --- camlimages-3.0.1/src/oXimage2.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/oXimage2.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,75 +12,7 @@ (* *) (***********************************************************************) -(* $Id: oXimage2.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $*) +(* $Id: oXimage2.ml,v 1.2.2.1 2010/05/13 13:14:47 furuse Exp $*) -open Images;; -open OImages;; -open Ximage2;; -open Gdk;; - -class ximage xim = object - method width = xim.width - method height = xim.height - method unsafe_get = Ximage2.unsafe_get xim - method unsafe_set = Ximage2.unsafe_set xim - method get = Ximage2.get xim - method set = Ximage2.set xim - method data = xim.data - method destroy = Ximage2.destroy xim -end;; - -let create ~kind ~visual ~width ~height = - let xim = Ximage2.create ~kind ~visual ~width ~height in - new ximage xim;; - -let get_image drawable ~x ~y ~width ~height = - new ximage (Ximage2.get_image drawable ~x ~y ~width ~height);; - -let of_image visual progress img = - new ximage (Ximage2.of_image visual progress img#image);; - -open GDraw;; - -let mask_of_image win img = (* It is really inefficient *) - let mono_gc = get_mono_gc win in - let width, height = img#width, img#height in - let draw_mask i = - prerr_endline "making mask"; - let bmp = Bitmap.create ~window:win ~width ~height () in - let ximg = get_image bmp ~x:0 ~y:0 ~width ~height in - for x = 0 to width - 1 do - for y = 0 to height - 1 do - if i#unsafe_get x y = i#transparent - then ximg#unsafe_set x y 0 - else ximg#unsafe_set x y 1 - done; - done; - Gdk.Draw.image bmp mono_gc ximg#data - ~xsrc:0 ~ysrc:0 ~xdest:0 ~ydest:0 ~width ~height; - Some bmp in - - (* BUG ? of gtk or lablgtk? Using None for mask does not work *) - begin match OImages.tag img with - | Index8 i -> - if i#transparent >= 0 then draw_mask i - else Some (plain_mask win img#width img#height) - | Index16 i -> - let i = OImages.index16 img in - if i#transparent >= 0 then draw_mask i - else Some (plain_mask win img#width img#height) - | _ -> - Some (plain_mask win img#width img#height) - end;; - -let pixmap_of win ximage = - pixmap_of win - { width= ximage#width; height= ximage#height; - data= ximage#data; (* finalised= false*) };; - -let pixmap_of_image win progress img = - let visual = Gdk.Window.get_visual win in - let ximage = of_image visual progress img in - let msk = mask_of_image win img in - let pixmap = new GDraw.pixmap ?mask: msk (pixmap_of win ximage) in - pixmap;; +(* This module is for backward compatibility *) +include OXimage diff -Nru camlimages-3.0.1/src/oXimage2.mli camlimages-4.0.1/src/oXimage2.mli --- camlimages-3.0.1/src/oXimage2.mli 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/oXimage2.mli 1970-01-01 02:00:00.000000000 +0200 @@ -1,41 +0,0 @@ -(***********************************************************************) -(* *) -(* Objective Caml *) -(* *) -(* François Pessaux, projet Cristal, INRIA Rocquencourt *) -(* Pierre Weis, projet Cristal, INRIA Rocquencourt *) -(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1999-2004, *) -(* Institut National de Recherche en Informatique et en Automatique. *) -(* Distributed only by permission. *) -(* *) -(***********************************************************************) - -(* $Id: oXimage2.mli,v 1.1 2007/01/18 10:29:57 rousse Exp $*) - -open Ximage2;; - -class ximage : Ximage2.t -> object - method width : int - method height : int - method unsafe_get : int -> int -> Ximage2.elt - method unsafe_set : int -> int -> Ximage2.elt -> unit - method get : int -> int -> Ximage2.elt - method set : int -> int -> Ximage2.elt -> unit - method data : Gdk.image - method destroy : unit -end;; - -val create : - kind:Gdk.Image.image_type -> visual:Gdk.visual -> - width: int -> height: int -> ximage;; -val get_image : [>`drawable] Gobject.obj -> - x:int -> y:int -> width:int -> height:int -> ximage;; -val of_image : - Gdk.visual -> (float -> unit) option -> OImages.oimage -> ximage;; - -val mask_of_image : Gdk.window -> OImages.oimage -> Gdk.bitmap option;; - -val pixmap_of_image : - Gdk.window -> (float -> unit) option -> OImages.oimage -> GDraw.pixmap;; diff -Nru camlimages-3.0.1/src/oXimage.ml camlimages-4.0.1/src/oXimage.ml --- camlimages-3.0.1/src/oXimage.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/oXimage.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,86 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* François Pessaux, projet Cristal, INRIA Rocquencourt *) +(* Pierre Weis, projet Cristal, INRIA Rocquencourt *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: oXimage.ml,v 1.1.2.1 2010/05/13 13:14:47 furuse Exp $*) + +open Images;; +open OImages;; +open Ximage;; +open Gdk;; + +class ximage xim = object + method width = xim.width + method height = xim.height + method unsafe_get = Ximage.unsafe_get xim + method unsafe_set = Ximage.unsafe_set xim + method get = Ximage.get xim + method set = Ximage.set xim + method data = xim.data + method destroy = Ximage.destroy xim +end;; + +let create ~kind ~visual ~width ~height = + let xim = Ximage.create ~kind ~visual ~width ~height in + new ximage xim;; + +let get_image drawable ~x ~y ~width ~height = + new ximage (Ximage.get_image drawable ~x ~y ~width ~height);; + +let of_image visual progress img = + new ximage (Ximage.of_image visual progress img#image);; + +open GDraw;; + +let mask_of_image win img = (* It is really inefficient *) + let mono_gc = get_mono_gc win in + let width, height = img#width, img#height in + let draw_mask i = + prerr_endline "making mask"; + let bmp = Bitmap.create ~window:win ~width ~height () in + let ximg = get_image bmp ~x:0 ~y:0 ~width ~height in + for x = 0 to width - 1 do + for y = 0 to height - 1 do + if i#unsafe_get x y = i#transparent + then ximg#unsafe_set x y 0 + else ximg#unsafe_set x y 1 + done; + done; + Gdk.Draw.image bmp mono_gc ximg#data + ~xsrc:0 ~ysrc:0 ~xdest:0 ~ydest:0 ~width ~height; + Some bmp in + + (* BUG ? of gtk or lablgtk? Using None for mask does not work *) + begin match OImages.tag img with + | Index8 i -> + if i#transparent >= 0 then draw_mask i + else Some (plain_mask win img#width img#height) + | Index16 _i -> + let i = OImages.index16 img in + if i#transparent >= 0 then draw_mask i + else Some (plain_mask win img#width img#height) + | _ -> + Some (plain_mask win img#width img#height) + end;; + +let pixmap_of win ximage = + pixmap_of win + { width= ximage#width; height= ximage#height; + data= ximage#data; (* finalised= false*) };; + +let pixmap_of_image win progress img = + let visual = Gdk.Window.get_visual win in + let ximage = of_image visual progress img in + let msk = mask_of_image win img in + let pixmap = new GDraw.pixmap ?mask: msk (pixmap_of win ximage) in + pixmap;; diff -Nru camlimages-3.0.1/src/oXimage.mli camlimages-4.0.1/src/oXimage.mli --- camlimages-3.0.1/src/oXimage.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/oXimage.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,41 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* François Pessaux, projet Cristal, INRIA Rocquencourt *) +(* Pierre Weis, projet Cristal, INRIA Rocquencourt *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: oXimage.mli,v 1.1.2.1 2010/05/13 13:14:47 furuse Exp $*) + +open Ximage;; + +class ximage : Ximage.t -> object + method width : int + method height : int + method unsafe_get : int -> int -> Ximage.elt + method unsafe_set : int -> int -> Ximage.elt -> unit + method get : int -> int -> Ximage.elt + method set : int -> int -> Ximage.elt -> unit + method data : Gdk.image + method destroy : unit +end;; + +val create : + kind:Gdk.Image.image_type -> visual:Gdk.visual -> + width: int -> height: int -> ximage;; +val get_image : [>`drawable] Gobject.obj -> + x:int -> y:int -> width:int -> height:int -> ximage;; +val of_image : + Gdk.visual -> (float -> unit) option -> OImages.oimage -> ximage;; + +val mask_of_image : Gdk.window -> OImages.oimage -> Gdk.bitmap option;; + +val pixmap_of_image : + Gdk.window -> (float -> unit) option -> OImages.oimage -> GDraw.pixmap;; diff -Nru camlimages-3.0.1/src/png.ml camlimages-4.0.1/src/png.ml --- camlimages-3.0.1/src/png.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/png.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,61 +12,76 @@ (* *) (***********************************************************************) -(* $Id: png.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: png.ml,v 1.7 2009/07/04 03:39:28 furuse Exp $ *) open Images;; +(* do not change the ordering, since the tags are used in png*.c *) type png_read_result = - | PNG_RGB24 of string - | PNG_INDEX8 of string * rgb array - | PNG_INDEX16 of string * rgb array - | PNG_INDEX4 of string * rgb array;; - -external read_as_rgb24 : string -> int * int * string - = "read_png_file_as_rgb24";; -external read : string -> int * int * png_read_result - = "read_png_file";; -external write_rgb24 : string -> string -> int -> int -> unit - = "write_png_file_rgb24";; + | PNG_RGB24 of string array + | PNG_RGBA32 of string array + | PNG_INDEX8 of string array * rgb array + | PNG_INDEX16 of string array * rgb array + | PNG_INDEX4 of string array * rgb array +;; + +external read_as_rgb24 : string -> int * int * string array = + "read_png_file_as_rgb24" +;; + +external read : string -> int * int * png_read_result = "read_png_file" +;; +external write_rgb : string -> string -> int -> int -> bool -> unit + = "write_png_file_rgb" +;; external write_index : string -> string -> rgb array -> int -> int -> unit - = "write_png_file_index";; + = "write_png_file_index" +;; -let load_as_rgb24 name opts = +let load_as_rgb24 name _opts = let w, h, buf = read_as_rgb24 name in - Rgb24 (Rgb24.create_with w h [] buf);; + Rgb24 (Rgb24.create_with_scanlines w h [] buf) +;; -let load name opts = +let load name _opts = let w, h, res = read name in match res with - | PNG_RGB24 buf -> Rgb24 (Rgb24.create_with w h [] buf) + | PNG_RGB24 buf -> Rgb24 (Rgb24.create_with_scanlines w h [] buf) + | PNG_RGBA32 buf -> Rgba32 (Rgba32.create_with_scanlines w h [] buf) | PNG_INDEX8 (buf,cmap) -> - Index8 (Index8.create_with w h [] { max = 255; map = cmap; } (-1) buf) + Index8 (Index8.create_with_scanlines w h [] { max = 255; map = cmap; } (-1) buf) | PNG_INDEX16 (buf,cmap) -> - Index16 (Index16.create_with w h [] { max = 65535; map = cmap } (-1) buf) + Index16 (Index16.create_with_scanlines w h [] { max = 65535; map = cmap } (-1) buf) | PNG_INDEX4 (buf,cmap) -> - let buf' = String.create (w * h) in + let buf' = Array.init h (fun _ -> String.create w) in for y = 0 to h - 1 do - for x = 0 to w - 1 do - buf'.[x + y * w] <- - char_of_int - (let c = int_of_char buf.[y * ((w + 1) / 2) + x / 2] in + for x = 0 to w - 1 do + buf'.(y).[x] <- + char_of_int + (let c = int_of_char buf.(y).[x / 2] in if x mod 2 = 0 then c lsr 4 else c mod 16) - done + done done; - Index8 (Index8.create_with w h [] { max = 16; map = cmap } (-1) buf');; + Index8 (Index8.create_with_scanlines w h [] { max = 16; map = cmap } (-1) buf') +;; -let save name opts image = +let save name _opts image = match image with | Rgb24 bmp -> - write_rgb24 name (Rgb24.dump bmp) bmp.Rgb24.width bmp.Rgb24.height + write_rgb name + (Rgb24.dump bmp) bmp.Rgb24.width bmp.Rgb24.height false + | Rgba32 bmp -> + write_rgb name + (Rgba32.dump bmp) bmp.Rgba32.width bmp.Rgba32.height true | Index8 bmp -> write_index name (Index8.dump bmp) bmp.Index8.colormap.map - bmp.Index8.width bmp.Index8.height + bmp.Index8.width bmp.Index8.height | Index16 bmp -> write_index name (Index16.dump bmp) - bmp.Index16.colormap.map - bmp.Index16.width bmp.Index16.height - | Rgba32 _ | Cmyk32 _ -> failwith "Saving of RGBA and CMYK not supported";; + bmp.Index16.colormap.map + bmp.Index16.width bmp.Index16.height + | Cmyk32 _ -> failwith "Saving of CMYK not supported yet" +;; let check_header filename = let len = 24 in @@ -76,39 +91,40 @@ really_input ic str 0 len; close_in ic; if String.sub str 1 3 = "PNG" then begin - if str <> "\137PNG\013\010\026\010" then - { header_width= -1; - header_height= -1; - header_infos= [Info_Corrupted]; } - else begin - let belong str = - int_of_char str.[0] lsl 48 + - int_of_char str.[1] lsl 32 + - int_of_char str.[2] lsl 16 + - int_of_char str.[3] in - let w = belong (String.sub str 8 4) in - let h = belong (String.sub str 12 4) in - let bdepth = Info_Depth (int_of_char str.[12]) in - let infos = - try - let colormodel = - match int_of_char str.[13] with - | 0 -> Info_ColorModel Gray - | 2 -> Info_ColorModel RGB - | 3 -> Info_ColorModel Index - | 4 -> Info_ColorModel GrayA - | 6 -> Info_ColorModel RGBA - | _ -> raise Not_found in - [colormodel; bdepth] - with - | Not_found -> [bdepth] in - { header_width = w; - header_height = h; - header_infos = infos; } + if String.sub str 0 8 <> "\137PNG\013\010\026\010" then begin + { header_width= -1; + header_height= -1; + header_infos= [Info_Corrupted]; } + end else begin + let belong str = + int_of_char str.[0] lsl 24 + + int_of_char str.[1] lsl 16 + + int_of_char str.[2] lsl 8 + + int_of_char str.[3] in + let w = belong (String.sub str 16 4) in + let h = belong (String.sub str 20 4) in + let bdepth = Info_Depth (int_of_char str.[12]) in + let infos = + try + let colormodel = + match int_of_char str.[13] with + | 0 -> Info_ColorModel Gray + | 2 -> Info_ColorModel RGB + | 3 -> Info_ColorModel Index + | 4 -> Info_ColorModel GrayA + | 6 -> Info_ColorModel RGBA + | _ -> raise Not_found in + [colormodel; bdepth] + with + | Not_found -> [bdepth] in + { header_width = w; + header_height = h; + header_infos = infos; } end end else raise Wrong_file_type with - | _ -> close_in ic; raise Wrong_file_type;; + | _ -> close_in ic; raise Wrong_file_type +;; add_methods Png { check_header = check_header; @@ -116,4 +132,5 @@ save = Some save; load_sequence = None; save_sequence = None; -};; +} +;; diff -Nru camlimages-3.0.1/src/png.mli camlimages-4.0.1/src/png.mli --- camlimages-3.0.1/src/png.mli 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/png.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,10 +12,10 @@ (* *) (***********************************************************************) -(* $Id: png.mli,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: png.mli,v 1.2 2008/10/31 08:51:46 weis Exp $ *) val check_header : string -> Images.header;; - (** Checks the file header *) + (** Checks the file header of a png image. *) val load : string -> Images.load_option list -> Images.t;; (** Loads a png image. *) diff -Nru camlimages-3.0.1/src/png_na.c camlimages-4.0.1/src/png_na.c --- camlimages-3.0.1/src/png_na.c 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/png_na.c 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,25 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt */ +/* Pierre Weis, projet Cristal, INRIA Rocquencourt */ +/* Jun Furuse, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1999,2000 */ +/* Institut National de Recherche en Informatique et en Automatique. */ +/* Distributed only by permission. */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include + +value read_png_file_as_rgb24(){ failwith("unsupported"); } +value Val_PngColor(){ failwith("unsupported"); } +value Val_PngPalette(){ failwith("unsupported"); } +value read_png_file(){ failwith("unsupported"); } +value write_png_file_rgb(){ failwith("unsupported"); } +value write_png_file_index(){ failwith("unsupported"); } diff -Nru camlimages-3.0.1/src/pngread.c camlimages-4.0.1/src/pngread.c --- camlimages-3.0.1/src/pngread.c 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/pngread.c 2011-06-22 20:04:32.000000000 +0200 @@ -11,10 +11,14 @@ /* Distributed only by permission. */ /* */ /***********************************************************************/ + +/* $Id: pngread.c,v 1.5 2009/07/04 04:02:42 furuse Exp $ */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "oversized.h" #include #include @@ -22,17 +26,19 @@ #include #include -#define PNG_TAG_INDEX8 1 -#define PNG_TAG_INDEX16 2 -#define PNG_TAG_INDEX4 3 +#define PNG_TAG_RGB24 0 +#define PNG_TAG_RGBA32 1 +#define PNG_TAG_INDEX8 2 +#define PNG_TAG_INDEX16 3 +#define PNG_TAG_INDEX4 4 value read_png_file_as_rgb24( name ) value name; { CAMLparam1 ( name ); - CAMLlocal2 ( res,r ); + CAMLlocal3 ( res,r,tmp ); - char *filename; + char *filename; png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height; @@ -41,13 +47,13 @@ size_t rowbytes; filename = String_val( name ); - + if (( fp = fopen(filename, "rb")) == NULL ){ failwith("png file open failed"); } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL); + NULL, NULL, NULL); /* (void *)user_error_ptr, user_error_fn, user_warning_fn); */ if( png_ptr == NULL ){ @@ -79,20 +85,26 @@ png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); + &interlace_type, NULL, NULL); + + if (oversized(width, height)){ + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fp); + failwith_oversized("png"); + } if ( color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { - png_set_gray_to_rgb(png_ptr); + color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { + png_set_gray_to_rgb(png_ptr); } if ( color_type & PNG_COLOR_TYPE_PALETTE ) png_set_expand(png_ptr); if ( bit_depth == 16 ) png_set_strip_16(png_ptr); - if ( color_type & PNG_COLOR_MASK_ALPHA ) png_set_strip_alpha(png_ptr); - + if ( color_type & PNG_COLOR_MASK_ALPHA ) png_set_strip_alpha(png_ptr); + png_read_update_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); + &interlace_type, NULL, NULL); if ( color_type != PNG_COLOR_TYPE_RGB || bit_depth != 8 ) { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); @@ -102,22 +114,25 @@ rowbytes = png_get_rowbytes(png_ptr, info_ptr); + // rowbytes * height should be the maximum malloc size in this function + if (oversized(rowbytes, height) || oversized(sizeof(png_bytep), height)){ + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fp); + failwith("png error: image contains oversized or bogus width and height"); + } + { int i; png_bytep *row_pointers; + void * buf; row_pointers = (png_bytep*) stat_alloc(sizeof(png_bytep) * height); - - res = alloc_tuple(3); - r = alloc_string ( rowbytes * height ); - Store_field( res, 0, Val_int(width) ); - Store_field( res, 1, Val_int(height) ); - Store_field( res, 2, r ); - + buf = stat_alloc( rowbytes * height ); for( i = 0; i < height; i ++ ){ - row_pointers[i] = String_val( r ) + rowbytes * i; + row_pointers[i] = buf + rowbytes * i; } - + png_set_rows(png_ptr, info_ptr, row_pointers); + /* Later, we can return something */ if (setjmp(png_ptr->jmpbuf)) { /* Free all of the memory associated with the png_ptr and info_ptr */ @@ -126,19 +141,30 @@ /* If we get here, we had a problem reading the file */ fprintf(stderr, "png short file\n"); stat_free(row_pointers); + stat_free(buf); CAMLreturn(res); } png_read_image(png_ptr, row_pointers); - png_read_end(png_ptr, info_ptr); - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - + + r = alloc_tuple(height); + for( i = 0; i < height; i ++ ){ + tmp = caml_alloc_string(rowbytes); + memcpy(String_val(tmp), buf+rowbytes*i, rowbytes); + Store_field( r, i, tmp ); + } + res = alloc_tuple(3); + Store_field( res, 0, Val_int(width) ); + Store_field( res, 1, Val_int(height) ); + Store_field( res, 2, r ); + /* close the file */ fclose(fp); - + stat_free((void*)row_pointers); + stat_free(buf); CAMLreturn(res); } } @@ -184,9 +210,9 @@ value name; { CAMLparam1 ( name ); - CAMLlocal3 ( res,r1,r2 ); + CAMLlocal4 ( res,r1,r2,tmp ); - char *filename; + char *filename; png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height; @@ -195,13 +221,13 @@ size_t rowbytes; filename = String_val( name ); - + if (( fp = fopen(filename, "rb")) == NULL ){ failwith("png file open failed"); } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL); + NULL, NULL, NULL); /* (void *)user_error_ptr, user_error_fn, user_warning_fn); */ if( png_ptr == NULL ){ @@ -233,114 +259,150 @@ png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); + &interlace_type, NULL, NULL); + + if (oversized(width, height)){ + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fp); + failwith_oversized("png"); + } if ( color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { - png_set_gray_to_rgb(png_ptr); + color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) { + png_set_gray_to_rgb(png_ptr); } /* We have no support for 48bit depth colors yet */ if ( bit_depth == 16 ) png_set_strip_16(png_ptr); - /* We have no support for alphas yet */ - if ( color_type & PNG_COLOR_MASK_ALPHA ) png_set_strip_alpha(png_ptr); - + png_read_update_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); + &interlace_type, NULL, NULL); rowbytes = png_get_rowbytes(png_ptr, info_ptr); -/* -fprintf(stderr, "pngread.c: actual loading\n"); fflush(stderr); -*/ + // rowbytes * height should be the maximum malloc size in this function + if (oversized(rowbytes, height) || oversized(sizeof(png_bytep), height)){ + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fp); + failwith_oversized("png"); + } + { int i; png_bytep *row_pointers; + void *buf; char mesg[256]; - + + buf = stat_alloc(rowbytes * height); row_pointers = (png_bytep*)stat_alloc(sizeof(png_bytep) * height); + for(i=0; ijmpbuf)) { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fp); + /* If we get here, we had a problem reading the file */ + fprintf(stderr, "png short file\n"); + stat_free((void*)row_pointers); + stat_free(buf); + CAMLreturn(res); + } + png_read_image(png_ptr, row_pointers); + res = alloc_tuple(3); - if ( color_type == PNG_COLOR_TYPE_PALETTE ){ - png_colorp palette; - int num_palette; - int tag; + switch(color_type){ + case PNG_COLOR_TYPE_PALETTE: + + { + png_colorp palette; + int num_palette; + int tag; /* fprintf(stderr, "pngread.c: indexed image\n"); fflush(stderr); */ - png_get_PLTE( png_ptr, info_ptr, &palette, &num_palette ); - + png_get_PLTE( png_ptr, info_ptr, &palette, &num_palette ); + /* fprintf(stderr, "pngread.c: byte/pix= %d/%d\n", (int)(rowbytes), (int)width); fflush(stderr); */ - if ( rowbytes == width ){ - tag = PNG_TAG_INDEX8; - } else if ( rowbytes == width * 2 ){ - tag = PNG_TAG_INDEX8; - } else if ( rowbytes * 2 == width || rowbytes * 2 == width + 1 ) { - tag = PNG_TAG_INDEX4; - } else { - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - fclose(fp); - sprintf(mesg, "png error (unsupported bytes/pixel=%d/%d)", - (int)rowbytes, (int)width); - stat_free((void*)row_pointers); - failwith(mesg); - } + if ( rowbytes == width ){ + tag = PNG_TAG_INDEX8; + } else if ( rowbytes == width * 2 ){ + tag = PNG_TAG_INDEX8; + } else if ( rowbytes * 2 == width || rowbytes * 2 == width + 1 ) { + tag = PNG_TAG_INDEX4; + } else { + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fp); + sprintf(mesg, "png error (unsupported bytes/pixel=%d/%d)", + (int)rowbytes, (int)width); + stat_free(buf); + stat_free((void*)row_pointers); + failwith(mesg); + } + + r1 = alloc( 2, tag ); + r2 = alloc_tuple(height); + for( i = 0; i < height; i ++ ){ + tmp = caml_alloc_string(rowbytes); + memcpy(String_val(tmp), buf+rowbytes*i, rowbytes); + Store_field( r2, i, tmp ); + } + Store_field( r1, 0, r2 ); + Store_field( r1, 1, Val_PngPalette( palette, num_palette ) ); + + Store_field( res, 0, Val_int(width) ); + Store_field( res, 1, Val_int(height) ); + Store_field( res, 2, r1 ); - r1 = alloc( 2, tag ); - r2 = alloc_string( rowbytes * height ); - Store_field( r1, 0, r2 ); - Store_field( r1, 1, Val_PngPalette( palette, num_palette ) ); - - Store_field( res, 0, Val_int(width) ); - Store_field( res, 1, Val_int(height) ); - Store_field( res, 2, r1 ); + } + break; + case PNG_COLOR_TYPE_RGB: + case PNG_COLOR_TYPE_RGB_ALPHA: + /* + fprintf(stderr, "pngread.c: rgb image\n"); fflush(stderr); + fprintf(stderr, "width rowbytes: %d %d\n", width, rowbytes); fflush(stderr); + */ + r1 = alloc( 1, + color_type == PNG_COLOR_TYPE_RGB ? + PNG_TAG_RGB24 : PNG_TAG_RGBA32 ); + r2 = alloc_tuple( height ); for( i = 0; i < height; i ++ ){ - row_pointers[i] = String_val( r2 ) + rowbytes * i; + tmp = caml_alloc_string(rowbytes); + memcpy(String_val(tmp), buf+rowbytes*i, rowbytes); + Store_field( r2, i, tmp ); } - } else /* must be PNG_COLOR_TYPE_RGB */ { -/* -fprintf(stderr, "pngread.c: rgb image\n"); fflush(stderr); -*/ - r1 = alloc( 1, 0 ); - r2 = alloc_string( rowbytes * height ); Store_field( r1, 0, r2 ); - Store_field( res, 0, Val_int(width) ); Store_field( res, 1, Val_int(height) ); Store_field( res, 2, r1 ); + break; - for( i = 0; i < height; i ++ ){ - row_pointers[i] = String_val( r2 ) + rowbytes * i; - } - } - - /* Later, we can return something */ - if (setjmp(png_ptr->jmpbuf)) { - /* Free all of the memory associated with the png_ptr and info_ptr */ - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - fclose(fp); - /* If we get here, we had a problem reading the file */ - fprintf(stderr, "png short file\n"); + default: + sprintf(mesg, "png error (unsupported color_type=%d)", + (int)color_type); + stat_free(buf); stat_free((void*)row_pointers); - CAMLreturn(res); + failwith(mesg); } - png_read_image(png_ptr, row_pointers); - png_read_end(png_ptr, info_ptr); - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - + /* close the file */ fclose(fp); + stat_free(buf); stat_free((void*)row_pointers); - + CAMLreturn(res); } } diff -Nru camlimages-3.0.1/src/pngwrite.c camlimages-4.0.1/src/pngwrite.c --- camlimages-3.0.1/src/pngwrite.c 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/pngwrite.c 2011-06-22 20:04:32.000000000 +0200 @@ -11,6 +11,9 @@ /* Distributed only by permission. */ /* */ /***********************************************************************/ + +/* $Id: Exp */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -22,29 +25,32 @@ #include #include -value write_png_file_rgb24( name, buffer, width, height ) +value write_png_file_rgb( name, buffer, width, height, with_alpha ) value name; value buffer; value width; value height; + value with_alpha; { - CAMLparam4 ( name, buffer, width, height ); + CAMLparam5 ( name, buffer, width, height, with_alpha ); FILE *fp; png_structp png_ptr; png_infop info_ptr; int w, h; + int a; w = Int_val(width); h = Int_val(height); + a = Bool_val(with_alpha); if (( fp = fopen(String_val(name), "wb")) == NULL ){ failwith("png file open failed"); } if ((png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL)) == NULL ){ + NULL, NULL, NULL)) == NULL ){ fclose(fp); failwith("png_create_write_struct"); } @@ -68,21 +74,21 @@ png_init_io(png_ptr, fp); /* we use system default compression */ - /* png_set_filter( png_ptr, 0, PNG_FILTER_NONE | + /* png_set_filter( png_ptr, 0, PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_PAETH ); */ /* png_set_compression...() */ png_set_IHDR( png_ptr, info_ptr, w, h, - 8 /* fixed */, - PNG_COLOR_TYPE_RGB, /* fixed */ - PNG_INTERLACE_ADAM7, - PNG_COMPRESSION_TYPE_DEFAULT, - PNG_FILTER_TYPE_DEFAULT ); + 8 /* fixed */, + a ? PNG_COLOR_TYPE_RGB_ALPHA : PNG_COLOR_TYPE_RGB, /* fixed */ + PNG_INTERLACE_ADAM7, + PNG_COMPRESSION_TYPE_DEFAULT, + PNG_FILTER_TYPE_DEFAULT ); /* infos... */ png_write_info(png_ptr, info_ptr); - + { int rowbytes, i; png_bytep *row_pointers; @@ -92,12 +98,12 @@ rowbytes= png_get_rowbytes(png_ptr, info_ptr); #if 0 - printf("rowbytes= %d width=%d\n", rowbytes, w); + printf("rowbytes= %d width=%d\n", rowbytes, w); #endif for(i=0; i< h; i++){ row_pointers[i] = (png_bytep)(buf + rowbytes * i); } - + png_write_image(png_ptr, row_pointers); stat_free((void*)row_pointers); } @@ -114,7 +120,7 @@ { int i; - if( cmap == Atom(0) ){ + if( cmap == Atom(0) ){ *pltep = NULL; *lenp = 0; return; @@ -153,7 +159,7 @@ } if ((png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL)) == NULL ){ + NULL, NULL, NULL)) == NULL ){ fclose(fp); failwith("png_create_write_struct"); } @@ -177,16 +183,16 @@ png_init_io(png_ptr, fp); /* we use system default compression */ - /* png_set_filter( png_ptr, 0, PNG_FILTER_NONE | + /* png_set_filter( png_ptr, 0, PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_PAETH ); */ /* png_set_compression...() */ png_set_IHDR( png_ptr, info_ptr, w, h, - 8 /* fixed */, - PNG_COLOR_TYPE_PALETTE, /* fixed */ - PNG_INTERLACE_ADAM7, - PNG_COMPRESSION_TYPE_DEFAULT, - PNG_FILTER_TYPE_DEFAULT ); + 8 /* fixed */, + PNG_COLOR_TYPE_PALETTE, /* fixed */ + PNG_INTERLACE_ADAM7, + PNG_COMPRESSION_TYPE_DEFAULT, + PNG_FILTER_TYPE_DEFAULT ); { png_colorp palette; @@ -206,7 +212,7 @@ /* infos... */ png_write_info(png_ptr, info_ptr); - + { int rowbytes, i; png_bytep *row_pointers; @@ -216,7 +222,7 @@ rowbytes= png_get_rowbytes(png_ptr, info_ptr); #if 0 - printf("rowbytes= %d width=%d\n", rowbytes, w); + printf("rowbytes= %d width=%d\n", rowbytes, w); #endif if( rowbytes != w && rowbytes != w * 2 ){ @@ -228,7 +234,7 @@ for(i=0; i< h; i++){ row_pointers[i] = (png_bytep)(buf + rowbytes * i); } - + png_write_image(png_ptr, row_pointers); stat_free((void*)row_pointers); } diff -Nru camlimages-3.0.1/src/ppm.ml camlimages-4.0.1/src/ppm.ml --- camlimages-3.0.1/src/ppm.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/ppm.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: ppm.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: ppm.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) (* Manipulating images in portable format: PPM, PGM, and PBM. @@ -107,7 +107,7 @@ let check_header filename = let ic = open_in_bin filename in try - let mn, l, c = read_ppm_header ic in + let _mn, l, c = read_ppm_header ic in close_in ic; { header_width = c; header_height = l; @@ -130,7 +130,7 @@ let b = read_int ic in {r = r; g = g; b = b};; -let read_raw_ppm_ic ic l c max = +let read_raw_ppm_ic ic l c _max = let img = Rgb24.create c l in for i = 0 to l - 1 do for j = 0 to c - 1 do @@ -139,7 +139,7 @@ done; img;; -let read_ascii_ppm_ic ic l c max = +let read_ascii_ppm_ic ic l c _max = let img = Rgb24.create c l in for i = 0 to l - 1 do for j = 0 to c - 1 do @@ -240,7 +240,7 @@ (* Saving images. *) -let save_ppm_header img mn oc l c = +let save_ppm_header _img mn oc l c = output_string oc (Printf.sprintf "%s\n" (string_of_magic_number mn)); output_string oc "# CREATOR: CamlImages package\n"; output_string oc (Printf.sprintf "%d %d\n" c l); @@ -288,7 +288,7 @@ done; !has_transp;; -let save_ppm_oc img oc = +let save_ppm_oc img _oc = let l = img.Rgb24.height in if l = 0 then invalid_arg "save_ppm: invalid null line number"; let c = img.Rgb24.width in diff -Nru camlimages-3.0.1/src/ps.ml camlimages-4.0.1/src/ps.ml --- camlimages-3.0.1/src/ps.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/ps.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,7 +10,7 @@ (* *) (***********************************************************************) -(* $Id: ps.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: ps.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) open Images;; open Rgb24;; @@ -359,7 +359,7 @@ mono = false; };; -let save file options im = +let save file _options im = match im with | Rgb24 img -> super_save file default_conf true false [img] | _ -> raise Wrong_image_type;; diff -Nru camlimages-3.0.1/src/rgb24.ml camlimages-4.0.1/src/rgb24.ml --- camlimages-3.0.1/src/rgb24.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/rgb24.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,16 +12,16 @@ (* *) (***********************************************************************) -(* $Id: rgb24.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: rgb24.ml,v 1.7 2009/07/04 03:39:28 furuse Exp $ *) module E = struct open Color type t = Color.rgb let bytes_per_pixel = 3 let get str pos = - { r= int_of_char str.[pos ]; - g= int_of_char str.[pos + 1]; - b= int_of_char str.[pos + 2] } + { r = int_of_char str.[pos ]; + g = int_of_char str.[pos + 1]; + b = int_of_char str.[pos + 2] } let set str pos t = str.[pos ] <- char_of_int t.r; str.[pos + 1] <- char_of_int t.g; @@ -30,40 +30,50 @@ let str = String.create bytes_per_pixel in set str 0 t; str -end;; +end +;; module RI = Genimage.MakeRawImage(E);; type rawimage = RI.t;; type elt = Color.rgb;; type t = { width : int; - height : int; - rawimage : RI.t; - mutable infos : Info.info list };; + height : int; + rawimage : RI.t; + mutable infos : Info.info list } +;; module C = struct type rawimage = RI.t type container = t let rawimage x = x.rawimage let create_default width height rawimage = - { width= width; - height= height; + { width = width; + height = height; rawimage = rawimage; - infos= [] } - let create_duplicate src width height rawimage = - { width= width; - height= height; + infos = [] } + let create_duplicate src width height rawimage = + { width = width; + height = height; rawimage = rawimage; - infos= src.infos } -end;; + infos = src.infos } +end +;; module IMAGE = Genimage.Make(RI)(C);; let create_with width height infos data = - { width= width; - height= height; - rawimage= RI.create_with width height data; - infos= infos };; + { width = width; + height = height; + rawimage = RI.create_with width height data; + infos = infos } +;; + +let create_with_scanlines width height infos data = + { width = width; + height = height; + rawimage = RI.create_with_scanlines width height data; + infos = infos; };; let rawimage = C.rawimage;; let create = IMAGE.create;; @@ -73,6 +83,7 @@ let get_strip = IMAGE.get_strip;; let set_strip = IMAGE.set_strip;; let get_scanline = IMAGE.get_scanline;; +let get_scanline_ptr = IMAGE.get_scanline_ptr;; let set_scanline = IMAGE.set_scanline;; let unsafe_get = IMAGE.unsafe_get;; let unsafe_set = IMAGE.unsafe_set;; @@ -83,6 +94,8 @@ let sub = IMAGE.sub;; let blit = IMAGE.blit;; let map = IMAGE.map;; +let blocks = IMAGE.blocks;; +let dump_block = IMAGE.dump_block;; open Color;; @@ -90,16 +103,16 @@ (* good result for reducing *) let resize_reduce prog img nw nh = let newimage = create nw nh in - let xscale = float nw /. float img.width in - let yscale = float nh /. float img.height in - - let xs = Array.init nw (fun x -> + let xscale = float nw /. float img.width in + let yscale = float nh /. float img.height in + + let xs = Array.init nw (fun x -> let sx = truncate (float x /. xscale) in let ex = truncate ((float x +. 0.99) /. xscale) in let dx = ex - sx + 1 in (sx, ex, dx)) in - let ys = Array.init nh (fun y -> + let ys = Array.init nh (fun y -> let sy = truncate (float y /. yscale) in let ey = truncate ((float y +. 0.99) /. yscale) in let dy = ey - sy + 1 in @@ -109,35 +122,38 @@ let sx,ex,dx = xs.(x) in for y = 0 to nh - 1 do let sy,ey,dy = ys.(y) in - + let size = dx * dy in let sr = ref 0 and sg = ref 0 and sb = ref 0 in for xx = sx to ex do - for yy = sy to ey do - let c = unsafe_get img xx yy in - sr := !sr + c.r; - sg := !sg + c.g; - sb := !sb + c.b - done + for yy = sy to ey do + let c = unsafe_get img xx yy in + sr := !sr + c.r; + sg := !sg + c.g; + sb := !sb + c.b + done done; - unsafe_set newimage x y { r=(!sr/size); - g=(!sg/size); - b=(!sb/size) } + unsafe_set newimage x y { + r = !sr / size; + g = !sg / size; + b = !sb / size; + } done; match prog with - Some p -> p (float (x + 1) /. float nw) + | Some p -> p (float (x + 1) /. float nw) | None -> () done; - newimage;; + newimage +;; let resize_enlarge prog img nw nh = let newimage = create nw nh in - let xscale = float nw /. float img.width in - let yscale = float nh /. float img.height in + let xscale = float nw /. float img.width in + let yscale = float nh /. float img.height in let ww = truncate (ceil xscale) and wh = truncate (ceil yscale) @@ -146,52 +162,52 @@ let weight = Array.init ww (fun x -> Array.init wh (fun y -> - let x0 = x - ww / 2 - and y0 = y - wh / 2 in - let x1 = x0 + ww - 1 - and y1 = y0 + wh - 1 in - let a = Array.init 3 (fun xx -> - Array.init 3 (fun yy -> - let mx0 = (xx-1) * ww - and my0 = (yy-1) * wh in - let mx1 = mx0 + ww - 1 - and my1 = my0 + wh - 1 in - - let cx0 = if x0 < mx0 then mx0 else x0 in - let cy0 = if y0 < my0 then my0 else y0 in - let cx1 = if x1 > mx1 then mx1 else x1 in - let cy1 = if y1 > my1 then my1 else y1 in - - let dx = cx1 - cx0 + 1 - and dy = cy1 - cy0 + 1 - in - let dx = if dx < 0 then 0 else dx - and dy = if dy < 0 then 0 else dy - in - dx * dy)) - in a )) + let x0 = x - ww / 2 + and y0 = y - wh / 2 in + let x1 = x0 + ww - 1 + and y1 = y0 + wh - 1 in + let a = Array.init 3 (fun xx -> + Array.init 3 (fun yy -> + let mx0 = (xx - 1) * ww + and my0 = (yy - 1) * wh in + let mx1 = mx0 + ww - 1 + and my1 = my0 + wh - 1 in + + let cx0 = if x0 < mx0 then mx0 else x0 in + let cy0 = if y0 < my0 then my0 else y0 in + let cx1 = if x1 > mx1 then mx1 else x1 in + let cy1 = if y1 > my1 then my1 else y1 in + + let dx = cx1 - cx0 + 1 + and dy = cy1 - cy0 + 1 + in + let dx = if dx < 0 then 0 else dx + and dy = if dy < 0 then 0 else dy + in + dx * dy)) + in a )) in let wsum = Array.init ww (fun x -> Array.init wh (fun y -> - let sum = ref 0 in - Array.iter (Array.iter (fun w -> - sum := !sum + w)) weight.(x).(y); - if !sum = 0 then raise (Failure "resize_enlarge wsum"); - !sum)) + let sum = ref 0 in + Array.iter (Array.iter (fun w -> + sum := !sum + w)) weight.(x).(y); + if !sum = 0 then raise (Failure "resize_enlarge wsum"); + !sum)) in - let xs = Array.init img.width (fun x -> + let xs = Array.init img.width (fun x -> let sx = truncate (float x *. xscale) in - let ex = truncate (float (x+1) *. xscale) - 1 in + let ex = truncate (float (x + 1) *. xscale) - 1 in let dx = ex - sx + 1 in if dx > ww then raise (Failure "resize_enlarge"); (sx, ex, dx)) in - let ys = Array.init img.height (fun y -> + let ys = Array.init img.height (fun y -> let sy = truncate (float y *. yscale) in - let ey = truncate ((float (y+1)) *. yscale) - 1 in + let ey = truncate ((float (y + 1)) *. yscale) - 1 in let dy = ey - sy + 1 in if dy > wh then raise (Failure "resize_enlarge"); (sy, ey, dy)) @@ -199,63 +215,68 @@ let query c x y = if x < 0 || y < 0 || x >= img.width || y >= img.height then - c - else unsafe_get img x y + c + else unsafe_get img x y in - + for y = 0 to img.height - 1 do - let sy,ey,dy = ys.(y) in + let sy,_ey,dy = ys.(y) in + - for x = 0 to img.width - 1 do - let sx,ex,dx = xs.(x) in - + let sx,_ex,dx = xs.(x) in + let colors = - let c = unsafe_get img x y in - Array.init 3 (fun dx -> - Array.init 3 (fun dy -> - query c (x+dx-1) (y+dy-1))) + let c = unsafe_get img x y in + Array.init 3 (fun dx -> + Array.init 3 (fun dy -> + query c (x + dx - 1) (y + dy - 1))) in for xx = 0 to dx - 1 do - for yy = 0 to dy - 1 do - let sr = ref 0 - and sg = ref 0 - and sb = ref 0 - in - let weight = weight.(xx).(yy) in - let wsum = wsum.(xx).(yy) in - for xxx = 0 to 2 do - for yyy = 0 to 2 do - let c = colors.(xxx).(yyy) in - sr := !sr + c.r * weight.(xxx).(yyy); - sg := !sg + c.g * weight.(xxx).(yyy); - sb := !sb + c.b * weight.(xxx).(yyy); - done - done; - let r = !sr / wsum - and g = !sg / wsum - and b = !sb / wsum - in - unsafe_set newimage (sx + xx) (sy + yy) {r= r; g= g; b= b} - done + for yy = 0 to dy - 1 do + let sr = ref 0 + and sg = ref 0 + and sb = ref 0 + in + let weight = weight.(xx).(yy) in + let wsum = wsum.(xx).(yy) in + for xxx = 0 to 2 do + for yyy = 0 to 2 do + let c = colors.(xxx).(yyy) in + sr := !sr + c.r * weight.(xxx).(yyy); + sg := !sg + c.g * weight.(xxx).(yyy); + sb := !sb + c.b * weight.(xxx).(yyy); + done + done; + let r = !sr / wsum + and g = !sg / wsum + and b = !sb / wsum + in + unsafe_set newimage (sx + xx) (sy + yy) { + r = r; + g = g; + b = b; + } + done done done; match prog with - Some p -> p (float (y + 1) /. float img.height) + | Some p -> p (float (y + 1) /. float img.height) | None -> () done; - newimage;; + newimage +;; let resize prog img nw nh = - let xscale = float nw /. float img.width in - let yscale = float nh /. float img.height in + let xscale = float nw /. float img.width in + let yscale = float nh /. float img.height in if xscale >= 1.0 && yscale >= 1.0 then resize_enlarge prog img nw nh else if xscale <= 1.0 && yscale <= 1.0 then resize_reduce prog img nw nh else resize_reduce prog img nw nh - + (* let project prog img fill proj proj' smooth = if smooth < 0 then raise (Invalid_argument "project"); @@ -263,27 +284,27 @@ let w = 0.49 in let w' = 1.0 -. w in let topleft = proj (-. w) (-. w) in - let topright = proj (float (img.width-1) +. w) (-. w) in - let bottomleft = proj (-. w) (float (img.height-1) +. w) in - let bottomright = proj (float (img.width-1) +. w) (float (img.height-1) +. w) + let topright = proj (float (img.width - 1) +. w) (-. w) in + let bottomleft = proj (-. w) (float (img.height - 1) +. w) in + let bottomright = proj (float (img.width - 1) +. w) (float (img.height - 1) +. w) in - let minx, miny, maxx, maxy = - let minx = ref (fst topleft) + let minx, miny, maxx, maxy = + let minx = ref (fst topleft) and miny = ref (snd topleft) and maxx = ref (fst topleft) and maxy = ref (snd topleft) in let rec calc_bbox = function - | [] -> int_of_float (ceil (!minx +. w')), - int_of_float (ceil (!miny +. w')), - int_of_float (floor (!maxx -. w')), + | [] -> int_of_float (ceil (!minx +. w')), + int_of_float (ceil (!miny +. w')), + int_of_float (floor (!maxx -. w')), int_of_float (floor (!maxy -. w')) - | (x,y)::xs -> - if !minx > x then minx := x - else if !maxx < x then maxx := x; - if !miny > y then miny := y - else if !maxy < y then maxy := y; - calc_bbox xs + | (x,y)::xs -> + if !minx > x then minx := x + else if !maxx < x then maxx := x; + if !miny > y then miny := y + else if !maxy < y then maxy := y; + calc_bbox xs in calc_bbox [topright; bottomleft; bottomright] in @@ -300,25 +321,29 @@ and sb = ref 0 in for yy = 0 to scale - 1 do - for xx = 0 to scale - 1 do - let sx = float x -. 0.5 +. (float xx +. 0.5) /. float scale in - let sy = float y -. 0.5 +. (float yy +. 0.5) /. float scale in - let ox, oy = proj' sx sy in - let oxi = int_of_float (ox +. 0.5) - and oyi = int_of_float (oy +. 0.5) - in - let c = - try - get img oxi oyi - with - | Image.Out_of_image -> fill - in - sr := !sr + c.r; - sg := !sg + c.g; - sb := !sb + c.b; - done + for xx = 0 to scale - 1 do + let sx = float x -. 0.5 +. (float xx +. 0.5) /. float scale in + let sy = float y -. 0.5 +. (float yy +. 0.5) /. float scale in + let ox, oy = proj' sx sy in + let oxi = int_of_float (ox +. 0.5) + and oyi = int_of_float (oy +. 0.5) + in + let c = + try + get img oxi oyi + with + | Image.Out_of_image -> fill + in + sr := !sr + c.r; + sg := !sg + c.g; + sb := !sb + c.b; + done done; - unsafe_set dst x y {r= !sr/weight; g= !sb/weight; b= !sg/weight} + unsafe_set dst x y { + r = !sr / weight; + g = !sb / weight; + b = !sg / weight; + } done done; dst @@ -329,19 +354,22 @@ let rgba32 = Rgba32.create t.width t.height in for y = 0 to t.height - 1 do for x = 0 to t.width - 1 do - Rgba32.unsafe_set rgba32 x y - { color= unsafe_get t x y; - alpha= 255 } + Rgba32.unsafe_set rgba32 x y { + color = unsafe_get t x y; + alpha = 255; + } done done; - rgba32;; + rgba32 +;; let of_rgba32 t = let rgb24 = create t.Rgba32.width t.Rgba32.height in for y = 0 to t.Rgba32.height - 1 do for x = 0 to t.Rgba32.width - 1 do - unsafe_set rgb24 x y - (let { color= c } = Rgba32.unsafe_get t x y in c) + let { color = c } = Rgba32.unsafe_get t x y in + unsafe_set rgb24 x y c done done; - rgb24;; + rgb24 +;; diff -Nru camlimages-3.0.1/src/rgb24.mli camlimages-4.0.1/src/rgb24.mli --- camlimages-3.0.1/src/rgb24.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/rgb24.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: rgb24.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: rgb24.mli,v 1.6 2009/07/04 03:39:28 furuse Exp $ *) (* RGB 24 bit depth image format *) @@ -21,10 +21,13 @@ type rawimage;; (** Image type *) -type t = { width : int; - height : int; - rawimage : rawimage; - mutable infos : Info.info list };; +type t = { + width : int; + height : int; + rawimage : rawimage; + mutable infos : Info.info list; +} +;; val resize : (float -> unit) option -> t -> int -> int -> t;; (* [resize progress t w h] creates a resized image of [t] with size [w]x[h]. @@ -39,6 +42,7 @@ (* Please read the comments of IMAGE in genimage.mli *) val create_with : int -> int -> Info.info list -> string -> t;; +val create_with_scanlines : int -> int -> Info.info list -> string array -> t;; val create : int -> int -> t;; val make : int -> int -> elt -> t;; val destroy : t -> unit;; @@ -49,10 +53,14 @@ val get_strip : t -> int -> int -> int -> string;; val set_strip : t -> int -> int -> int -> string -> unit;; val get_scanline : t -> int -> string;; +val get_scanline_ptr : t -> (int -> (string * int) * int) option;; val set_scanline : t -> int -> string -> unit;; val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit;; val map : (elt -> elt -> elt) -> - t -> int -> int -> t -> int -> int -> int -> int -> unit;; + t -> int -> int -> t -> int -> int -> int -> int -> unit +;; +val blocks : t -> int * int +val dump_block : t -> int -> int -> Bitmap.Block.t val copy : t -> t;; val sub : t -> int -> int -> int -> int -> t;; val dump : t -> string;; diff -Nru camlimages-3.0.1/src/rgba32.ml camlimages-4.0.1/src/rgba32.ml --- camlimages-3.0.1/src/rgba32.ml 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/rgba32.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: rgba32.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: rgba32.ml,v 1.5 2009/07/04 03:39:28 furuse Exp $ *) module E = struct open Color @@ -70,6 +70,12 @@ rawimage = RI.create_with width height data; infos = infos; };; +let create_with_scanlines width height infos data = + { width = width; + height = height; + rawimage = RI.create_with_scanlines width height data; + infos = infos; };; + let rawimage = C.rawimage;; let create = IMAGE.create;; let make = IMAGE.make;; @@ -88,6 +94,8 @@ let sub = IMAGE.sub;; let blit = IMAGE.blit;; let map = IMAGE.map;; +let blocks = IMAGE.blocks;; +let dump_block = IMAGE.dump_block;; open Color;; @@ -200,10 +208,10 @@ for y = 0 to img.height - 1 do - let sy, ey, dy = ys.(y) in + let sy, _ey, dy = ys.(y) in for x = 0 to img.width - 1 do - let sx, ex, dx = xs.(x) in + let sx, _ex, dx = xs.(x) in let colors = let c = unsafe_get img x y in diff -Nru camlimages-3.0.1/src/rgba32.mli camlimages-4.0.1/src/rgba32.mli --- camlimages-3.0.1/src/rgba32.mli 2006-11-28 17:43:28.000000000 +0200 +++ camlimages-4.0.1/src/rgba32.mli 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: rgba32.mli,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) +(* $Id: rgba32.mli,v 1.5 2009/07/04 03:39:28 furuse Exp $ *) (** RGBA 32 bit depth image format *) @@ -34,7 +34,7 @@ a float from 0 to 1.0. *) (** Generic functions *) -(** Please read the comments of IMAGE in genimage.mli *) +(** Please read the comments of module [IMAGE] in file [genimage.mli]. *) val dump : t -> string;; val unsafe_access : t -> int -> int -> string * int;; @@ -50,7 +50,10 @@ val blit : t -> int -> int -> t -> int -> int -> int -> int -> unit;; val map : (elt -> elt -> elt) -> t -> int -> int -> t -> int -> int -> int -> int -> unit;; +val blocks : t -> int * int +val dump_block : t -> int -> int -> Bitmap.Block.t val create_with : int -> int -> Info.info list -> string -> t;; +val create_with_scanlines : int -> int -> Info.info list -> string array -> t;; val create : int -> int -> t;; val make : int -> int -> elt -> t;; val copy : t -> t;; diff -Nru camlimages-3.0.1/src/tiff.ml camlimages-4.0.1/src/tiff.ml --- camlimages-3.0.1/src/tiff.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/tiff.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: tiff.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: tiff.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) open Images;; open Rgb24;; @@ -39,7 +39,7 @@ let load name opts = let prog = Images.load_progress opts in - let w, h, dpi, colormodel, tif = open_in name in + let w, h, _dpi, colormodel, tif = open_in name in let img, buf = match colormodel with | RGB -> @@ -89,7 +89,7 @@ close_in tif; img;; -let save name opts image = +let save name _opts image = match image with | Rgb24 bmp -> let resolution = (* resolution in DPI *) diff -Nru camlimages-3.0.1/src/tiff_na.c camlimages-4.0.1/src/tiff_na.c --- camlimages-3.0.1/src/tiff_na.c 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/tiff_na.c 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,24 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt */ +/* Pierre Weis, projet Cristal, INRIA Rocquencourt */ +/* Jun Furuse, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1999,2000 */ +/* Institut National de Recherche en Informatique et en Automatique. */ +/* Distributed only by permission. */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include + +value open_tiff_file_for_read(){ failwith("unsupported"); } +value read_tiff_scanline(){ failwith("unsupported"); } +value close_tiff_file(){ failwith("unsupported"); } +value open_tiff_file_for_write(){ failwith("unsupported"); } +value write_tiff_scanline(){ failwith("unsupported"); } diff -Nru camlimages-3.0.1/src/tiffread.c camlimages-4.0.1/src/tiffread.c --- camlimages-3.0.1/src/tiffread.c 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/tiffread.c 2011-06-22 20:04:32.000000000 +0200 @@ -21,6 +21,8 @@ #include #include +#include "oversized.h" + /* These are defined in caml/config.h */ #define int16 int16tiff #define uint16 uint16tiff @@ -64,6 +66,10 @@ TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres); TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric); + if (oversized (imagewidth, imagelength)) { + failwith_oversized("tiff"); + } + if( imagesample == 3 && photometric == PHOTOMETRIC_RGB ){ if( imagebits != 8 ){ failwith("Sorry, tiff rgb file must be 24bit-color"); diff -Nru camlimages-3.0.1/src/units.ml camlimages-4.0.1/src/units.ml --- camlimages-3.0.1/src/units.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/units.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,38 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* François Pessaux, projet Cristal, INRIA Rocquencourt *) +(* Pierre Weis, projet Cristal, INRIA Rocquencourt *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: units.ml,v 1.1 2006/11/28 15:43:28 rousse Exp $ *) + +let inch_cm = 2.54;; +let inch_pt = 72.0;; + +let units = [ + "mm", 0.1 /. inch_cm *. inch_pt; + "cm", 1.0 /. inch_cm *. inch_pt; + "pt", 1.0; + "in", inch_pt; + ];; + +let parse_length s = (* return in pt *) + let v = + let l = String.length s in + let digit,unit = + if l > 2 then String.sub s 0 2, String.sub s (l-2) 2 else "", "" in + try + (List.assoc (String.lowercase unit) units) *. float_of_string digit + with + | Not_found -> (* think it is in "pt" *) + float_of_string s in + prerr_endline (Printf.sprintf "%s -> %fpt" s v); + v;; diff -Nru camlimages-3.0.1/src/unsupported.pl camlimages-4.0.1/src/unsupported.pl --- camlimages-3.0.1/src/unsupported.pl 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/unsupported.pl 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,28 @@ +#!/usr/bin/perl + +print "/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt */ +/* Pierre Weis, projet Cristal, INRIA Rocquencourt */ +/* Jun Furuse, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1999,2000 */ +/* Institut National de Recherche en Informatique et en Automatique. */ +/* Distributed only by permission. */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include + +"; + +while(<>){ + if ( /value +([^\(]+)\(/ ) { + print "value $1(){ failwith(\"unsupported\"); }\n"; + } +} diff -Nru camlimages-3.0.1/src/ximage2.ml camlimages-4.0.1/src/ximage2.ml --- camlimages-3.0.1/src/ximage2.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/ximage2.ml 2011-06-22 20:04:32.000000000 +0200 @@ -10,199 +10,7 @@ (* *) (***********************************************************************) -(* $Id: ximage2.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $*) - -open Images;; -type elt = int;; (* must be int32, but lablgtk uses int *) - -type t = { - width: int; - height: int; - data : Gdk.image; - };; - -let destroy t = Gdk.Image.destroy t.data;; - -module Truecolor = struct - (* Truecolor quick color query *) - open Gdk.Truecolor - - let color_creator visual = - let f = color_creator visual in - fun rgb -> f ~red:(rgb.r * 257) ~green:(rgb.g * 257) ~blue:(rgb.b * 257) - - let color_parser visual = - let f = color_parser visual in - fun pixel -> - let r, g, b = f pixel in - { r = r lsr 8; g = g lsr 8; b = b lsr 8 } -end;; - -let capsulate width height data = { - width = width; - height = height; - data = data; -};; - -let create ~kind ~visual ~width ~height = - let ximage = Gdk.Image.create ~kind ~visual ~width ~height in - capsulate width height ximage;; - -let unsafe_get t x y = Gdk.Image.get_pixel t.data ~x ~y;; -let unsafe_set t x y c = Gdk.Image.put_pixel t.data ~x ~y ~pixel:c;; -let get t x y = Region.check t.width t.height x y; unsafe_get t x y;; -let set t x y c = Region.check t.width t.height x y; unsafe_set t x y c;; - -let get_image drawable ~x ~y ~width ~height = - let ximage = Gdk.Image.get drawable ~x ~y ~width ~height in - capsulate width height ximage;; - -(* -external init_color_conversion : Gdk.visual -> unit - = "init_color_conversion" -external color_conversion : string -> int -> int - = "color_conversion" -*) - -let of_image visual progress img = - let quick_color_create = Truecolor.color_creator visual in - let prog v (* 0.0 .. 1.0 *) = - match progress with - | Some f -> f v - | None -> () in - let put_rgb ximg x y rgb = - Gdk.Image.put_pixel ximg.data ~x ~y ~pixel:(quick_color_create rgb) in -(* - let put_rgb24 ximg img x y = - let data,pos = Rgb24.unsafe_get_raw img x y in - Gdk.Image.put_pixel ximg.data ~x ~y - ~pixel:(color_conversion data pos) in -*) - match img with - | Rgb24 t -> - let width = t.Rgb24.width in - let height = t.Rgb24.height in - let ximg = create ~kind: `FASTEST ~visual ~width ~height in - let f_height = float height in - for y = 0 to height - 1 do - for x = 0 to width - 1 do put_rgb ximg x y (Rgb24.unsafe_get t x y) done; - prog (float (y + 1) /. f_height) - done; - ximg - - | Rgba32 t -> (* ignore alpha *) - let width = t.Rgba32.width in - let height = t.Rgba32.height in - let ximg = create ~kind: `FASTEST ~visual ~width ~height in - let f_height = float height in - for y = 0 to height - 1 do - for x = 0 to width - 1 do - put_rgb ximg x y (Rgba32.unsafe_get t x y).color - done; - prog (float (y + 1) /. f_height) - done; - ximg - - | Index8 t -> - let width = t.Index8.width in - let height = t.Index8.height in - let cmap = t.Index8.colormap.map in - let ximg = create ~kind: `FASTEST ~visual ~width ~height in - let f_height = float height in - let xcmap = Array.map quick_color_create cmap in - for y = 0 to height - 1 do - for x = 0 to width - 1 do - Gdk.Image.put_pixel ximg.data x y xcmap.(Index8.unsafe_get t x y) - done; - prog (float (y + 1) /. f_height) - done; - ximg - - | Index16 t -> - let width = t.Index16.width in - let height = t.Index16.height in - let cmap = t.Index16.colormap.map in - let ximg = create ~kind: `FASTEST ~visual ~width ~height in - let f_height = float height in - let xcmap = Array.map quick_color_create cmap in - for y = 0 to height - 1 do - for x = 0 to width - 1 do - Gdk.Image.put_pixel ximg.data x y xcmap.(Index16.unsafe_get t x y) - done; - prog (float (y + 1) /. f_height) - done; - ximg - - | _ -> failwith "not supported";; - -open GDraw;; - -let get_mono_gc win = - let colormap = Gdk.Color.get_system_colormap () in - let bmp = Gdk.Bitmap.create ~window:win ~width:1 ~height: 1 () in - let gc = Gdk.GC.create bmp in - (* GC.set_foreground gc (Color.color_parse "black"); *) - Gdk.GC.set_foreground gc (Gdk.Color.alloc ~colormap: colormap `WHITE); - gc;; - -let plain_mask win w h = - let colormap = Gdk.Color.get_system_colormap () in - let mono_gc = get_mono_gc win in - let bmp = Gdk.Bitmap.create ~window:win ~width:w ~height:h () in - Gdk.GC.set_foreground mono_gc (Gdk.Color.alloc ~colormap: colormap `WHITE); - Gdk.Draw.rectangle bmp mono_gc ~x:0 ~y:0 ~width:w ~height:h ~filled: true (); - bmp;; - -let mask_of_image win img = (* It is really inefficient *) - let mono_gc = get_mono_gc win in - let width, height = Images.size img in - let draw_mask t transp image_get = - prerr_endline "making mask"; - let bmp = Gdk.Bitmap.create ~window:win ~width ~height () in - let ximg = get_image bmp ~x:0 ~y:0 ~width ~height in - for x = 0 to width - 1 do - for y = 0 to height - 1 do - if image_get t x y = transp - then Gdk.Image.put_pixel ximg.data ~x ~y ~pixel: 0 - else Gdk.Image.put_pixel ximg.data ~x ~y ~pixel: 1 - done; - done; - Gdk.Draw.image bmp mono_gc ximg.data - ~xsrc:0 ~ysrc:0 ~xdest:0 ~ydest:0 ~width ~height; - Some bmp in - - (* BUG ? of gtk or lablgtk? Using None for mask does not work *) - let width, height = Images.size img in - begin match img with - | Index8 t -> - if t.Index8.transparent >= 0 - then draw_mask t t.Index8.transparent Index8.unsafe_get - else Some (plain_mask win width height) - | Index16 t -> - if t.Index16.transparent >= 0 - then draw_mask t t.Index16.transparent Index16.unsafe_get - else Some (plain_mask win width height) - | _ -> - Some (plain_mask win width height) - end;; - -let pixmap_of win ximage = - let visual = Gdk.Window.get_visual win in - let pix = - Gdk.Pixmap.create ~window: win - ~depth: (Gdk.Visual.depth visual) - ~width: ximage.width ~height: ximage.height () in - let pixmap = new drawable pix in - pixmap#put_image ~x:0 ~y:0 - ~width: ximage.width ~height: ximage.height - ~xsrc:0 ~ysrc:0 - ximage.data; - pix;; - -let pixmap_of_image win progress img = - let visual = Gdk.Window.get_visual win in - let ximage = of_image visual progress img in - let msk = mask_of_image win img in - let pixmap = new GDraw.pixmap ?mask: msk (pixmap_of win ximage) in - pixmap;; +(* $Id: ximage2.ml,v 1.5.2.1 2010/05/13 13:14:47 furuse Exp $*) +(* This module is for backward compatibility *) +include Ximage diff -Nru camlimages-3.0.1/src/ximage2.mli camlimages-4.0.1/src/ximage2.mli --- camlimages-3.0.1/src/ximage2.mli 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/ximage2.mli 1970-01-01 02:00:00.000000000 +0200 @@ -1,57 +0,0 @@ -(***********************************************************************) -(* *) -(* Objective Caml *) -(* *) -(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1999-2004, *) -(* Institut National de Recherche en Informatique et en Automatique. *) -(* Distributed only by permission. *) -(* *) -(***********************************************************************) - -(* $Id: Exp *) - -open Images;; - -type elt = int;; (* must be int32, but lablgtk uses int *) - -(** ximage data structure with size information *) - -type t = { - width: int; - height: int; - data : Gdk.image; -};; - -val destroy : t -> unit;; -(** You need manual destroy *) - -val create : - kind:Gdk.Image.image_type -> visual:Gdk.visual -> - width: int -> height: int -> t;; -(** Same as Gdk.Image.create, but with size info *) - -val unsafe_get : t -> int -> int -> elt;; -val unsafe_set : t -> int -> int -> elt -> unit;; -val get : t -> int -> int -> elt;; -val set : t -> int -> int -> elt -> unit;; - -val get_image : [>`drawable] Gobject.obj -> x:int -> y:int -> - width:int -> height:int -> t -(* Same as Gdk.Image.get, but with size info *) - -val of_image : Gdk.visual -> (float -> unit) option -> Images.t -> t;; - -val get_mono_gc : Gdk.window -> Gdk.gc;; -val plain_mask : Gdk.window -> int -> int -> Gdk.bitmap;; -val pixmap_of : Gdk.window -> t -> Gdk.pixmap;; - -val mask_of_image : Gdk.window -> Images.t -> Gdk.bitmap option;; -val pixmap_of_image : - Gdk.window -> (float -> unit) option -> Images.t -> GDraw.pixmap;; - -module Truecolor : sig - val color_creator : Gdk.visual -> Images.rgb -> int - val color_parser : Gdk.visual -> int -> Images.rgb -end;; diff -Nru camlimages-3.0.1/src/ximage.ml camlimages-4.0.1/src/ximage.ml --- camlimages-3.0.1/src/ximage.ml 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/ximage.ml 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,204 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: ximage.ml,v 1.1.2.1 2010/05/13 13:14:47 furuse Exp $*) + +open Images;; +type elt = int;; (* must be int32, but lablgtk uses int *) + +type t = { + width: int; + height: int; + data : Gdk.image; + };; + +let destroy t = Gdk.Image.destroy t.data;; + +module Truecolor = struct + (* Truecolor quick color query *) + open Gdk.Truecolor + + let color_creator visual = + let f = color_creator visual in + fun rgb -> f ~red:(rgb.r * 257) ~green:(rgb.g * 257) ~blue:(rgb.b * 257) + + let color_parser visual = + let f = color_parser visual in + fun pixel -> + let r, g, b = f pixel in + { r = r lsr 8; g = g lsr 8; b = b lsr 8 } +end;; + +let capsulate width height data = { + width = width; + height = height; + data = data; +};; + +let create ~kind ~visual ~width ~height = + let ximage = Gdk.Image.create ~kind ~visual ~width ~height in + capsulate width height ximage;; + +let unsafe_get t x y = Gdk.Image.get_pixel t.data ~x ~y;; +let unsafe_set t x y c = Gdk.Image.put_pixel t.data ~x ~y ~pixel:c;; +let get t x y = Region.check t.width t.height x y; unsafe_get t x y;; +let set t x y c = Region.check t.width t.height x y; unsafe_set t x y c;; + +let get_image drawable ~x ~y ~width ~height = + let ximage = Gdk.Image.get drawable ~x ~y ~width ~height in + capsulate width height ximage;; + +(* +external init_color_conversion : Gdk.visual -> unit + = "init_color_conversion" +external color_conversion : string -> int -> int + = "color_conversion" +*) + +let of_image visual progress img = + let quick_color_create = Truecolor.color_creator visual in + let prog v (* 0.0 .. 1.0 *) = + match progress with + | Some f -> f v + | None -> () in + let put_rgb ximg x y rgb = + Gdk.Image.put_pixel ximg.data ~x ~y ~pixel:(quick_color_create rgb) + in + match img with + | Rgb24 t -> + let width = t.Rgb24.width in + let height = t.Rgb24.height in + let ximg = create ~kind: `FASTEST ~visual ~width ~height in + let f_height = float height in + for y = 0 to height - 1 do + for x = 0 to width - 1 do + put_rgb ximg x y (Rgb24.unsafe_get t x y) done; + prog (float (y + 1) /. f_height) + done; + ximg + + | Rgba32 t -> (* ignore alpha *) + let width = t.Rgba32.width in + let height = t.Rgba32.height in + let ximg = create ~kind: `FASTEST ~visual ~width ~height in + let f_height = float height in + for y = 0 to height - 1 do + for x = 0 to width - 1 do + put_rgb ximg x y (Rgba32.unsafe_get t x y).color + done; + prog (float (y + 1) /. f_height) + done; + ximg + + | Index8 t -> + let width = t.Index8.width in + let height = t.Index8.height in + let cmap = t.Index8.colormap.map in + let ximg = create ~kind: `FASTEST ~visual ~width ~height in + let f_height = float height in + let xcmap = Array.map quick_color_create cmap in + for y = 0 to height - 1 do + for x = 0 to width - 1 do + Gdk.Image.put_pixel ximg.data ~x ~y ~pixel:xcmap.(Index8.unsafe_get t x y) + done; + prog (float (y + 1) /. f_height) + done; + ximg + + | Index16 t -> + let width = t.Index16.width in + let height = t.Index16.height in + let cmap = t.Index16.colormap.map in + let ximg = create ~kind: `FASTEST ~visual ~width ~height in + let f_height = float height in + let xcmap = Array.map quick_color_create cmap in + for y = 0 to height - 1 do + for x = 0 to width - 1 do + Gdk.Image.put_pixel ximg.data ~x ~y ~pixel:xcmap.(Index16.unsafe_get t x y) + done; + prog (float (y + 1) /. f_height) + done; + ximg + + | _ -> failwith "not supported";; + +open GDraw;; + +let get_mono_gc win = + let colormap = Gdk.Color.get_system_colormap () in + let bmp = Gdk.Bitmap.create ~window:win ~width:1 ~height: 1 () in + let gc = Gdk.GC.create bmp in + (* GC.set_foreground gc (Color.color_parse "black"); *) + Gdk.GC.set_foreground gc (Gdk.Color.alloc ~colormap: colormap `WHITE); + gc;; + +let plain_mask win w h = + let colormap = Gdk.Color.get_system_colormap () in + let mono_gc = get_mono_gc win in + let bmp = Gdk.Bitmap.create ~window:win ~width:w ~height:h () in + Gdk.GC.set_foreground mono_gc (Gdk.Color.alloc ~colormap: colormap `WHITE); + Gdk.Draw.rectangle bmp mono_gc ~x:0 ~y:0 ~width:w ~height:h ~filled: true (); + bmp;; + +let mask_of_image win img = (* It is really inefficient *) + let mono_gc = get_mono_gc win in + let width, height = Images.size img in + let draw_mask t transp image_get = + prerr_endline "making mask"; + let bmp = Gdk.Bitmap.create ~window:win ~width ~height () in + let ximg = get_image bmp ~x:0 ~y:0 ~width ~height in + for x = 0 to width - 1 do + for y = 0 to height - 1 do + if image_get t x y = transp + then Gdk.Image.put_pixel ximg.data ~x ~y ~pixel: 0 + else Gdk.Image.put_pixel ximg.data ~x ~y ~pixel: 1 + done; + done; + Gdk.Draw.image bmp mono_gc ximg.data + ~xsrc:0 ~ysrc:0 ~xdest:0 ~ydest:0 ~width ~height; + Some bmp in + + (* BUG ? of gtk or lablgtk? Using None for mask does not work *) + let width, height = Images.size img in + begin match img with + | Index8 t -> + if t.Index8.transparent >= 0 + then draw_mask t t.Index8.transparent Index8.unsafe_get + else Some (plain_mask win width height) + | Index16 t -> + if t.Index16.transparent >= 0 + then draw_mask t t.Index16.transparent Index16.unsafe_get + else Some (plain_mask win width height) + | _ -> + Some (plain_mask win width height) + end;; + +let pixmap_of win ximage = + let visual = Gdk.Window.get_visual win in + let pix = + Gdk.Pixmap.create ~window: win + ~depth: (Gdk.Visual.depth visual) + ~width: ximage.width ~height: ximage.height () in + let pixmap = new drawable pix in + pixmap#put_image ~x:0 ~y:0 + ~width: ximage.width ~height: ximage.height + ~xsrc:0 ~ysrc:0 + ximage.data; + pix;; + +let pixmap_of_image win progress img = + let visual = Gdk.Window.get_visual win in + let ximage = of_image visual progress img in + let msk = mask_of_image win img in + let pixmap = new GDraw.pixmap ?mask: msk (pixmap_of win ximage) in + pixmap;; + diff -Nru camlimages-3.0.1/src/ximage.mli camlimages-4.0.1/src/ximage.mli --- camlimages-3.0.1/src/ximage.mli 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/ximage.mli 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,57 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999-2004, *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) + +(* $Id: Exp *) + +open Images;; + +type elt = int;; (* must be int32, but lablgtk uses int *) + +(** ximage data structure with size information *) + +type t = { + width: int; + height: int; + data : Gdk.image; +};; + +val destroy : t -> unit;; +(** You need manual destroy *) + +val create : + kind:Gdk.Image.image_type -> visual:Gdk.visual -> + width: int -> height: int -> t;; +(** Same as Gdk.Image.create, but with size info *) + +val unsafe_get : t -> int -> int -> elt;; +val unsafe_set : t -> int -> int -> elt -> unit;; +val get : t -> int -> int -> elt;; +val set : t -> int -> int -> elt -> unit;; + +val get_image : [>`drawable] Gobject.obj -> x:int -> y:int -> + width:int -> height:int -> t +(* Same as Gdk.Image.get, but with size info *) + +val of_image : Gdk.visual -> (float -> unit) option -> Images.t -> t;; + +val get_mono_gc : Gdk.window -> Gdk.gc;; +val plain_mask : Gdk.window -> int -> int -> Gdk.bitmap;; +val pixmap_of : Gdk.window -> t -> Gdk.pixmap;; + +val mask_of_image : Gdk.window -> Images.t -> Gdk.bitmap option;; +val pixmap_of_image : + Gdk.window -> (float -> unit) option -> Images.t -> GDraw.pixmap;; + +module Truecolor : sig + val color_creator : Gdk.visual -> Images.rgb -> int + val color_parser : Gdk.visual -> int -> Images.rgb +end;; diff -Nru camlimages-3.0.1/src/xpm.ml camlimages-4.0.1/src/xpm.ml --- camlimages-3.0.1/src/xpm.ml 2007-01-18 12:29:57.000000000 +0200 +++ camlimages-4.0.1/src/xpm.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: xpm.ml,v 1.1 2007/01/18 10:29:57 rousse Exp $ *) +(* $Id: xpm.ml,v 1.2 2008/06/16 22:35:42 furuse Exp $ *) open Images;; open Index8;; @@ -21,7 +21,7 @@ external read : string -> int * int * string array * int array = "read_xpm_file";; -let load file opts = +let load file _opts = let w, h, cmap, imap = read file in let cmap, transparent = colormap_parse cmap in (* if the colors <= 256 then we create index8, diff -Nru camlimages-3.0.1/src/xpm_na.c camlimages-4.0.1/src/xpm_na.c --- camlimages-3.0.1/src/xpm_na.c 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/src/xpm_na.c 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,20 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt */ +/* Pierre Weis, projet Cristal, INRIA Rocquencourt */ +/* Jun Furuse, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1999,2000 */ +/* Institut National de Recherche en Informatique et en Automatique. */ +/* Distributed only by permission. */ +/* */ +/***********************************************************************/ + +#include +#include +#include +#include + +value read_xpm_file(){ failwith("unsupported"); } diff -Nru camlimages-3.0.1/test/.cvsignore camlimages-4.0.1/test/.cvsignore --- camlimages-3.0.1/test/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/test/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,6 @@ +test +test.byt +test.opt +out.image +Makefile +Makefile.in diff -Nru camlimages-3.0.1/test/images/.cvsignore camlimages-4.0.1/test/images/.cvsignore --- camlimages-3.0.1/test/images/.cvsignore 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/test/images/.cvsignore 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1 @@ +.xvpics Binary files /tmp/hEwmxNGC8b/camlimages-3.0.1/test/images/png-alpha.png and /tmp/rguOvHQvP7/camlimages-4.0.1/test/images/png-alpha.png differ diff -Nru camlimages-3.0.1/test/Makefile.am camlimages-4.0.1/test/Makefile.am --- camlimages-3.0.1/test/Makefile.am 2007-05-21 20:54:33.000000000 +0200 +++ camlimages-4.0.1/test/Makefile.am 1970-01-01 02:00:00.000000000 +0200 @@ -1,54 +0,0 @@ -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:22 rousse Exp $ *) - -OCAMLSOURCES = test.ml - -TESTS = -check_PROGRAMS = -if BUILD_NATIVE -check_PROGRAMS += test.opt -TESTS += test.opts -endif -if BUILD_BYTECODE -check_PROGRAMS += test.byt -TESTS += test.byt -endif - -test_opt_SOURCES = $(OCAMLSOURCES) -test_byt_SOURCES = $(OCAMLSOURCES) - -include ../Makefile.variables - -EXTRA_DIST = images micap.ttf - -CLEANFILES += out.image - -test.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o test.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -test.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o test.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -dist-hook: - rm -rf $(distdir)/images/CVS - rm -f $(distdir)/images/.cvsignore - - -include ../Makefile.rules diff -Nru camlimages-3.0.1/test/Makefile.in camlimages-4.0.1/test/Makefile.in --- camlimages-3.0.1/test/Makefile.in 2007-10-11 10:50:44.000000000 +0200 +++ camlimages-4.0.1/test/Makefile.in 1970-01-01 02:00:00.000000000 +0200 @@ -1,550 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.am,v 1.6 2007/02/20 21:19:22 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.variables,v 1.8 2007/02/09 10:15:06 rousse Exp $ *) - -#*********************************************************************# -# # -# Caml Images # -# # -# François Pessaux, projet Cristal, INRIA Rocquencourt # -# Pierre Weis, projet Cristal, INRIA Rocquencourt # -# Jun Furuse, projet Cristal, INRIA Rocquencourt # -# # -# Copyright 1999-2004, # -# Institut National de Recherche en Informatique et en Automatique. # -# Distributed only by permission. # -# # -#*********************************************************************# - -#(* $Id: Makefile.rules,v 1.22 2007/02/08 07:52:20 rousse Exp $ *) -SOURCES = $(test_byt_SOURCES) $(test_opt_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -@BUILD_NATIVE_TRUE@am__append_1 = test.opt -@BUILD_NATIVE_TRUE@am__append_2 = test.opts -@BUILD_BYTECODE_TRUE@am__append_3 = test.byt -@BUILD_BYTECODE_TRUE@am__append_4 = test.byt -DIST_COMMON = $(srcdir)/../Makefile.rules \ - $(srcdir)/../Makefile.variables $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -@HAVE_LABLGTK2_TRUE@am__append_5 = -I $(LABLGTK2DIR) -@HAVE_LABLGTK2_TRUE@am__append_6 = lablgtk.cma -@HAVE_LABLGTK_TRUE@am__append_7 = -I $(LABLGTKDIR) -@HAVE_LABLGTK_TRUE@am__append_8 = lablgtk.cma -subdir = test -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/./ocaml.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@BUILD_NATIVE_TRUE@am__EXEEXT_1 = test.opt$(EXEEXT) -@BUILD_BYTECODE_TRUE@am__EXEEXT_2 = test.byt$(EXEEXT) -am__objects_1 = -am_test_byt_OBJECTS = $(am__objects_1) -test_byt_OBJECTS = $(am_test_byt_OBJECTS) -test_byt_LDADD = $(LDADD) -am_test_opt_OBJECTS = $(am__objects_1) -test_opt_OBJECTS = $(am_test_opt_OBJECTS) -test_opt_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(test_byt_SOURCES) $(test_opt_SOURCES) -DIST_SOURCES = $(test_byt_SOURCES) $(test_opt_SOURCES) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_BYTECODE_FALSE = @BUILD_BYTECODE_FALSE@ -BUILD_BYTECODE_TRUE = @BUILD_BYTECODE_TRUE@ -BUILD_NATIVE_FALSE = @BUILD_NATIVE_FALSE@ -BUILD_NATIVE_TRUE = @BUILD_NATIVE_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FREETYPE_CONFIG = @FREETYPE_CONFIG@ -GS = @GS@ -HAVE_FREETYPE_FALSE = @HAVE_FREETYPE_FALSE@ -HAVE_FREETYPE_TRUE = @HAVE_FREETYPE_TRUE@ -HAVE_GIF_FALSE = @HAVE_GIF_FALSE@ -HAVE_GIF_TRUE = @HAVE_GIF_TRUE@ -HAVE_JPEG_FALSE = @HAVE_JPEG_FALSE@ -HAVE_JPEG_TRUE = @HAVE_JPEG_TRUE@ -HAVE_LABLGTK2_FALSE = @HAVE_LABLGTK2_FALSE@ -HAVE_LABLGTK2_TRUE = @HAVE_LABLGTK2_TRUE@ -HAVE_LABLGTK_FALSE = @HAVE_LABLGTK_FALSE@ -HAVE_LABLGTK_TRUE = @HAVE_LABLGTK_TRUE@ -HAVE_PNG_FALSE = @HAVE_PNG_FALSE@ -HAVE_PNG_TRUE = @HAVE_PNG_TRUE@ -HAVE_PS_FALSE = @HAVE_PS_FALSE@ -HAVE_PS_TRUE = @HAVE_PS_TRUE@ -HAVE_TIFF_FALSE = @HAVE_TIFF_FALSE@ -HAVE_TIFF_TRUE = @HAVE_TIFF_TRUE@ -HAVE_XPM_FALSE = @HAVE_XPM_FALSE@ -HAVE_XPM_TRUE = @HAVE_XPM_TRUE@ -INCFREETYPE = @INCFREETYPE@ -INCXPM = @INCXPM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LABLGTK2DIR = @LABLGTK2DIR@ -LABLGTKDIR = @LABLGTKDIR@ -LDFLAGS = @LDFLAGS@ -LIBFREETYPE = @LIBFREETYPE@ -LIBGIF = @LIBGIF@ -LIBJPEG = @LIBJPEG@ -LIBOBJS = @LIBOBJS@ -LIBPNG = @LIBPNG@ -LIBS = @LIBS@ -LIBTIFF = @LIBTIFF@ -LIBXPM = @LIBXPM@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OCAMLC = @OCAMLC@ -OCAMLC_OPT = @OCAMLC_OPT@ -OCAMLDEP = @OCAMLDEP@ -OCAMLDEP_OPT = @OCAMLDEP_OPT@ -OCAMLLIB = @OCAMLLIB@ -OCAMLMKLIB = @OCAMLMKLIB@ -OCAMLMKLIB_OPT = @OCAMLMKLIB_OPT@ -OCAMLOPT = @OCAMLOPT@ -OCAMLOPT_OPT = @OCAMLOPT_OPT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_RGB_TXT = @PATH_RGB_TXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -REQUIRES = @REQUIRES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SUPPORT_FREETYPE = @SUPPORT_FREETYPE@ -SUPPORT_GIF = @SUPPORT_GIF@ -SUPPORT_JPEG = @SUPPORT_JPEG@ -SUPPORT_PNG = @SUPPORT_PNG@ -SUPPORT_PS = @SUPPORT_PS@ -SUPPORT_TIFF = @SUPPORT_TIFF@ -SUPPORT_XPM = @SUPPORT_XPM@ -VERSION = @VERSION@ -WORD_SIZE = @WORD_SIZE@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -OCAMLSOURCES = test.ml -TESTS = $(am__append_2) $(am__append_4) -test_opt_SOURCES = $(OCAMLSOURCES) -test_byt_SOURCES = $(OCAMLSOURCES) -OCAMLBYTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmo) $(OCAMLSOURCES:.ml=.cmo) -OCAMLOPTOBJS = $(OCAMLBUILTSOURCES:.ml=.cmx) $(OCAMLSOURCES:.ml=.cmx) -COBJS = $(CSOURCES:.c=.o) - -# flags needed to build examples -CAMLIMAGES_INCLUDES = -I $(top_builddir)/src $(am__append_5) $(am__append_7) -CAMLIMAGES_LIBS = $(am__append_6) $(am__append_8) graphics.cma camlimages.cma -DLLPATHS = -dllpath $(top_srcdir)/src -AM_OCAMLCFLAGS = $(CAMLIMAGES_INCLUDES) -AM_LINKFLAGS = $(CAMLIMAGES_INCLUDES) -OCAMLLIBS = $(CAMLIMAGES_LIBS) $(OTHER_LIBS) -CLEANFILES = $(OCAMLBYTOBJS) \ - $(OCAMLOPTOBJS) \ - $(OCAMLOPTOBJS:.cmx=.o) \ - $(OCAMLSOURCES:.ml=.cmi) \ - $(COBJS) \ - .depend\ -out.image -EXTRA_DIST = images micap.ttf -SUFFIXES = .ml .mli .cmo .cmi .cmx .c .o -all: all-am - -.SUFFIXES: -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../Makefile.variables $(srcdir)/../Makefile.rules $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign test/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-checkPROGRAMS: - -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list='$(TESTS)'; \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -n "$$skipped" && echo "$$skipped"; \ - test -n "$$report" && echo "$$report"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/.. - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic distclean distclean-compile \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am - - -test.byt$(EXEEXT): $(OCAMLBYTOBJS) - $(OCAMLC) -o test.byt$(EXEEXT) \ - $(DLLPATHS) $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS) $(OCAMLBYTOBJS) - -test.opt$(EXEEXT): $(OCAMLOPTOBJS) - $(OCAMLOPT) -o test.opt$(EXEEXT) \ - $(LINKFLAGS) $(AM_LINKFLAGS) \ - $(OCAMLLIBS:.cma=.cmxa) $(OCAMLOPTOBJS) - -dist-hook: - rm -rf $(distdir)/images/CVS - rm -f $(distdir)/images/.cvsignore - -.ml.cmo: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.mli.cmi: - $(OCAMLC) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.ml.cmx: - $(OCAMLOPT) $(OCAMLCFLAGS) $(AM_OCAMLCFLAGS) -o $@ -c $< - -.c.o: $(top_srcdir)/config.h - $(OCAMLC) -ccopt "-o $@ $(CFLAGS) $(AM_CFLAGS)" -c $< - -# moving to $(srcdir) is needed in case of VPATH build -.depend: $(OCAMLSOURCES) $(OCAMLINTERFACES) $(top_srcdir)/config.status - (cd $(srcdir) && $(OCAMLDEP) $(OCAMLSOURCES) $(OCAMLINTERFACES)) > .depend - -# ugly stuff for make time include -@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru camlimages-3.0.1/test/OMakefile camlimages-4.0.1/test/OMakefile --- camlimages-3.0.1/test/OMakefile 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/test/OMakefile 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,26 @@ +#*********************************************************************# +# # +# Caml Images # +# # +# Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt # +# Pierre Weis, projet Cristal, INRIA Rocquencourt # +# Jun Furuse, projet Cristal, INRIA Rocquencourt # +# # +# Copyright 1999-2004, # +# Institut National de Recherche en Informatique et en Automatique. # +# Distributed only by permission. # +# # +#*********************************************************************# + +#(* $Id: OMakefile,v 1.1.2.2 2010/05/13 13:37:15 furuse Exp $ *) + +OCAMLPACKS[]= + graphics + +SUB_PACKAGES[]= all graphics freetype + +BuildExample(test, test, $(SUB_PACKAGES)) + +clean: + rm -f $(filter-proper-targets $(ls R, .)) + rm -f out.image diff -Nru camlimages-3.0.1/test/test.ml camlimages-4.0.1/test/test.ml --- camlimages-3.0.1/test/test.ml 2007-02-08 10:07:10.000000000 +0200 +++ camlimages-4.0.1/test/test.ml 2011-06-22 20:04:32.000000000 +0200 @@ -12,7 +12,7 @@ (* *) (***********************************************************************) -(* $Id: test.ml,v 1.31 2007/01/18 10:53:44 rousse Exp $ *) +(* $Id: test.ml,v 1.32.2.1 2010/05/13 13:14:47 furuse Exp $ *) open Images;; open Format;; @@ -34,6 +34,11 @@ printf "*******************************************************@.";; let show_image img x y = + let img = + match img with + | Rgba32 img -> Rgb24 (Rgb24.of_rgba32 img) + | _ -> img + in let gr_img = Graphics.make_image (Graphic_image.array_of_image img) in Graphics.draw_image gr_img x y;; @@ -80,7 +85,7 @@ let images_default = [ "apbm.pbm"; "apgm.pgm"; "appm.ppm"; "pbm.pbm"; "pgm.pgm"; "ppm.ppm"; - "jpg.jpg"; "png.png"; "bmp.bmp"; "tif.tif"; + "jpg.jpg"; "png.png"; "png-alpha.png"; "bmp.bmp"; "tif.tif"; "xpm.xpm"; "eps.eps"; "gif.gif"; "mmm.anim.gif"; ];; @@ -151,6 +156,7 @@ if not (go_on ()) then raise Exit end; with + | Wrong_file_type -> prerr_endline "file format detection failed" | Failure s -> prerr_endline s;; let main () = diff -Nru camlimages-3.0.1/tools/COPY camlimages-4.0.1/tools/COPY --- camlimages-3.0.1/tools/COPY 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/tools/COPY 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,13 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* François Pessaux, projet Cristal, INRIA Rocquencourt *) +(* Pierre Weis, projet Cristal, INRIA Rocquencourt *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999,2000 *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) diff -Nru camlimages-3.0.1/tools/COPY-JPF camlimages-4.0.1/tools/COPY-JPF --- camlimages-3.0.1/tools/COPY-JPF 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/tools/COPY-JPF 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,11 @@ +(***********************************************************************) +(* *) +(* Objective Caml *) +(* *) +(* Jun Furuse, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999,2000 *) +(* Institut National de Recherche en Informatique et en Automatique. *) +(* Distributed only by permission. *) +(* *) +(***********************************************************************) diff -Nru camlimages-3.0.1/tools/putcopy camlimages-4.0.1/tools/putcopy --- camlimages-3.0.1/tools/putcopy 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/tools/putcopy 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,69 @@ +#!/usr/local/bin/perl + +# exec in camlimages directory + +open(IN, "find . -name '*.ml' -o -name '*.mli' -o -name '*.ml.in' -o -name '*.mli.in' -o -name '*.c' | grep -v xvpics | grep -v CVS |"); + +while(){ + chop; + $file= $_; + open(IN2, "$file"); + $_ = ; + if ( /\(\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*[\*]+\)/ || + /\/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*[\*]+\// + ){ + # long comment, should be copyright notice + print STDERR "Find a copyright in $file"; + open(OUT, "> $file.out"); + if( $file =~ /freetype|examples|xvthumb|ps|bitmap\.ml|\/o[A-Z]/ ){ + print STDERR " (JPF only)\n"; + open(COPY, "tools/COPY-JPF"); + } else { + print STDERR "\n"; + open(COPY, "tools/COPY"); + } + if( $file =~ /\.c$/ ){ + while(){ + s/[\(\)]/\//g; + print OUT $_; + } + } else { + while(){ print OUT $_; } + } + close COPY; + while(){ + if ( /\(\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*[\*]+\)/ || + /\/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*[\*]+\// + ){ + last; + } + } + while(){ print OUT $_; } + close IN2; + close OUT; + `mv $file $file.bak`; + `mv $file.out $file`; + } else { + # we have no copyright notice + $org = $_; + print STDERR "Newly put a copyright in $file\n"; + open(OUT, "> $file.out"); + open(COPY, "tools/COPY"); + if( $file =~ /\.c$/ ){ + while(){ + s/[\(\)]/\//g; + print OUT $_; + } + } else { + while(){ print OUT $_; } + } + close COPY; + print OUT $org; + while(){ print OUT $_; } + close IN2; + close OUT; + `mv $file $file.bak`; + `mv $file.out $file`; + } +} + diff -Nru camlimages-3.0.1/tools/recopy camlimages-4.0.1/tools/recopy --- camlimages-3.0.1/tools/recopy 1970-01-01 02:00:00.000000000 +0200 +++ camlimages-4.0.1/tools/recopy 2011-06-22 20:04:32.000000000 +0200 @@ -0,0 +1,7 @@ +for i in `find . -type f -name '*.ml*' | grep -v bak | grep -v CVS` +do + echo $i + sed -e 's/.*Copyright 1999.*/(* Copyright 1999,2000,2001,2002,2001,2002 *)/' < $i > tmp.tmp + mv $i $i.bak + mv tmp.tmp $i +done