fix auto-restart on disconnect

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13134 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-04-23 15:54:47 +00:00
parent 2ffd15aefd
commit e6e5fde3b0
436 changed files with 171499 additions and 7 deletions

View File

@ -144,6 +144,7 @@ struct ldl_handle {
void *private_info;
FILE *log_stream;
ldl_handle_state_t state;
int fail_count;
};
struct ldl_session {
@ -1128,6 +1129,7 @@ static int on_stream_component(ldl_handle_t *handle, int type, iks *node)
}
globals.logger(DL_LOG_DEBUG, "XMPP authenticated\n");
ldl_set_flag_locked(handle, LDL_FLAG_AUTHORIZED);
handle->fail_count = 0;
}
} else {
globals.logger(DL_LOG_ERR, "LOGIN ERROR!\n");
@ -1433,7 +1435,7 @@ static void *APR_THREAD_FUNC queue_thread(apr_thread_t *thread, void *obj)
ldl_set_flag_locked(handle, LDL_FLAG_QUEUE_RUNNING);
while (ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
while (ldl_test_flag(handle, LDL_FLAG_RUNNING) && !ldl_test_flag(handle, LDL_FLAG_QUEUE_STOP)) {
ldl_flush_queue(handle, 0);
if (handle->loop_callback(handle) != LDL_STATUS_SUCCESS || !ldl_test_flag((&globals), LDL_FLAG_READY)) {
@ -1442,13 +1444,14 @@ static void *APR_THREAD_FUNC queue_thread(apr_thread_t *thread, void *obj)
if ((fd = iks_fd(handle->parser)) > -1) {
shutdown(fd, 0x02);
}
ldl_clear_flag_locked(handle, LDL_FLAG_RUNNING);
ldl_set_flag_locked(handle, LDL_FLAG_BREAK);
break;
}
microsleep(100);
}
ldl_clear_flag_locked(handle, LDL_FLAG_QUEUE_RUNNING);
ldl_clear_flag_locked(handle, LDL_FLAG_QUEUE_STOP);
return NULL;
}
@ -1541,13 +1544,12 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
break;
}
if (IKS_OK != e) {
globals.logger(DL_LOG_DEBUG, "io error 2 %d\n", e);
microsleep(1000);
if (IKS_OK != e || ldl_test_flag(handle, LDL_FLAG_BREAK)) {
globals.logger(DL_LOG_DEBUG, "io error 2 %d retry in %d second(s)\n", e, ++handle->fail_count);
microsleep(1000 * handle->fail_count);
goto fail;
}
if (!ldl_test_flag(handle, LDL_FLAG_TLS) && ldl_test_flag(handle, LDL_FLAG_READY)) {
ldl_flush_queue(handle, 0);
}
@ -1569,14 +1571,18 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
fail:
ldl_set_flag_locked(handle, LDL_FLAG_QUEUE_STOP);
ldl_clear_flag_locked(handle, LDL_FLAG_CONNECTED);
ldl_clear_flag_locked(handle, LDL_FLAG_AUTHORIZED);
ldl_clear_flag_locked(handle, LDL_FLAG_BREAK);
handle->state = CS_NEW;
if ((fd = iks_fd(handle->parser)) > -1) {
shutdown(fd, 0x02);
}
while(ldl_test_flag(handle, LDL_FLAG_QUEUE_RUNNING)) {
microsleep(100);
}

View File

@ -120,7 +120,9 @@ typedef enum {
LDL_FLAG_READY = (1 << 3),
LDL_FLAG_CONNECTED = (1 << 4),
LDL_FLAG_QUEUE_RUNNING = (1 << 5),
LDL_FLAG_STOPPED = (1 << 6)
LDL_FLAG_STOPPED = (1 << 6),
LDL_FLAG_QUEUE_STOP = (1 << 7),
LDL_FLAG_BREAK = (1 << 8)
} ldl_flag_t;
typedef enum {

21
libs/tiff-3.8.2/COPYRIGHT Normal file
View File

@ -0,0 +1,21 @@
Copyright (c) 1988-1997 Sam Leffler
Copyright (c) 1991-1997 Silicon Graphics, Inc.
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
that (i) the above copyright notices and this permission notice appear in
all copies of the software and related documentation, and (ii) the names of
Sam Leffler and Silicon Graphics may not be used in any advertising or
publicity relating to the software without the specific, prior written
permission of Sam Leffler and Silicon Graphics.
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.

3698
libs/tiff-3.8.2/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
HOWTO-RELEASE:
Notes on releasing. You will need appropriate autoconf, automake and libtool
utilities to release a package.
1. Commit any unsaved changes.
2. "make clean"
3. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
Easist thing to do is take html/vX.(X-1).html and use it as a template.
Add that file to the list of EXTRA_DIST files in the html/Makefile.am.
3.5. Update html/index.html to refer to this new page as the current release.
4. Increment version in configure.ac. Put 'alpha' or 'beta' after
the version, if applicable.
eg.
3.5.7
or
3.5.8beta
Version should be updated in two places: in the second argument of the
AC_INIT macro and in LIBTIFF_xxx_VERSION variables.
5. autoconf
6. sh configure
7. make release -- this will update "RELEASE-DATE" and "VERSION" in the top
level dir, and libtiff/tiffvers.h.
8. Please verify that the version info in RELEASE-DATE, VERSION and
libtiff/tiffvers.h is right.
9. make; make distcheck (to test).
10. make distclean
11. cvs commit
12. cvs tag Release-v3-5-7 (or the appropriate name for the release)
13. configure; make dist
Two files with names tiff-version.tar.gz and tiff-version.zip will
be created in the top level package directory.
14. Copy to ftp.remotesensing.org ftp site.
scp tiff-*.tar.gz ftp.remotesensing.org:/var/ftp/libtiff/
scp tiff-*.zip ftp.remotesensing.org:/var/ftp/libtiff/
15. Announce to list, tiff@lists.maptools.org
16. Update libtiff page on freshmeat with new version announcement.

View File

@ -0,0 +1,54 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
docdir = $(LIBTIFF_DOCDIR)
AUTOMAKE_OPTIONS = dist-zip foreign
ACLOCAL_AMFLAGS = -I ./m4
docfiles = \
COPYRIGHT \
ChangeLog \
README \
RELEASE-DATE \
TODO \
VERSION
EXTRA_DIST = \
HOWTO-RELEASE \
Makefile.vc \
SConstruct \
autogen.sh \
nmake.opt
dist_doc_DATA = $(docfiles)
SUBDIRS = port libtiff tools contrib test man html
release:
(rm -f RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > RELEASE-DATE)
(rm -f VERSION && echo $(LIBTIFF_VERSION) > VERSION)
(rm -f ./libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' ./libtiff/tiffvers.h.in > ./libtiff/tiffvers.h)

724
libs/tiff-3.8.2/Makefile.in Normal file
View File

@ -0,0 +1,724 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/configure ChangeLog TODO config/compile \
config/config.guess config/config.sub config/depcomp \
config/install-sh config/ltmain.sh config/missing \
config/mkinstalldirs
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.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 = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.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
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(docdir)"
dist_docDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_doc_DATA)
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
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 $(distdir).zip
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@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
docdir = $(LIBTIFF_DOCDIR)
AUTOMAKE_OPTIONS = dist-zip foreign
ACLOCAL_AMFLAGS = -I ./m4
docfiles = \
COPYRIGHT \
ChangeLog \
README \
RELEASE-DATE \
TODO \
VERSION
EXTRA_DIST = \
HOWTO-RELEASE \
Makefile.vc \
SConstruct \
autogen.sh \
nmake.opt
dist_doc_DATA = $(docfiles)
SUBDIRS = port libtiff tools contrib test man html
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
@list='$(dist_doc_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
$(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
done
uninstall-dist_docDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_doc_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
rm -f "$(DESTDIR)$(docdir)/$$f"; \
done
# 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):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
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) \
|| eval $$failcom; \
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:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
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) \
|| eval $$failcom; \
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; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
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; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
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)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/config $(distdir)/m4
@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_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(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
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | 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
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(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 | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.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 $(DATA)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(docdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
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:
-test -z "$(CONFIG_CLEAN_FILES)" || 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 clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-dist_docDATA
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 mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-dist_docDATA 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-libtool clean-recursive \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-libtool 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-dist_docDATA 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-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
uninstall-dist_docDATA uninstall-info-am
release:
(rm -f RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > RELEASE-DATE)
(rm -f VERSION && echo $(LIBTIFF_VERSION) > VERSION)
(rm -f ./libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' ./libtiff/tiffvers.h.in > ./libtiff/tiffvers.h)
# 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:

View File

@ -0,0 +1,59 @@
# $Id: Makefile.vc,v 1.5 2006/03/23 14:54:00 dron Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
#
# Makefile for MS Visual C and Watcom C compilers.
# Edit nmake.opt file if you want to ajust building options.
#
# To build:
# C:\libtiff> nmake /f makefile.vc
!INCLUDE nmake.opt
all: port lib tools
port::
cd port
$(MAKE) /f Makefile.vc
cd..
lib: port
cd libtiff
$(MAKE) /f Makefile.vc
cd..
tools: lib
cd tools
$(MAKE) /f Makefile.vc
cd ..
clean:
cd port
$(MAKE) /f Makefile.vc clean
cd..
cd libtiff
$(MAKE) /f Makefile.vc clean
cd..
cd tools
$(MAKE) /f Makefile.vc clean
cd ..

59
libs/tiff-3.8.2/README Normal file
View File

@ -0,0 +1,59 @@
$Header: /cvs/maptools/cvsroot/libtiff/README,v 1.5 2004/10/30 13:44:45 dron Exp $
TIFF Software Distribution
--------------------------
This file is just a placeholder; all the documentation is now in
HTML in the html directory. To view the documentation point your
favorite WWW viewer at html/index.html; e.g.
netscape html/index.html
If you don't have an HTML viewer then you can read the HTML source
or fetch a PostScript version of this documentation from the directory
ftp://ftp.remotesensing.org/pub/libtiff/
If you can't hack either of these options then basically what you
want to do is:
% ./configure
% make
% su
# make install
More information, email contacts, and mailing list information can be
found online at http://www.remotesensing.org/libtiff/.
Use and Copyright
-----------------
Silicon Graphics has seen fit to allow us to give this work away. It
is free. There is no support or guarantee of any sort as to its
operations, correctness, or whatever. If you do anything useful with
all or parts of it you need to honor the copyright notices. I would
also be interested in knowing about it and, hopefully, be acknowledged.
The legal way of saying that is:
Copyright (c) 1988-1997 Sam Leffler
Copyright (c) 1991-1997 Silicon Graphics, Inc.
Permission to use, copy, modify, distribute, and sell this software and
its documentation for any purpose is hereby granted without fee, provided
that (i) the above copyright notices and this permission notice appear in
all copies of the software and related documentation, and (ii) the names of
Sam Leffler and Silicon Graphics may not be used in any advertising or
publicity relating to the software without the specific, prior written
permission of Sam Leffler and Silicon Graphics.
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.

View File

@ -0,0 +1 @@
20060323

169
libs/tiff-3.8.2/SConstruct Normal file
View File

@ -0,0 +1,169 @@
# $Id: SConstruct,v 1.2 2006/03/23 14:54:00 dron Exp $
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2005, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# This file contains rules to build software with the SCons tool
# (see the http://www.scons.org/ for details on SCons).
import os
env = Environment()
# Read the user supplied options
opts = Options('libtiff.conf')
opts.Add(PathOption('PREFIX', \
'install architecture-independent files in this directory', \
'/usr/local', PathOption.PathIsDirCreate))
opts.Add(BoolOption('ccitt', \
'enable support for CCITT Group 3 & 4 algorithms', \
'yes'))
opts.Add(BoolOption('packbits', \
'enable support for Macintosh PackBits algorithm', \
'yes'))
opts.Add(BoolOption('lzw', \
'enable support for LZW algorithm', \
'yes'))
opts.Add(BoolOption('thunder', \
'enable support for ThunderScan 4-bit RLE algorithm', \
'yes'))
opts.Add(BoolOption('next', \
'enable support for NeXT 2-bit RLE algorithm', \
'yes'))
opts.Add(BoolOption('logluv', \
'enable support for LogLuv high dynamic range encoding', \
'yes'))
opts.Add(BoolOption('strip_chopping', \
'support for strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of ~8Kb to reduce memory usage)', \
'yes'))
opts.Add(BoolOption('extrasample_as_alpha', \
'the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don\'t mark the alpha properly', \
'yes'))
opts.Add(BoolOption('check_ycbcr_subsampling', \
'disable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag', \
'yes'))
opts.Update(env)
opts.Save('libtiff.conf', env)
Help(opts.GenerateHelpText(env))
# Here are our installation paths:
idir_prefix = '$PREFIX'
idir_lib = '$PREFIX/lib'
idir_bin = '$PREFIX/bin'
idir_inc = '$PREFIX/include'
idir_doc = '$PREFIX/doc'
Export([ 'env', 'idir_prefix', 'idir_lib', 'idir_bin', 'idir_inc', 'idir_doc' ])
# Now proceed to system feature checks
target_cpu, target_vendor, target_kernel, target_os = \
os.popen("./config.guess").readlines()[0].split("-")
def Define(context, key, have):
import SCons.Conftest
SCons.Conftest._Have(context, key, have)
def CheckCustomOption(context, name):
context.Message('Checking is the ' + name + ' option set... ')
ret = env[name]
Define(context, name + '_SUPPORT', ret)
context.Result(ret)
return ret
def CheckFillorderOption(context):
context.Message('Checking for the native cpu bit order... ')
if target_cpu[0] == 'i' and target_cpu[2:] == '86':
Define(context, 'HOST_FILLORDER', 'FILLORDER_LSB2MSB')
context.Result('lsb2msb')
else:
Define(context, 'HOST_FILLORDER', 'FILLORDER_MSB2LSB')
context.Result('msb2lsb')
return 1
def CheckIEEEFPOption(context):
context.Message('Checking for the IEEE floating point format... ')
Define(context, 'HAVE_IEEEFP', 1)
context.Result(1)
return 1
def CheckOtherOption(context, name):
context.Message('Checking is the ' + name + ' option set... ')
ret = env[name]
Define(context, 'HAVE_' + name, ret)
context.Result(ret)
return ret
custom_tests = { \
'CheckCustomOption' : CheckCustomOption, \
'CheckFillorderOption' : CheckFillorderOption, \
'CheckIEEEFPOption' : CheckIEEEFPOption, \
'CheckOtherOption' : CheckOtherOption \
}
conf = Configure(env, custom_tests = custom_tests, \
config_h = 'libtiff/tif_config.h')
# Check for standard library
conf.CheckLib('c')
if target_os != 'cygwin' \
and target_os != 'mingw32' \
and target_os != 'beos' \
and target_os != 'darwin':
conf.CheckLib('m')
# Check for system headers
conf.CheckCHeader('assert.h')
conf.CheckCHeader('fcntl.h')
conf.CheckCHeader('limits.h')
conf.CheckCHeader('malloc.h')
conf.CheckCHeader('search.h')
conf.CheckCHeader('sys/time.h')
conf.CheckCHeader('unistd.h')
# Check for standard library functions
conf.CheckFunc('floor')
conf.CheckFunc('isascii')
conf.CheckFunc('memmove')
conf.CheckFunc('memset')
conf.CheckFunc('mmap')
conf.CheckFunc('pow')
conf.CheckFunc('sqrt')
conf.CheckFunc('strchr')
conf.CheckFunc('strrchr')
conf.CheckFunc('strstr')
conf.CheckFunc('strtol')
conf.CheckFillorderOption()
conf.CheckIEEEFPOption()
conf.CheckCustomOption('ccitt')
conf.CheckCustomOption('packbits')
conf.CheckCustomOption('lzw')
conf.CheckCustomOption('thunder')
conf.CheckCustomOption('next')
conf.CheckCustomOption('logluv')
conf.CheckOtherOption('strip_chopping')
conf.CheckOtherOption('extrasample_as_alpha')
conf.CheckOtherOption('check_ycbcr_subsampling')
env = conf.Finish()
# Ok, now go to build files in the subdirectories
SConscript(dirs = [ 'libtiff' ], name = 'SConstruct')

12
libs/tiff-3.8.2/TODO Normal file
View File

@ -0,0 +1,12 @@
# $Header: /cvs/maptools/cvsroot/libtiff/TODO,v 1.6 2002/10/10 05:28:43 warmerda Exp $
o gif2tiff segaulting on selected images
o tiffcmp read data by strip/tile instead of scanline
o YCbCr sampling support
o extracate colorspace conversion support
o look at isolating all codecs from TIFF library
o JPEG colormode order dependency problem
o Write documentation on how do extend tags, and how the custom field
stuff all works.

1
libs/tiff-3.8.2/VERSION Normal file
View File

@ -0,0 +1 @@
3.8.2

7281
libs/tiff-3.8.2/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

8
libs/tiff-3.8.2/autogen.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
set -x
#libtoolize --force --copy
aclocal -I ./m4
autoheader
automake --foreign --add-missing --copy
autoconf

142
libs/tiff-3.8.2/config/compile Executable file
View File

@ -0,0 +1,142 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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 Street, Fifth Floor, Boston, MA 02110-1301, 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.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

1497
libs/tiff-3.8.2/config/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1608
libs/tiff-3.8.2/config/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

530
libs/tiff-3.8.2/config/depcomp Executable file
View File

@ -0,0 +1,530 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, 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.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

323
libs/tiff-3.8.2/config/install-sh Executable file
View File

@ -0,0 +1,323 @@
#!/bin/sh
# install - install a program, script, or datafile
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
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE 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
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-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.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# 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
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# 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
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# 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,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$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
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$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
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 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# 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 $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 rename the file to the real destination.
{ $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 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:

7339
libs/tiff-3.8.2/config/ltmain.sh Executable file

File diff suppressed because it is too large Load Diff

360
libs/tiff-3.8.2/config/missing Executable file
View File

@ -0,0 +1,360 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, 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
;;
-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 <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
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)
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)
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*)
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)
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)
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)
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."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# 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:

View File

@ -0,0 +1,150 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec 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.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

22598
libs/tiff-3.8.2/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,568 @@
dnl -*- Autoconf -*-
dnl Tag Image File Format (TIFF) Software
dnl
dnl Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and
dnl its documentation for any purpose is hereby granted without fee, provided
dnl that (i) the above copyright notices and this permission notice appear in
dnl all copies of the software and related documentation, and (ii) the names of
dnl Sam Leffler and Silicon Graphics may not be used in any advertising or
dnl publicity relating to the software without the specific, prior written
dnl permission of Sam Leffler and Silicon Graphics.
dnl
dnl THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
dnl EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
dnl WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
dnl
dnl IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
dnl ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
dnl OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
dnl WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
dnl LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
dnl OF THIS SOFTWARE.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([LibTIFF Software], 3.8.2, [tiff@lists.maptools.org], tiff)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(m4)
AC_LANG(C)
dnl Compute the canonical target-system type variable
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
dnl Do not rebuild generated files every time
AM_MAINTAINER_MODE
dnl Versioning.
dnl Don't fill the ALPHA_VERSION field, if not applicable.
LIBTIFF_MAJOR_VERSION=3
LIBTIFF_MINOR_VERSION=8
LIBTIFF_MICRO_VERSION=2
LIBTIFF_ALPHA_VERSION=
LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
dnl This will be used with the 'make release' target
LIBTIFF_RELEASE_DATE=`date +"%Y%m%d"`
# This is a special hack for OpenBSD and MirOS systems. The dynamic linker
# in OpenBSD uses some special semantics for shared libraries. Their soname
# contains only two numbers, major and minor.
# See http://bugzilla.remotesensing.org/show_bug.cgi?id=838 for details.
case "$target_os" in
openbsd* | mirbsd*)
LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION:0
;;
*)
LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION:$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
;;
esac
AC_SUBST(LIBTIFF_MAJOR_VERSION)
AC_SUBST(LIBTIFF_MINOR_VERSION)
AC_SUBST(LIBTIFF_MICRO_VERSION)
AC_SUBST(LIBTIFF_ALPHA_VERSION)
AC_SUBST(LIBTIFF_VERSION)
AC_SUBST(LIBTIFF_VERSION_INFO)
AC_SUBST(LIBTIFF_RELEASE_DATE)
dnl Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
dnl We want warnings. As many warnings as possible.
VL_PROG_CC_WARNINGS()
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_LIBTOOL_WIN32_DLL
dnl Checks for libraries.
AC_CHECK_LIB([c], [main])
dnl We don't need to add math library at all targets
case "$target_os" in
cygwin* | mingw32* | beos* | darwin*)
;;
*)
AC_CHECK_LIB(m,main,,,)
;;
esac
dnl Checks for header files.
AC_CHECK_HEADERS([assert.h fcntl.h limits.h malloc.h search.h sys/time.h unistd.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_HEADER_TIME
AC_STRUCT_TM
dnl Some compilers (IBM VisualAge) has these types defined, so check it here:
AC_CHECK_TYPES([int8, int16, int32],,,
[
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
])
dnl Checks for library functions.
AC_CHECK_FUNCS([floor isascii memmove memset mmap pow sqrt strchr strrchr strstr strtol])
dnl Will use local replacements for unavailable functions
AC_REPLACE_FUNCS(getopt)
AC_REPLACE_FUNCS(strcasecmp)
AC_REPLACE_FUNCS(strtoul)
AC_REPLACE_FUNCS(lfind)
dnl ---------------------------------------------------------------------------
dnl Check the native cpu bit order.
dnl ---------------------------------------------------------------------------
AC_MSG_CHECKING([native cpu bit order])
case "$target_cpu" in
i*86*)
HOST_FILLORDER=FILLORDER_LSB2MSB
AC_MSG_RESULT([lsb2msb])
;;
*)
HOST_FILLORDER=FILLORDER_MSB2LSB
AC_MSG_RESULT([msb2lsb])
;;
esac
AC_DEFINE_UNQUOTED(HOST_FILLORDER, $HOST_FILLORDER, [Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB)])
dnl ---------------------------------------------------------------------------
dnl Configure legacy tifconf.h HOST_BIGENDIAN.
dnl ---------------------------------------------------------------------------
if test "$ac_cv_c_bigendian" = yes ; then
HOST_BIGENDIAN=1
else
HOST_BIGENDIAN=0
fi
AC_DEFINE_UNQUOTED(HOST_BIGENDIAN,$HOST_BIGENDIAN,[Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel)])
dnl ---------------------------------------------------------------------------
dnl Make the POSIX.2 features available.
dnl ---------------------------------------------------------------------------
#_POSIX_C_SOURCE=2
#AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE, $_POSIX_C_SOURCE, [Define this macro to a positive integer to control which POSIX functionality is made available.])
dnl ---------------------------------------------------------------------------
dnl Set the floating point format.
dnl FIXME: write appropriate test.
dnl ---------------------------------------------------------------------------
HAVE_IEEEFP=1
AC_DEFINE_UNQUOTED(HAVE_IEEEFP, $HAVE_IEEEFP, [Define as 0 or 1 according to the floating point format suported by the machine])
dnl ---------------------------------------------------------------------------
dnl Enable run-time paths to libraries usage.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(rpath,
AS_HELP_STRING([--enable-rpath],
[Enable runtime linker paths (-R libtool option)]),
[HAVE_RPATH=$enableval], [HAVE_RPATH=no])
AM_CONDITIONAL(HAVE_RPATH, test "$HAVE_RPATH" = "yes")
dnl ---------------------------------------------------------------------------
dnl Support large files.
dnl ---------------------------------------------------------------------------
AC_SYS_LARGEFILE
dnl ---------------------------------------------------------------------------
dnl Point to path where we should install documentation.
dnl ---------------------------------------------------------------------------
LIBTIFF_DOCDIR=\${prefix}/share/doc/${PACKAGE}-${LIBTIFF_VERSION}
AC_ARG_WITH(docdir,
AS_HELP_STRING([--with-docdir=DIR],
[directory where documentation should be installed]),,)
if test "x$with_docdir" != "x" ; then
LIBTIFF_DOCDIR=$with_docdir
fi
AC_SUBST(LIBTIFF_DOCDIR)
dnl ---------------------------------------------------------------------------
dnl Switch on/off internal codecs.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(ccitt,
AS_HELP_STRING([--disable-ccitt],
[disable support for CCITT Group 3 & 4 algorithms]),
[HAVE_CCITT=$enableval], [HAVE_CCITT=yes])
if test "$HAVE_CCITT" = "yes" ; then
AC_DEFINE(CCITT_SUPPORT,1,[Support CCITT Group 3 & 4 algorithms])
fi
AC_ARG_ENABLE(packbits,
AS_HELP_STRING([--disable-packbits],
[disable support for Macintosh PackBits algorithm]),
[HAVE_PACKBITS=$enableval], [HAVE_PACKBITS=yes])
if test "$HAVE_PACKBITS" = "yes" ; then
AC_DEFINE(PACKBITS_SUPPORT,1,[Support Macintosh PackBits algorithm])
fi
AC_ARG_ENABLE(lzw,
AS_HELP_STRING([--disable-lzw],
[disable support for LZW algorithm]),
[HAVE_LZW=$enableval], [HAVE_LZW=yes])
if test "$HAVE_LZW" = "yes" ; then
AC_DEFINE(LZW_SUPPORT,1,[Support LZW algorithm])
fi
AC_ARG_ENABLE(thunder,
AS_HELP_STRING([--disable-thunder],
[disable support for ThunderScan 4-bit RLE algorithm]),
[HAVE_THUNDER=$enableval], [HAVE_THUNDER=yes])
if test "$HAVE_THUNDER" = "yes" ; then
AC_DEFINE(THUNDER_SUPPORT,1,[Support ThunderScan 4-bit RLE algorithm])
fi
HAVE_NEXT=yes
AC_ARG_ENABLE(next,
AS_HELP_STRING([--disable-next],
[disable support for NeXT 2-bit RLE algorithm]),
[HAVE_NEXT=$enableval], [HAVE_NEXT=yes])
if test "$HAVE_NEXT" = "yes" ; then
AC_DEFINE(NEXT_SUPPORT,1,[Support NeXT 2-bit RLE algorithm])
fi
AC_ARG_ENABLE(logluv,
AS_HELP_STRING([--disable-logluv],
[disable support for LogLuv high dynamic range encoding]),
[HAVE_LOGLUV=$enableval], [HAVE_LOGLUV=yes])
if test "$HAVE_LOGLUV" = "yes" ; then
AC_DEFINE(LOGLUV_SUPPORT,1,[Support LogLuv high dynamic range encoding])
fi
dnl ---------------------------------------------------------------------------
dnl Switch on/off support for Microsoft Document Imaging
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(mdi,
AS_HELP_STRING([--disable-mdi],
[disable support for Microsoft Document Imaging]),
[HAVE_MDI=$enableval], [HAVE_MDI=yes])
if test "$HAVE_MDI" = "yes" ; then
AC_DEFINE(MDI_SUPPORT,1,[Support Microsoft Document Imaging format])
fi
dnl ---------------------------------------------------------------------------
dnl Check for ZLIB.
dnl ---------------------------------------------------------------------------
HAVE_ZLIB=no
AC_ARG_ENABLE(zlib,
AS_HELP_STRING([--disable-zlib],
[disable Zlib usage (required for Deflate compression, enabled by default)]),,)
AC_ARG_WITH(zlib-include-dir,
AS_HELP_STRING([--with-zlib-include-dir=DIR],
[location of Zlib headers]),,)
AC_ARG_WITH(zlib-lib-dir,
AS_HELP_STRING([--with-zlib-lib-dir=DIR],
[location of Zlib library binary]),,)
if test "x$enable_zlib" != "xno" ; then
if test "x$with_zlib_lib_dir" != "x" ; then
LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS"
fi
AC_CHECK_LIB(z, inflateEnd, [zlib_lib=yes], [zlib_lib=no],)
if test "$zlib_lib" = "no" -a "x$with_zlib_lib_dir" != "x"; then
AC_MSG_ERROR([Zlib library not found at $with_zlib_lib_dir])
fi
if test "x$with_zlib_include_dir" != "x" ; then
CPPFLAGS="-I$with_zlib_include_dir $CPPFLAGS"
fi
AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no])
if test "$zlib_h" = "no" -a "x$with_zlib_include_dir" != "x" ; then
AC_MSG_ERROR([Zlib headers not found at $with_zlib_include_dir])
fi
if test "$zlib_lib" = "yes" -a "$zlib_h" = "yes" ; then
HAVE_ZLIB=yes
fi
fi
if test "$HAVE_ZLIB" = "yes" ; then
AC_DEFINE(ZIP_SUPPORT,1,[Support Deflate compression])
LIBS="-lz $LIBS"
if test "$HAVE_RPATH" = "yes" -a "x$with_zlib_lib_dir" != "x" ; then
LIBDIR="-R $with_zlib_lib_dir $LIBDIR"
fi
fi
dnl ---------------------------------------------------------------------------
dnl Check for Pixar log-format algorithm.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(pixarlog,
AS_HELP_STRING([--disable-pixarlog],
[disable support for Pixar log-format algorithm (requires Zlib)]),
[HAVE_PIXARLOG=$enableval], [HAVE_PIXARLOG=yes])
if test "$HAVE_ZLIB" = "yes" -a "$HAVE_PIXARLOG" = "yes" ; then
AC_DEFINE(PIXARLOG_SUPPORT, 1,
[Support Pixar log-format algorithm (requires Zlib)])
else
HAVE_PIXARLOG=no
fi
dnl ---------------------------------------------------------------------------
dnl Check for JPEG.
dnl ---------------------------------------------------------------------------
HAVE_JPEG=no
AC_ARG_ENABLE(jpeg,
AS_HELP_STRING([--disable-jpeg],
[disable IJG JPEG library usage (required for JPEG compression, enabled by default)]),,)
AC_ARG_WITH(jpeg-include-dir,
AS_HELP_STRING([--with-jpeg-include-dir=DIR],
[location of IJG JPEG library headers]),,)
AC_ARG_WITH(jpeg-lib-dir,
AS_HELP_STRING([--with-jpeg-lib-dir=DIR],
[location of IJG JPEG library binary]),,)
if test "x$enable_jpeg" != "xno" ; then
if test "x$with_jpeg_lib_dir" != "x" ; then
LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS"
fi
AC_CHECK_LIB(jpeg, jpeg_read_scanlines, [jpeg_lib=yes], [jpeg_lib=no],)
if test "$jpeg_lib" = "no" -a "x$with_jpeg_lib_dir" != "x" ; then
AC_MSG_ERROR([IJG JPEG library not found at $with_jpeg_lib_dir])
fi
if test "x$with_jpeg_include_dir" != "x" ; then
CPPFLAGS="-I$with_jpeg_include_dir $CPPFLAGS"
fi
AC_CHECK_HEADER(jpeglib.h, [jpeg_h=yes], [jpeg_h=no])
if test "$jpeg_h" = "no" -a "x$with_jpeg_include_dir" != "x" ; then
AC_MSG_ERROR([IJG JPEG library headers not found at $with_jpeg_include_dir])
fi
if test "$jpeg_lib" = "yes" -a "$jpeg_h" = "yes" ; then
HAVE_JPEG=yes
fi
fi
if test "$HAVE_JPEG" = "yes" ; then
AC_DEFINE(JPEG_SUPPORT,1,[Support JPEG compression (requires IJG JPEG library)])
LIBS="-ljpeg $LIBS"
if test "$HAVE_RPATH" = "yes" -a "x$with_jpeg_lib_dir" != "x" ; then
LIBDIR="-R $with_jpeg_lib_dir $LIBDIR"
fi
fi
dnl ---------------------------------------------------------------------------
dnl Check for Old JPEG.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(old-jpeg,
AS_HELP_STRING([--enable-old-jpeg],
[enable support for Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)]),
[HAVE_OJPEG=$enableval], [HAVE_OJPEG=no])
if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then
AC_DEFINE(OJPEG_SUPPORT, 1,
[Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library)])
else
HAVE_OJPEG=no
fi
dnl ---------------------------------------------------------------------------
dnl Check for C++.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(cxx,
AS_HELP_STRING([--enable-cxx],
[enable C++ stream API building (requires C++ compiler)]),
[HAVE_CXX=$enableval], [HAVE_CXX=yes])
if test "$HAVE_CXX" = "yes" ; then
AC_DEFINE(CXX_SUPPORT, 1, [Support C++ stream API (requires C++ compiler)])
else
HAVE_CXX=no
fi
AM_CONDITIONAL(HAVE_CXX, test "$HAVE_CXX" = "yes")
dnl ---------------------------------------------------------------------------
dnl Check for OpenGL and GLUT.
dnl ---------------------------------------------------------------------------
HAVE_OPENGL=no
AC_PATH_XTRA
AX_CHECK_GL
AX_CHECK_GLU
AX_CHECK_GLUT
if test "$no_x" != "yes" -a "$no_gl" != "yes" \
-a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then
HAVE_OPENGL=yes
fi
AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes")
dnl ===========================================================================
dnl ``Orthogonal Features''
dnl ===========================================================================
dnl ---------------------------------------------------------------------------
dnl Default handling of strip chopping support.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(strip-chopping,
AS_HELP_STRING([--disable-strip-chopping],
[disable support for strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)]),
[HAVE_STRIPCHOP=$enableval], [HAVE_STRIPCHOP=yes])
AC_ARG_WITH(default-strip-size,
AS_HELP_STRING([--with-default-strip-size=SIZE],
[default size of the strip in bytes (when strip chopping enabled) [[default=8192]]]),,)
if test "$HAVE_STRIPCHOP" = "yes" \
-a "x$with_default_strip_size" != "xno"; then
AC_DEFINE(STRIPCHOP_DEFAULT,TIFF_STRIPCHOP,[Support strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)])
if test "x$with_default_strip_size" = "x" \
-o "x$with_default_strip_size" = "xyes"; then
with_default_strip_size="8192"
fi
AC_DEFINE_UNQUOTED(STRIP_SIZE_DEFAULT,$with_default_strip_size,[Default size of the strip in bytes (when strip chopping enabled)])
fi
dnl ---------------------------------------------------------------------------
dnl Default subifd support.
dnl ---------------------------------------------------------------------------
AC_DEFINE(SUBIFD_SUPPORT,1,[Enable SubIFD tag (330) support])
dnl ---------------------------------------------------------------------------
dnl Default handling of ASSOCALPHA support.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(extrasample-as-alpha,
AS_HELP_STRING([--disable-extrasample-as-alpha],
[the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly]),
[HAVE_EXTRASAMPLE_AS_ALPHA=$enableval],
[HAVE_EXTRASAMPLE_AS_ALPHA=yes])
if test "$HAVE_EXTRASAMPLE_AS_ALPHA" = "yes" ; then
AC_DEFINE(DEFAULT_EXTRASAMPLE_AS_ALPHA, 1,
[Treat extra sample as alpha (default enabled). The RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly.])
fi
dnl ---------------------------------------------------------------------------
dnl Default handling of YCbCr subsampling support.
dnl See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(check-ycbcr-subsampling,
AS_HELP_STRING([--disable-check-ycbcr-subsampling],
[disable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag]),
[CHECK_JPEG_YCBCR_SUBSAMPLING=$enableval],
[CHECK_JPEG_YCBCR_SUBSAMPLING=yes])
if test "$CHECK_JPEG_YCBCR_SUBSAMPLING" = "yes" ; then
AC_DEFINE(CHECK_JPEG_YCBCR_SUBSAMPLING, 1,
[Pick up YCbCr subsampling info from the JPEG data stream to support files lacking the tag (default enabled).])
fi
dnl ---------------------------------------------------------------------------
AC_SUBST(LIBDIR)
AC_CONFIG_HEADERS([libtiff/tif_config.h libtiff/tiffconf.h])
AC_CONFIG_FILES([Makefile \
contrib/Makefile \
contrib/acorn/Makefile \
contrib/addtiffo/Makefile \
contrib/dbs/Makefile \
contrib/dbs/xtiff/Makefile \
contrib/iptcutil/Makefile \
contrib/mac-cw/Makefile \
contrib/mac-mpw/Makefile \
contrib/mfs/Makefile \
contrib/ojpeg/Makefile \
contrib/pds/Makefile \
contrib/ras/Makefile \
contrib/stream/Makefile \
contrib/tags/Makefile \
contrib/win_dib/Makefile \
html/Makefile \
html/images/Makefile \
html/man/Makefile \
libtiff/Makefile \
man/Makefile \
port/Makefile \
test/Makefile \
tools/Makefile])
AC_OUTPUT
dnl ---------------------------------------------------------------------------
dnl Display configuration status
dnl ---------------------------------------------------------------------------
LOC_MSG()
LOC_MSG([Libtiff is now configured for ${host}])
LOC_MSG()
LOC_MSG([ Installation directory: ${prefix}])
LOC_MSG([ Documentation directory: ${LIBTIFF_DOCDIR}])
LOC_MSG([ C compiler: ${CC} ${CFLAGS}])
LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}])
LOC_MSG([ Enable runtime linker paths: ${HAVE_RPATH}])
LOC_MSG([ Support Microsoft Document Imaging: ${HAVE_MDI}])
LOC_MSG()
LOC_MSG([ Support for internal codecs:])
LOC_MSG([ CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}])
LOC_MSG([ Macintosh PackBits algorithm: ${HAVE_PACKBITS}])
LOC_MSG([ LZW algorithm: ${HAVE_LZW}])
LOC_MSG([ ThunderScan 4-bit RLE algorithm: ${HAVE_THUNDER}])
LOC_MSG([ NeXT 2-bit RLE algorithm: ${HAVE_NEXT}])
LOC_MSG([ LogLuv high dynamic range encoding: ${HAVE_LOGLUV}])
LOC_MSG()
LOC_MSG([ Support for external codecs:])
LOC_MSG([ ZLIB support: ${HAVE_ZLIB}])
LOC_MSG([ Pixar log-format algorithm: ${HAVE_PIXARLOG}])
LOC_MSG([ JPEG support: ${HAVE_JPEG}])
LOC_MSG([ Old JPEG support: ${HAVE_OJPEG}])
LOC_MSG()
LOC_MSG([ C++ support: ${HAVE_CXX}])
LOC_MSG()
LOC_MSG([ OpenGL support: ${HAVE_OPENGL}])
LOC_MSG()

View File

@ -0,0 +1,29 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = README
SUBDIRS = acorn addtiffo dbs iptcutil mac-cw mac-mpw mfs ojpeg pds ras stream tags win_dib

View File

@ -0,0 +1,543 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.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 = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = README
SUBDIRS = acorn addtiffo dbs iptcutil mac-cw mac-mpw mfs ojpeg pds ras stream tags win_dib
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
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) \
|| eval $$failcom; \
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:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
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) \
|| eval $$failcom; \
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; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
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; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
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_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(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:
-test -z "$(CONFIG_CLEAN_FILES)" || 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 clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
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 mostlyclean-libtool
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-libtool clean-recursive ctags \
ctags-recursive distclean distclean-generic distclean-libtool \
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-libtool \
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:

View File

@ -0,0 +1,2 @@
This directory contains various contributions from libtiff users.

View File

@ -0,0 +1,165 @@
# Project: LibTIFF
# Toolflags:
CCflags = -c -zo -ffah -depend !Depend -IC:
C++flags = -c -depend !Depend -IC: -throwback
Linkflags = -aif -c++ -o $@
DrLinkflags = -nounused -aif -c++ -o $@
ObjAsmflags = -throwback -NoCache -depend !Depend
CMHGflags =
LibFileflags = -c -o $@
Squeezeflags = -o $@
# Final targets:
@.o.LIBTIFF: \
@.o.tif_acorn \
@.o.tif_aux \
@.o.tif_close \
@.o.tif_codec \
@.o.tif_compress \
@.o.tif_dir \
@.o.tif_dirinfo \
@.o.tif_dirread \
@.o.tif_dirwrite \
@.o.tif_dumpmode \
@.o.tif_error \
@.o.tif_fax3 \
@.o.tif_flush \
@.o.tif_getimage \
@.o.tif_jpeg \
@.o.tif_lzw \
@.o.tif_next \
@.o.tif_open \
@.o.tif_packbits \
@.o.tif_predict \
@.o.tif_print \
@.o.tif_read \
@.o.tif_strip \
@.o.tif_swab \
@.o.tif_thunder \
@.o.tif_tile \
@.o.tif_version \
@.o.tif_warning \
@.o.tif_write \
@.o.tif_zip \
@.o.tif_fax3sm \
@.h.version
LibFile $(LibFileflags) \
@.o.tif_acorn \
@.o.tif_aux \
@.o.tif_close \
@.o.tif_codec \
@.o.tif_compress \
@.o.tif_dir \
@.o.tif_dirinfo \
@.o.tif_dirread \
@.o.tif_dirwrite \
@.o.tif_dumpmode \
@.o.tif_error \
@.o.tif_fax3 \
@.o.tif_flush \
@.o.tif_getimage \
@.o.tif_jpeg \
@.o.tif_lzw \
@.o.tif_next \
@.o.tif_open \
@.o.tif_packbits \
@.o.tif_predict \
@.o.tif_print \
@.o.tif_read \
@.o.tif_strip \
@.o.tif_swab \
@.o.tif_thunder \
@.o.tif_tile \
@.o.tif_version \
@.o.tif_warning \
@.o.tif_write \
@.o.tif_zip \
@.o.tif_fax3sm
# User-editable dependencies:
@.mkversion: @.o.mkversion C:o.Stubs
Link $(linkflags) @.o.mkversion C:o.Stubs
@.h.version: @.VERSION @.mkversion
<Prefix$Dir>.mkversion -v @.VERSION -a @.tiff/alpha @.h.version
@.mkg3states: @.o.mkg3states @.o.getopt C:o.Stubs
link $(linkflags) @.o.mkg3states C:o.Stubs @.o.getopt
@.c.tif_fax3sm: @.mkg3states
<Prefix$Dir>.mkg3states -c const @.c.tif_fax3sm
# Static dependencies:
@.o.tif_acorn: @.c.tif_acorn
cc $(ccflags) -o @.o.tif_acorn @.c.tif_acorn
@.o.tif_aux: @.c.tif_aux
cc $(ccflags) -o @.o.tif_aux @.c.tif_aux
@.o.tif_close: @.c.tif_close
cc $(ccflags) -o @.o.tif_close @.c.tif_close
@.o.tif_codec: @.c.tif_codec
cc $(ccflags) -o @.o.tif_codec @.c.tif_codec
@.o.tif_compress: @.c.tif_compress
cc $(ccflags) -o @.o.tif_compress @.c.tif_compress
@.o.tif_dir: @.c.tif_dir
cc $(ccflags) -o @.o.tif_dir @.c.tif_dir
@.o.tif_dirinfo: @.c.tif_dirinfo
cc $(ccflags) -o @.o.tif_dirinfo @.c.tif_dirinfo
@.o.tif_dirread: @.c.tif_dirread
cc $(ccflags) -o @.o.tif_dirread @.c.tif_dirread
@.o.tif_dirwrite: @.c.tif_dirwrite
cc $(ccflags) -o @.o.tif_dirwrite @.c.tif_dirwrite
@.o.tif_dumpmode: @.c.tif_dumpmode
cc $(ccflags) -o @.o.tif_dumpmode @.c.tif_dumpmode
@.o.tif_error: @.c.tif_error
cc $(ccflags) -o @.o.tif_error @.c.tif_error
@.o.tif_fax3: @.c.tif_fax3
cc $(ccflags) -o @.o.tif_fax3 @.c.tif_fax3
@.o.tif_flush: @.c.tif_flush
cc $(ccflags) -o @.o.tif_flush @.c.tif_flush
@.o.tif_getimage: @.c.tif_getimage
cc $(ccflags) -o @.o.tif_getimage @.c.tif_getimage
@.o.tif_jpeg: @.c.tif_jpeg
cc $(ccflags) -o @.o.tif_jpeg @.c.tif_jpeg
@.o.tif_lzw: @.c.tif_lzw
cc $(ccflags) -o @.o.tif_lzw @.c.tif_lzw
@.o.tif_next: @.c.tif_next
cc $(ccflags) -o @.o.tif_next @.c.tif_next
@.o.tif_open: @.c.tif_open
cc $(ccflags) -o @.o.tif_open @.c.tif_open
@.o.tif_packbits: @.c.tif_packbits
cc $(ccflags) -o @.o.tif_packbits @.c.tif_packbits
@.o.tif_predict: @.c.tif_predict
cc $(ccflags) -o @.o.tif_predict @.c.tif_predict
@.o.tif_print: @.c.tif_print
cc $(ccflags) -o @.o.tif_print @.c.tif_print
@.o.tif_read: @.c.tif_read
cc $(ccflags) -o @.o.tif_read @.c.tif_read
@.o.tif_strip: @.c.tif_strip
cc $(ccflags) -o @.o.tif_strip @.c.tif_strip
@.o.tif_swab: @.c.tif_swab
cc $(ccflags) -o @.o.tif_swab @.c.tif_swab
@.o.tif_thunder: @.c.tif_thunder
cc $(ccflags) -o @.o.tif_thunder @.c.tif_thunder
@.o.tif_tile: @.c.tif_tile
cc $(ccflags) -o @.o.tif_tile @.c.tif_tile
@.o.tif_version: @.c.tif_version
cc $(ccflags) -o @.o.tif_version @.c.tif_version
@.o.tif_warning: @.c.tif_warning
cc $(ccflags) -o @.o.tif_warning @.c.tif_warning
@.o.tif_write: @.c.tif_write
cc $(ccflags) -o @.o.tif_write @.c.tif_write
@.o.tif_zip: @.c.tif_zip
cc $(ccflags) -o @.o.tif_zip @.c.tif_zip
@.o.mkg3states: @.c.mkg3states
cc $(ccflags) -o @.o.mkg3states @.c.mkg3states
@.o.getopt: @.c.getopt
cc $(ccflags) -o @.o.getopt @.c.getopt
@.o.mkspans: @.c.mkspans
cc $(ccflags) -o @.o.mkspans @.c.mkspans
@.o.tif_fax3sm: @.c.tif_fax3sm
cc $(ccflags) -o @.o.tif_fax3sm @.c.tif_fax3sm
@.o.mkversion: @.c.mkversion
cc $(ccflags) -o @.o.mkversion @.c.mkversion
# Dynamic dependencies:

View File

@ -0,0 +1,27 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = Makefile.acorn ReadMe SetVars cleanlib convert install

View File

@ -0,0 +1,385 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/acorn
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = Makefile.acorn ReadMe SetVars cleanlib convert install
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/acorn/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/acorn/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,79 @@
Building the Software on an Acorn RISC OS system
The directory contrib/acorn contains support for compiling the library under
Acorn C/C++ under Acorn's RISC OS 3.10 or above. Subsequent pathnames will
use the Acorn format: The full-stop or period character is a pathname
delimeter, and the slash character is not interpreted; the reverse position
from Unix. Thus "libtiff/tif_acorn.c" becomes "libtiff.tif_acorn/c".
This support was contributed by Peter Greenham.
(peterg@angmulti.demon.co.uk).
Installing LibTIFF:
LIBTIFF uses several files which have names longer than the normal RISC OS
maximum of ten characters. This complicates matters. Maybe one day Acorn will
address the problem and implement long filenames properly. Until then this
gets messy, especially as I'm trying to do this with obeyfiles and not have
to include binaries in this distribution.
First of all, ensure you have Truncate configured on (type *Configure
Truncate On) Although it is, of course, preferable to have long filenames,
LIBTIFF can be installed with short filenames, and it will compile and link
without problems. However, getting it there is more problematic.
contrib.acorn.install is an installation obeyfile which will create a normal
Acorn-style library from the source (ie: with c, h and o folders etc.), but
needs the distribution library to have been unpacked into a location which is
capable of supporting long filenames, even if only temporarily.
My recommendation, until Acorn address this problem properly, is to use Jason
Tribbeck's LongFilenames , or any other working system that gives you long
filenames, like a nearby NFS server for instance.
If you are using Longfilenames, even if only temporarily to install LIBTIFF,
unpack the TAR into a RAMDisc which has been longfilenamed (ie: *addlongfs
ram) and then install from there to the hard disk. Unfortunately
Longfilenames seems a bit unhappy about copying a bunch of long-named files
across the same filing system, but is happy going between systems. You'll
need to create a ramdisk of about 2Mb.
Now you can run the installation script I've supplied (in contrib.acorn),
which will automate the process of installing LIBTIFF as an Acorn-style
library. The syntax is as follows:
install <source_dir> <dest_dir>
Install will then create <dest_dir> and put the library in there. For
example, having used LongFilenames on the RAMDisk and unpacked the library
into there, you can then type:
Obey RAM::RamDisc0.$.contrib.acorn.install RAM::RamDisc0.$ ADFS::4.$.LIBTIFF
It doesn't matter if the destination location can cope with long filenames or
not. The filenames will be truncated if necessary (*Configure Truncate On if
you get errors) and all will be well.
Compiling LibTIFF:
Once the LibTIFF folder has been created and the files put inside, making the
library should be just a matter of running 'SetVars' to set the appropriate
system variables, then running 'Makefile'.
OSLib
OSLib is a comprehensive API for RISC OS machines, written by Jonathan
Coxhead of Acorn Computers (although OSLib is not an official Acorn product).
Using the OSLib SWI veneers produces code which is more compact and more
efficient than code written using _kernel_swi or _swi. The Acorn port of
LibTIFF can take advantage of this if present. Edit the Makefile and go to
the Static dependencies section. The first entry is:
# Static dependencies:
@.o.tif_acorn: @.c.tif_acorn
cc $(ccflags) -o @.o.tif_acorn @.c.tif_acorn
Change the cc line to:
cc $(ccflags) -DINCLUDE_OSLIB -o @.o.tif_acorn @.c.tif_acorn
Remember, however, that OSLib is only recommended for efficiency's sake. It
is not required.

View File

@ -0,0 +1,3 @@
Set LibTIFF$Dir <Obey$Dir>
Set LibTIFF$Path <LibTIFF$Dir>.
Set C$Path <C$Path>,LibTIFF:

View File

@ -0,0 +1,5 @@
IfThere LibTIFF:o.* THEN Wipe LibTIFF:o.* ~CFR~V
IfThere LibTIFF:c.tif_fax3sm THEN Delete LibTIFF:c.tif_fax3sm
IfThere LibTIFF:mkg3states THEN Delete LibTIFF:mkg3states
IfThere LibTIFF:h.version THEN Delete LibTIFF:h.version
IfThere LibTIFF:mkversion THEN Delete LibTIFF:mkversion

View File

@ -0,0 +1,175 @@
RISC OS Conversion log
======================
mkversion.c
~~~~~~~~~~~
The RISC OS command-line does not allow the direct creation of the version.h
file in the proper manner. To remedy this in such a way that the version
header is made at compiletime, I wrote this small program. It is fully
portable, so should work quite happily for any other platform that might need
it.
msg3states.c
~~~~~~~~~~~~
Needed getopt.c from the port folder, then compiled and worked fine.
tiff.h
~~~~~~
====1====
The symbol _MIPS_SZLONG, if not defined, causes a compiler error. Fixed by
ensuring it does exist. This looks to me like this wouldn't be an
Acorn-specific problem. The new code fragment is as follows:
#ifndef _MIPS_SZLONG
#define _MIPS_SZLONG 32
#endif
#if defined(__alpha) || _MIPS_SZLONG == 64
tiffcomp.h
~~~~~~~~~~
====1====
#if !defined(__MWERKS__) && !defined(THINK_C)
#include <sys/types.h>
#endif
Acorn also doesn't have this header so:
#if !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acorn)
#include <sys/types.h>
#endif
====2====
#ifdef VMS
#include <file.h>
#include <unixio.h>
#else
#include <fcntl.h>
#endif
This seems to indicate that fcntl.h is included on all systems except
VMS. Odd, because I've never heard of it before. Sure it's in the ANSI
definition? Anyway, following change:
#ifdef VMS
#include <file.h>
#include <unixio.h>
#else
#ifndef __acorn
#include <fcntl.h>
#endif
#endif
This will probably change when I find out what it wants from fcntl.h!
====3====
#if defined(__MWERKS__) || defined(THINK_C) || defined(applec)
#include <stdlib.h>
#define BSDTYPES
#endif
Added RISC OS to above thus:
#if defined(__MWERKS__) || defined(THINK_C) || defined(applec) || defined(__acorn)
#include <stdlib.h>
#define BSDTYPES
#endif
====4====
/*
* The library uses the ANSI C/POSIX SEEK_*
* definitions that should be defined in unistd.h
* (except on VMS where they are in stdio.h and
* there is no unistd.h).
*/
#ifndef SEEK_SET
#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__)
#include <unistd.h>
#endif
RISC OS is like VMS and Mac in this regard. So changed to:
/*
* The library uses the ANSI C/POSIX SEEK_*
* definitions that should be defined in unistd.h
* (except on VMS or the Mac or RISC OS, where they are in stdio.h and
* there is no unistd.h).
*/
#ifndef SEEK_SET
#if !defined(VMS) && !defined (applec) && !defined(THINK_C) && !defined(__MWERKS__) && !defined(__acorn)
#include <unistd.h>
#endif
#endif
====5====
NB: HAVE_IEEEFP is defined in tiffconf.h, not tiffcomp.h as mentioned
in libtiff.README. (Note written on original port from 3.4beta004)
Acorn C/C++ claims to accord with IEEE 754, so no change (yet) to
tiffconf.h.
====6====
Unsure about whether this compiler supports inline functions. Will
leave it on for the time being and see if it works! (Likely if
everything else does.)
... Seems to be OK ...
====7====
Added to the end:
/*
* osfcn.h is part of C++Lib on Acorn C/C++, and as such can't be used
* on C alone. For that reason, the relevant functions have been
* implemented by myself in tif_acorn.c, and the elements from the header
* included here.
*/
#ifdef __acorn
#ifdef __cplusplus
#include <osfcn.h>
#else
#include "kernel.h"
#define O_RDONLY 0
#define O_WRONLY 1
#define O_RDWR 2
#define O_APPEND 8
#define O_CREAT 0x200
#define O_TRUNC 0x400
typedef long off_t;
extern int open(const char *name, int flags, int mode);
extern int close(int fd);
extern int write(int fd, const char *buf, int nbytes);
extern int read(int fd, char *buf, int nbytes);
extern off_t lseek(int fd, off_t offset, int whence);
#endif
#endif
===============================================================================
tif_acorn.c
~~~~~~~~~~~
Created file tif_acorn.c, copied initially from tif_unix.c
Documented internally where necessary.
Note that I have implemented the low-level file-handling functions normally
found in osfcn.h in here, and put the header info at the bottom of
tiffcomp.h. This is further documented from a RISC OS perspective inside the
file.
===============================================================================

View File

@ -0,0 +1,128 @@
If "%0" = "" Then Error Syntax: install |<source_dir> |<dest_dir>
If "%1" = "" Then Error Syntax: install |<source_dir> |<dest_dir>
Set LibTiffInstall$Dir %0
Set LibTiff$Dir %1
Set Alias$CPY Copy <LibTiffInstall$Dir>.%%0 <LibTiff$Dir>.%%1 ~C~DF~NRV
CDir <LibTiff$Dir>
CDir <LibTiff$Dir>.c
CDir <LibTiff$Dir>.h
CDir <LibTiff$Dir>.o
CPY COPYRIGHT COPYRIGHT
CPY README README
CPY VERSION VERSION
CPY dist.tiff/alpha tiff/alpha
CPY contrib.acorn.SetVars SetVars
CPY contrib.acorn.Makefile Makefile
CPY contrib.acorn.cleanlib cleanlib
CPY port.getopt/c c.getopt
CPY libtiff.mkg3states/c c.mkg3states
CPY libtiff.mkspans/c c.mkspans
CPY libtiff.mkversion/c c.mkversion
CPY libtiff.tif_acorn/c c.tif_acorn
CPY libtiff.tif_aux/c c.tif_aux
CPY libtiff.tif_close/c c.tif_close
CPY libtiff.tif_codec/c c.tif_codec
CPY libtiff.tif_compress/c c.tif_compre
CPY libtiff.tif_dir/c c.tif_dir
CPY libtiff.tif_dirinfo/c c.tif_dirinf
CPY libtiff.tif_dirread/c c.tif_dirrea
CPY libtiff.tif_dirwrite/c c.tif_dirwri
CPY libtiff.tif_dumpmode/c c.tif_dumpmo
CPY libtiff.tif_error/c c.tif_error
CPY libtiff.tif_fax3/c c.tif_fax3
CPY libtiff.tif_flush/c c.tif_flush
CPY libtiff.tif_getimage/c c.tif_getima
CPY libtiff.tif_jpeg/c c.tif_jpeg
CPY libtiff.tif_lzw/c c.tif_lzw
CPY libtiff.tif_next/c c.tif_next
CPY libtiff.tif_open/c c.tif_open
CPY libtiff.tif_packbits/c c.tif_packbi
CPY libtiff.tif_predict/c c.tif_predic
CPY libtiff.tif_print/c c.tif_print
CPY libtiff.tif_read/c c.tif_read
CPY libtiff.tif_strip/c c.tif_strip
CPY libtiff.tif_swab/c c.tif_swab
CPY libtiff.tif_thunder/c c.tif_thunde
CPY libtiff.tif_tile/c c.tif_tile
CPY libtiff.tif_version/c c.tif_versio
CPY libtiff.tif_warning/c c.tif_warnin
CPY libtiff.tif_write/c c.tif_write
CPY libtiff.tif_zip/c c.tif_zip
CPY libtiff.t4/h h.t4
CPY libtiff.tiff/h h.tiff
CPY libtiff.tiffcomp/h h.tiffcomp
CPY libtiff.tiffconf/h h.tiffconf
CPY libtiff.tiffio/h h.tiffio
CPY libtiff.tiffiop/h h.tiffiop
CPY libtiff.tif_dir/h h.tif_dir
CPY libtiff.tif_fax3/h h.tif_fax3
CPY libtiff.tif_predict/h h.tif_predic
SetType <LibTiff$Dir>.COPYRIGHT Text
SetType <LibTiff$Dir>.README Text
SetType <LibTiff$Dir>.VERSION Text
SetType <LibTiff$Dir>.tiff/alpha Text
SetType <LibTiff$Dir>.SetVars Obey
SetType <LibTiff$Dir>.Makefile fe1
SetType <LibTiff$Dir>.cleanlib Obey
SetType <LibTiff$Dir>.c.getopt Text
SetType <LibTiff$Dir>.c.mkg3states Text
SetType <LibTiff$Dir>.c.mkspans Text
SetType <LibTiff$Dir>.c.mkversion Text
SetType <LibTiff$Dir>.c.tif_acorn Text
SetType <LibTiff$Dir>.c.tif_aux Text
SetType <LibTiff$Dir>.c.tif_close Text
SetType <LibTiff$Dir>.c.tif_codec Text
SetType <LibTiff$Dir>.c.tif_compre Text
SetType <LibTiff$Dir>.c.tif_dir Text
SetType <LibTiff$Dir>.c.tif_dirinf Text
SetType <LibTiff$Dir>.c.tif_dirrea Text
SetType <LibTiff$Dir>.c.tif_dirwri Text
SetType <LibTiff$Dir>.c.tif_dumpmo Text
SetType <LibTiff$Dir>.c.tif_error Text
SetType <LibTiff$Dir>.c.tif_fax3 Text
SetType <LibTiff$Dir>.c.tif_flush Text
SetType <LibTiff$Dir>.c.tif_getima Text
SetType <LibTiff$Dir>.c.tif_jpeg Text
SetType <LibTiff$Dir>.c.tif_lzw Text
SetType <LibTiff$Dir>.c.tif_next Text
SetType <LibTiff$Dir>.c.tif_open Text
SetType <LibTiff$Dir>.c.tif_packbi Text
SetType <LibTiff$Dir>.c.tif_predic Text
SetType <LibTiff$Dir>.c.tif_print Text
SetType <LibTiff$Dir>.c.tif_read Text
SetType <LibTiff$Dir>.c.tif_strip Text
SetType <LibTiff$Dir>.c.tif_swab Text
SetType <LibTiff$Dir>.c.tif_thunde Text
SetType <LibTiff$Dir>.c.tif_tile Text
SetType <LibTiff$Dir>.c.tif_versio Text
SetType <LibTiff$Dir>.c.tif_warnin Text
SetType <LibTiff$Dir>.c.tif_write Text
SetType <LibTiff$Dir>.c.tif_zip Text
SetType <LibTiff$Dir>.h.t4 Text
SetType <LibTiff$Dir>.h.tiff Text
SetType <LibTiff$Dir>.h.tiffcomp Text
SetType <LibTiff$Dir>.h.tiffconf Text
SetType <LibTiff$Dir>.h.tiffio Text
SetType <LibTiff$Dir>.h.tiffiop Text
SetType <LibTiff$Dir>.h.tif_dir Text
SetType <LibTiff$Dir>.h.tif_fax3 Text
SetType <LibTiff$Dir>.h.tif_predic Text
Unset Alias$CPY
Unset LibTiffInstall$Dir
| Now attempt to restore longfilename status. If it causes an error, OK.
Set Alias$RN Rename <LibTiff$Dir>.%%0 <LibTiff$Dir>.%%1
Unset LibTiff$Dir
RN c.tif_compre c.tif_compress
RN c.tif_dirinf c.tif_dirinfo
RN c.tif_dirrea c.tif_dirread
RN c.tif_dirwri c.tif_dirwrite
RN c.tif_dumpmo c.tif_dumpmode
RN c.tif_getima c.tif_getimage
RN c.tif_packbi c.tif_packbits
RN c.tif_predic c.tif_predict
RN c.tif_thunde c.tif_thunder
RN c.tif_versio c.tif_version
RN c.tif_warnin c.tif_warning
RN h.tif_predic h.tif_predict
Unset Alias$RN
Echo All done!

View File

@ -0,0 +1,36 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
EXTRA_DIST = README Makefile.vc
noinst_PROGRAMS = addtiffo
addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h
addtiffo_LDADD = $(LIBTIFF)
INCLUDES = -I$(top_srcdir)/libtiff

View File

@ -0,0 +1,501 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
noinst_PROGRAMS = addtiffo$(EXEEXT)
subdir = contrib/addtiffo
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_addtiffo_OBJECTS = addtiffo.$(OBJEXT) tif_overview.$(OBJEXT) \
tif_ovrcache.$(OBJEXT)
addtiffo_OBJECTS = $(am_addtiffo_OBJECTS)
am__DEPENDENCIES_1 = $(top_builddir)/libtiff/libtiff.la
addtiffo_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/libtiff -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(addtiffo_SOURCES)
DIST_SOURCES = $(addtiffo_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
EXTRA_DIST = README Makefile.vc
addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h
addtiffo_LDADD = $(LIBTIFF)
INCLUDES = -I$(top_srcdir)/libtiff
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/addtiffo/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/addtiffo/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
addtiffo$(EXEEXT): $(addtiffo_OBJECTS) $(addtiffo_DEPENDENCIES)
@rm -f addtiffo$(EXEEXT)
$(LINK) $(addtiffo_LDFLAGS) $(addtiffo_OBJECTS) $(addtiffo_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addtiffo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_overview.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ovrcache.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
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: $(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; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
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 -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
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 \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags 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:

View File

@ -0,0 +1,28 @@
#
# If libtiff.a is installed in /usr/lib or /usr/local/lib just point
# LIBTIFF_DIR there. It doesn't need a full libtiff tree.
#
!INCLUDE ..\..\nmake.opt
LIBTIFF_DIR = ..\..\libtiff
#
INCL = -I..\..\libtiff
LIBS = $(LIBTIFF_DIR)\libtiff.lib
addtiffo: addtiffo.obj tif_overview.obj tif_ovrcache.obj
$(CC) $(CFLAGS) addtiffo.obj tif_overview.obj tif_ovrcache.obj \
$(LIBS) /Feaddtiffo.exe
addtiffo.obj: addtiffo.c
$(CC) -c $(CFLAGS) addtiffo.c
tif_overview.obj: tif_overview.c
$(CC) -c $(CFLAGS) tif_overview.c
tif_ovrcache.obj: tif_ovrcache.c
$(CC) -c $(CFLAGS) tif_ovrcache.c
clean:
-del *.obj
-del addtiffo.exe

View File

@ -0,0 +1,142 @@
addtiffo 1.0
============
The addtiffo utility is used to add overview pyramids to an existing
TIFF or GeoTIFF file. Some applications can take advantage of these
overviews to accelerate overview display performance of large rasters.
This release of addtiffo is primarily intended for compatibility testing
with applications, and to see if there is interest in a cleaner release
of the capability ... perhaps incorporation into the libtiff tools
distribution.
Please feel free to contact me with questions, or problems.
warmerda@home.com
http://home.gdal.org/~warmerda/
Usage
-----
Usage: addtiffo [-r {average/nearest} [-subifd]
tiff_filename [resolution_reductions]
Example:
% addtiffo abc.tif 2 4 8 16
The numeric arguments are the list of reduction factors to
generate. In this example a 1/2, 1/4 1/8 and 1/16
Limitations
-----------
See tif_overview.cpp for up to date details.
o Currently only images with bits_per_sample of a multiple of eight
will work.
o The code will attempt to use the same kind of compression,
photometric interpretation, and organization as the source image, but
it doesn't copy geotiff tags to the reduced resolution images.
o Reduced resolution overviews for multi-sample files will currently
always be generated as PLANARCONFIG_SEPARATE. This could be fixed
reasonable easily if needed to improve compatibility with other
packages. Many don't properly support PLANARCONFIG_SEPARATE.
o Overviews are always written as appended IFDs, rather than using the
``tree of tree's'' approach using the SUBIFD tag. I wanted to implement
both, but it isn't currently easy to add a SUBIFD tag to an existing
main tiff IFD with libtiff. I hope to try this again later.
TIFF File Tags
--------------
The results of running addtiffo on a 1024x1024 tiled greyscale file
with the arguments ``2 4 8 16'' is to add four additional TIFF directories
appended on the file with the SUBFILETYPE flag to 0x1 indicating the extra
items are reduced resolution images.
The tiffinfo output of such a file might look like this:
TIFF Directory at offset 0x118008
Image Width: 1024 Image Length: 1024
Tile Width: 256 Tile Length: 112
Bits/Sample: 8
Compression Scheme: none
Photometric Interpretation: min-is-black
Samples/Pixel: 1
Planar Configuration: single image plane
TIFF Directory at offset 0x15e1d2
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 512 Image Length: 512
Tile Width: 256 Tile Length: 112
Bits/Sample: 8
Compression Scheme: none
Photometric Interpretation: min-is-black
Samples/Pixel: 1
Planar Configuration: separate image planes
TIFF Directory at offset 0x1732b8
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 256 Image Length: 256
Tile Width: 256 Tile Length: 112
Bits/Sample: 8
Compression Scheme: none
Photometric Interpretation: min-is-black
Samples/Pixel: 1
Planar Configuration: separate image planes
TIFF Directory at offset 0x17a366
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 128 Image Length: 128
Tile Width: 128 Tile Length: 112
Bits/Sample: 8
Compression Scheme: none
Photometric Interpretation: min-is-black
Samples/Pixel: 1
Planar Configuration: separate image planes
TIFF Directory at offset 0x17b40c
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 64 Image Length: 64
Tile Width: 64 Tile Length: 64
Bits/Sample: 8
Compression Scheme: none
Photometric Interpretation: min-is-black
Samples/Pixel: 1
Planar Configuration: separate image planes
Building
--------
You will need a C compiler. You will need to have libtiff already
built and installed. The provided Makefile should work on most Unix systems.
A similar file will be needed for Windows, but is not provided.
The CFLAGS and LIBS macros in the Makefile will have to be updated to
point to the correct location of the libtiff include files, and library.
Credits
-------
o Intergraph Corporation for partially funding the work.
o Global Geomatics for partially funding reorganization of the overview
building ability as a separate utility.
o Orrin Long, and Ed Grissom of Intergraph for explaining what needed to
be done.
o Max Martinez of Erdas for his discussion of external overviews.
o Atlantis Scientific who supported adding averaging, and some other
generalizations.
o Frank Warmerdam for writing the bulk of the code.
o Sam Leffler since this only exists because of his libtiff.

View File

@ -0,0 +1,165 @@
/******************************************************************************
* $Id: addtiffo.c,v 1.6 2005/12/16 05:59:55 fwarmerdam Exp $
*
* Project: GeoTIFF Overview Builder
* Purpose: Mainline for building overviews in a TIFF file.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
******************************************************************************
* Copyright (c) 1999, Frank Warmerdam
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE 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 SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
******************************************************************************
*
* $Log: addtiffo.c,v $
* Revision 1.6 2005/12/16 05:59:55 fwarmerdam
* Major upgrade to support YCbCr subsampled jpeg images
*
* Revision 1.4 2004/09/21 13:31:23 dron
* Add missed include string.h.
*
* Revision 1.3 2000/04/18 22:48:31 warmerda
* Added support for averaging resampling
*
* Revision 1.2 2000/01/28 15:36:38 warmerda
* pass TIFF handle instead of filename to overview builder
*
* Revision 1.1 1999/08/17 01:47:59 warmerda
* New
*
* Revision 1.1 1999/03/12 17:46:32 warmerda
* New
*
* Revision 1.2 1999/02/11 22:27:12 warmerda
* Added multi-sample support
*
* Revision 1.1 1999/02/11 18:12:30 warmerda
* New
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tiffio.h"
void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
int (*)(double,void*), void * );
/************************************************************************/
/* main() */
/************************************************************************/
int main( int argc, char ** argv )
{
int anOverviews[100]; /* TODO: un-hardwire array length, flexible allocate */
int nOverviewCount = 0;
int bUseSubIFD = 0;
TIFF *hTIFF;
const char *pszResampling = "nearest";
/* -------------------------------------------------------------------- */
/* Usage: */
/* -------------------------------------------------------------------- */
if( argc < 2 )
{
printf( "Usage: addtiffo [-r {nearest,average,mode}]\n"
" tiff_filename [resolution_reductions]\n"
"\n"
"Example:\n"
" %% addtiffo abc.tif 2 4 8 16\n" );
return( 1 );
}
while( argv[1][0] == '-' )
{
if( strcmp(argv[1],"-subifd") == 0 )
{
bUseSubIFD = 1;
argv++;
argc--;
}
else if( strcmp(argv[1],"-r") == 0 )
{
argv += 2;
argc -= 2;
pszResampling = *argv;
}
else
{
fprintf( stderr, "Incorrect parameters\n" );
return( 1 );
}
}
/* TODO: resampling mode parameter needs to be encoded in an integer from this point on */
/* -------------------------------------------------------------------- */
/* Collect the user requested reduction factors. */
/* -------------------------------------------------------------------- */
while( nOverviewCount < argc - 2 && nOverviewCount < 100 )
{
anOverviews[nOverviewCount] = atoi(argv[nOverviewCount+2]);
if( anOverviews[nOverviewCount] <= 0)
{
fprintf( stderr, "Incorrect parameters\n" );
return(1);
}
nOverviewCount++;
}
/* -------------------------------------------------------------------- */
/* Default to four overview levels. It would be nicer if it */
/* defaulted based on the size of the source image. */
/* -------------------------------------------------------------------- */
/* TODO: make it default based on the size of the source image */
if( nOverviewCount == 0 )
{
nOverviewCount = 4;
anOverviews[0] = 2;
anOverviews[1] = 4;
anOverviews[2] = 8;
anOverviews[3] = 16;
}
/* -------------------------------------------------------------------- */
/* Build the overview. */
/* -------------------------------------------------------------------- */
hTIFF = TIFFOpen( argv[1], "r+" );
if( hTIFF == NULL )
{
fprintf( stderr, "TIFFOpen(%s) failed.\n", argv[1] );
return( 1 );
}
TIFFBuildOverviews( hTIFF, nOverviewCount, anOverviews, bUseSubIFD,
pszResampling, NULL, NULL );
TIFFClose( hTIFF );
/* -------------------------------------------------------------------- */
/* Optionally test for memory leaks. */
/* -------------------------------------------------------------------- */
#ifdef DBMALLOC
malloc_dump(1);
#endif
return( 0 );
}

View File

@ -0,0 +1,896 @@
/******************************************************************************
* tif_overview.c,v 1.9 2005/05/25 09:03:16 dron Exp
*
* Project: TIFF Overview Builder
* Purpose: Library function for building overviews in a TIFF file.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
* Notes:
* o Currently only images with bits_per_sample of a multiple of eight
* will work.
*
* o The downsampler currently just takes the top left pixel from the
* source rectangle. Eventually sampling options of averaging, mode, and
* ``center pixel'' should be offered.
*
* o The code will attempt to use the same kind of compression,
* photometric interpretation, and organization as the source image, but
* it doesn't copy geotiff tags to the reduced resolution images.
*
* o Reduced resolution overviews for multi-sample files will currently
* always be generated as PLANARCONFIG_SEPARATE. This could be fixed
* reasonable easily if needed to improve compatibility with other
* packages. Many don't properly support PLANARCONFIG_SEPARATE.
*
******************************************************************************
* Copyright (c) 1999, Frank Warmerdam
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE 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 SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
******************************************************************************
*/
/* TODO: update notes in header above */
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "tiffio.h"
#include "tif_ovrcache.h"
#ifndef FALSE
# define FALSE 0
# define TRUE 1
#endif
#ifndef MAX
# define MIN(a,b) ((a<b) ? a : b)
# define MAX(a,b) ((a>b) ? a : b)
#endif
void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
int (*)(double,void*), void * );
/************************************************************************/
/* TIFF_WriteOverview() */
/* */
/* Create a new directory, without any image data for an overview. */
/* Returns offset of newly created overview directory, but the */
/* current directory is reset to be the one in used when this */
/* function is called. */
/************************************************************************/
uint32 TIFF_WriteOverview( TIFF *hTIFF, int nXSize, int nYSize,
int nBitsPerPixel, int nPlanarConfig, int nSamples,
int nBlockXSize, int nBlockYSize,
int bTiled, int nCompressFlag, int nPhotometric,
int nSampleFormat,
unsigned short *panRed,
unsigned short *panGreen,
unsigned short *panBlue,
int bUseSubIFDs,
int nHorSubsampling, int nVerSubsampling )
{
uint32 nBaseDirOffset;
uint32 nOffset;
nBaseDirOffset = TIFFCurrentDirOffset( hTIFF );
TIFFCreateDirectory( hTIFF );
/* -------------------------------------------------------------------- */
/* Setup TIFF fields. */
/* -------------------------------------------------------------------- */
TIFFSetField( hTIFF, TIFFTAG_IMAGEWIDTH, nXSize );
TIFFSetField( hTIFF, TIFFTAG_IMAGELENGTH, nYSize );
if( nSamples == 1 )
TIFFSetField( hTIFF, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG );
else
TIFFSetField( hTIFF, TIFFTAG_PLANARCONFIG, nPlanarConfig );
TIFFSetField( hTIFF, TIFFTAG_BITSPERSAMPLE, nBitsPerPixel );
TIFFSetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, nSamples );
TIFFSetField( hTIFF, TIFFTAG_COMPRESSION, nCompressFlag );
TIFFSetField( hTIFF, TIFFTAG_PHOTOMETRIC, nPhotometric );
TIFFSetField( hTIFF, TIFFTAG_SAMPLEFORMAT, nSampleFormat );
if( bTiled )
{
TIFFSetField( hTIFF, TIFFTAG_TILEWIDTH, nBlockXSize );
TIFFSetField( hTIFF, TIFFTAG_TILELENGTH, nBlockYSize );
}
else
TIFFSetField( hTIFF, TIFFTAG_ROWSPERSTRIP, nBlockYSize );
TIFFSetField( hTIFF, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE );
if( nPhotometric == PHOTOMETRIC_YCBCR || nPhotometric == PHOTOMETRIC_ITULAB )
{
TIFFSetField( hTIFF, TIFFTAG_YCBCRSUBSAMPLING, nHorSubsampling, nVerSubsampling);
/* TODO: also write YCbCrPositioning and YCbCrCoefficients tag identical to source IFD */
}
/* TODO: add command-line parameter for selecting jpeg compression quality
* that gets ignored when compression isn't jpeg */
/* -------------------------------------------------------------------- */
/* Write color table if one is present. */
/* -------------------------------------------------------------------- */
if( panRed != NULL )
{
TIFFSetField( hTIFF, TIFFTAG_COLORMAP, panRed, panGreen, panBlue );
}
/* -------------------------------------------------------------------- */
/* Write directory, and return byte offset. */
/* -------------------------------------------------------------------- */
if( TIFFWriteCheck( hTIFF, bTiled, "TIFFBuildOverviews" ) == 0 )
return 0;
TIFFWriteDirectory( hTIFF );
TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) );
nOffset = TIFFCurrentDirOffset( hTIFF );
TIFFSetSubDirectory( hTIFF, nBaseDirOffset );
return nOffset;
}
/************************************************************************/
/* TIFF_GetSourceSamples() */
/************************************************************************/
static void
TIFF_GetSourceSamples( double * padfSamples, unsigned char *pabySrc,
int nPixelBytes, int nSampleFormat,
int nXSize, int nYSize,
int nPixelOffset, int nLineOffset )
{
int iXOff, iYOff, iSample;
iSample = 0;
for( iYOff = 0; iYOff < nYSize; iYOff++ )
{
for( iXOff = 0; iXOff < nXSize; iXOff++ )
{
unsigned char *pabyData;
pabyData = pabySrc + iYOff * nLineOffset + iXOff * nPixelOffset;
if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1 )
{
padfSamples[iSample++] = *pabyData;
}
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2 )
{
padfSamples[iSample++] = ((uint16 *) pabyData)[0];
}
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4 )
{
padfSamples[iSample++] = ((uint32 *) pabyData)[0];
}
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2 )
{
padfSamples[iSample++] = ((int16 *) pabyData)[0];
}
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32 )
{
padfSamples[iSample++] = ((int32 *) pabyData)[0];
}
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4 )
{
padfSamples[iSample++] = ((float *) pabyData)[0];
}
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8 )
{
padfSamples[iSample++] = ((double *) pabyData)[0];
}
}
}
}
/************************************************************************/
/* TIFF_SetSample() */
/************************************************************************/
static void
TIFF_SetSample( unsigned char * pabyData, int nPixelBytes, int nSampleFormat,
double dfValue )
{
if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1 )
{
*pabyData = (unsigned char) MAX(0,MIN(255,dfValue));
}
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2 )
{
*((uint16 *)pabyData) = (uint16) MAX(0,MIN(65535,dfValue));
}
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4 )
{
*((uint32 *)pabyData) = (uint32) dfValue;
}
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2 )
{
*((int16 *)pabyData) = (int16) MAX(-32768,MIN(32767,dfValue));
}
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32 )
{
*((int32 *)pabyData) = (int32) dfValue;
}
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4 )
{
*((float *)pabyData) = (float) dfValue;
}
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8 )
{
*((double *)pabyData) = dfValue;
}
}
/************************************************************************/
/* TIFF_DownSample() */
/* */
/* Down sample a tile of full res data into a window of a tile */
/* of downsampled data. */
/************************************************************************/
static
void TIFF_DownSample( unsigned char *pabySrcTile,
int nBlockXSize, int nBlockYSize,
int nPixelSkewBits, int nBitsPerPixel,
unsigned char * pabyOTile,
int nOBlockXSize, int nOBlockYSize,
int nTXOff, int nTYOff, int nOMult,
int nSampleFormat, const char * pszResampling )
{
int i, j, k, nPixelBytes = (nBitsPerPixel) / 8;
int nPixelGroupBytes = (nBitsPerPixel+nPixelSkewBits)/8;
unsigned char *pabySrc, *pabyDst;
double *padfSamples;
assert( nBitsPerPixel >= 8 );
padfSamples = (double *) malloc(sizeof(double) * nOMult * nOMult);
/* ==================================================================== */
/* Loop over scanline chunks to process, establishing where the */
/* data is going. */
/* ==================================================================== */
for( j = 0; j*nOMult < nBlockYSize; j++ )
{
if( j + nTYOff >= nOBlockYSize )
break;
pabyDst = pabyOTile + ((j+nTYOff)*nOBlockXSize + nTXOff)
* nPixelBytes * nPixelGroupBytes;
/* -------------------------------------------------------------------- */
/* Handler nearest resampling ... we don't even care about the */
/* data type, we just do a bytewise copy. */
/* -------------------------------------------------------------------- */
if( strncmp(pszResampling,"nearest",4) == 0
|| strncmp(pszResampling,"NEAR",4) == 0 )
{
pabySrc = pabySrcTile + j*nOMult*nBlockXSize * nPixelGroupBytes;
for( i = 0; i*nOMult < nBlockXSize; i++ )
{
if( i + nTXOff >= nOBlockXSize )
break;
/*
* For now use simple subsampling, from the top left corner
* of the source block of pixels.
*/
for( k = 0; k < nPixelBytes; k++ )
pabyDst[k] = pabySrc[k];
pabyDst += nPixelBytes * nPixelGroupBytes;
pabySrc += nOMult * nPixelGroupBytes;
}
}
/* -------------------------------------------------------------------- */
/* Handle the case of averaging. For this we also have to */
/* handle each sample format we are concerned with. */
/* -------------------------------------------------------------------- */
else if( strncmp(pszResampling,"averag",6) == 0
|| strncmp(pszResampling,"AVERAG",6) == 0 )
{
pabySrc = pabySrcTile + j*nOMult*nBlockXSize * nPixelGroupBytes;
for( i = 0; i*nOMult < nBlockXSize; i++ )
{
double dfTotal;
int iSample;
int nXSize, nYSize;
if( i + nTXOff >= nOBlockXSize )
break;
nXSize = MIN(nOMult,nBlockXSize-i);
nYSize = MIN(nOMult,nBlockYSize-j);
TIFF_GetSourceSamples( padfSamples, pabySrc,
nPixelBytes, nSampleFormat,
nXSize, nYSize,
nPixelGroupBytes,
nPixelGroupBytes * nBlockXSize );
dfTotal = 0;
for( iSample = 0; iSample < nXSize*nYSize; iSample++ )
{
dfTotal += padfSamples[iSample];
}
TIFF_SetSample( pabyDst, nPixelBytes, nSampleFormat,
dfTotal / (nXSize*nYSize) );
pabySrc += nOMult * nPixelGroupBytes;
pabyDst += nPixelBytes;
}
}
}
free( padfSamples );
}
static
void TIFF_DownSample_Subsampled( unsigned char *pabySrcTile, int nSample,
int nBlockXSize, int nBlockYSize,
unsigned char * pabyOTile,
int nOBlockXSize, int nOBlockYSize,
int nTXOff, int nTYOff, int nOMult,
const char * pszResampling,
int nHorSubsampling, int nVerSubsampling )
{
/* TODO: test with variety of subsampling values, and incovinient tile/strip sizes */
int nSampleBlockSize;
int nSourceSampleRowSize;
int nDestSampleRowSize;
int nSourceX, nSourceY;
int nSourceXSec, nSourceYSec;
int nSourceXSecEnd, nSourceYSecEnd;
int nDestX, nDestY;
int nSampleOffsetInSampleBlock;
unsigned char * pSourceBase;
unsigned char * pDestBase;
int nSourceBaseInc;
unsigned char * pSourceBaseEnd;
unsigned int nCummulator;
unsigned int nCummulatorCount;
nSampleBlockSize = nHorSubsampling * nVerSubsampling + 2;
nSourceSampleRowSize = ( ( nBlockXSize + nHorSubsampling - 1 ) / nHorSubsampling ) * nSampleBlockSize;
nDestSampleRowSize = ( ( nOBlockXSize + nHorSubsampling - 1 ) / nHorSubsampling ) * nSampleBlockSize;
if( strncmp(pszResampling,"nearest",4) == 0
|| strncmp(pszResampling,"NEAR",4) == 0 )
{
if( nSample == 0 )
{
#ifdef NOOPTIMIZATION
/*
* This version is not optimized, and should not be used except as documentation and as more clear
* starting point for bug fixes (hope not) and extension
*/
for( nSourceY = 0, nDestY = nTYOff; nSourceY < nBlockYSize; nSourceY += nOMult, nDestY ++)
{
for( nSourceX = 0, nDestX = nTXOff; nSourceX < nBlockXSize; nSourceX += nOMult, nDestX ++)
{
* ( pabyOTile + ( nDestY / nVerSubsampling ) * nDestSampleRowSize
+ ( nDestY % nVerSubsampling ) * nHorSubsampling
+ ( nDestX / nHorSubsampling ) * nSampleBlockSize
+ ( nDestX % nHorSubsampling ) ) =
* ( pabySrcTile + ( nSourceY / nVerSubsampling ) * nSourceSampleRowSize
+ ( nSourceY % nVerSubsampling ) * nHorSubsampling
+ ( nSourceX / nHorSubsampling ) * nSampleBlockSize
+ ( nSourceX % nHorSubsampling ) );
}
}
#else
for( nSourceY = 0, nDestY = nTYOff; nSourceY < nBlockYSize; nSourceY += nOMult, nDestY ++)
{
pSourceBase = pabySrcTile + ( nSourceY / nVerSubsampling ) * nSourceSampleRowSize
+ ( nSourceY % nVerSubsampling ) * nHorSubsampling;
pDestBase = pabyOTile + ( nDestY / nVerSubsampling ) * nDestSampleRowSize
+ ( nDestY % nVerSubsampling ) * nHorSubsampling;
for( nSourceX = 0, nDestX = nTXOff; nSourceX < nBlockXSize; nSourceX += nOMult, nDestX ++)
{
* ( pDestBase + ( nDestX / nHorSubsampling ) * nSampleBlockSize
+ ( nDestX % nHorSubsampling ) ) =
* ( pSourceBase + ( nSourceX / nHorSubsampling ) * nSampleBlockSize
+ ( nSourceX % nHorSubsampling ) );
}
}
#endif
}
else
{
#ifdef NOOPTIMIZATION
/*
* This version is not optimized, and should not be used except as documentation and as more clear
* starting point for bug fixes (hope not) and extension
*/
nSampleOffsetInSampleBlock = nHorSubsampling * nVerSubsampling + nSample - 1;
for( nSourceY = 0, nDestY = ( nTYOff / nVerSubsampling ); nSourceY < ( nBlockYSize / nVerSubsampling );
nSourceY += nOMult, nDestY ++)
{
for( nSourceX = 0, nDestX = ( nTXOff / nHorSubsampling ); nSourceX < ( nBlockXSize / nHorSubsampling );
nSourceX += nOMult, nDestX ++)
{
* ( pabyOTile + nDestY * nDestSampleRowSize
+ nDestX * nSampleBlockSize
+ nSampleOffsetInSampleBlock ) =
* ( pabySrcTile + nSourceY * nSourceSampleRowSize
+ nSourceX * nSampleBlockSize
+ nSampleOffsetInSampleBlock );
}
}
#else
nSampleOffsetInSampleBlock = nHorSubsampling * nVerSubsampling + nSample - 1;
nSourceBaseInc = nOMult * nSampleBlockSize;
for( nSourceY = 0, nDestY = ( nTYOff / nVerSubsampling ); nSourceY < ( nBlockYSize / nVerSubsampling);
nSourceY += nOMult, nDestY ++)
{
pSourceBase = pabySrcTile + nSourceY * nSourceSampleRowSize
+ nSampleOffsetInSampleBlock;
pSourceBaseEnd = pSourceBase + ( ( ( nBlockXSize / nHorSubsampling ) + nOMult - 1 ) / nOMult ) * nSourceBaseInc;
pDestBase = pabyOTile + nDestY * nDestSampleRowSize
+ ( nTXOff / nHorSubsampling ) * nSampleBlockSize
+ nSampleOffsetInSampleBlock;
for( ; pSourceBase < pSourceBaseEnd; pSourceBase += nSourceBaseInc, pDestBase += nSampleBlockSize)
* pDestBase = * pSourceBase;
}
#endif
}
}
else if( strncmp(pszResampling,"averag",6) == 0
|| strncmp(pszResampling,"AVERAG",6) == 0 )
{
if( nSample == 0 )
{
for( nSourceY = 0, nDestY = nTYOff; nSourceY < nBlockYSize; nSourceY += nOMult, nDestY ++)
{
for( nSourceX = 0, nDestX = nTXOff; nSourceX < nBlockXSize; nSourceX += nOMult, nDestX ++)
{
nSourceXSecEnd = nSourceX + nOMult;
if( nSourceXSecEnd > nBlockXSize )
nSourceXSecEnd = nBlockXSize;
nSourceYSecEnd = nSourceY + nOMult;
if( nSourceYSecEnd > nBlockYSize )
nSourceYSecEnd = nBlockYSize;
nCummulator = 0;
for( nSourceYSec = nSourceY; nSourceYSec < nSourceYSecEnd; nSourceYSec ++)
{
for( nSourceXSec = nSourceX; nSourceXSec < nSourceXSecEnd; nSourceXSec ++)
{
nCummulator += * ( pabySrcTile + ( nSourceYSec / nVerSubsampling ) * nSourceSampleRowSize
+ ( nSourceYSec % nVerSubsampling ) * nHorSubsampling
+ ( nSourceXSec / nHorSubsampling ) * nSampleBlockSize
+ ( nSourceXSec % nHorSubsampling ) );
}
}
nCummulatorCount = ( nSourceXSecEnd - nSourceX ) * ( nSourceYSecEnd - nSourceY );
* ( pabyOTile + ( nDestY / nVerSubsampling ) * nDestSampleRowSize
+ ( nDestY % nVerSubsampling ) * nHorSubsampling
+ ( nDestX / nHorSubsampling ) * nSampleBlockSize
+ ( nDestX % nHorSubsampling ) ) =
( ( nCummulator + ( nCummulatorCount >> 1 ) ) / nCummulatorCount );
}
}
}
else
{
nSampleOffsetInSampleBlock = nHorSubsampling * nVerSubsampling + nSample - 1;
for( nSourceY = 0, nDestY = ( nTYOff / nVerSubsampling ); nSourceY < ( nBlockYSize / nVerSubsampling );
nSourceY += nOMult, nDestY ++)
{
for( nSourceX = 0, nDestX = ( nTXOff / nHorSubsampling ); nSourceX < ( nBlockXSize / nHorSubsampling );
nSourceX += nOMult, nDestX ++)
{
nSourceXSecEnd = nSourceX + nOMult;
if( nSourceXSecEnd > ( nBlockXSize / nHorSubsampling ) )
nSourceXSecEnd = ( nBlockXSize / nHorSubsampling );
nSourceYSecEnd = nSourceY + nOMult;
if( nSourceYSecEnd > ( nBlockYSize / nVerSubsampling ) )
nSourceYSecEnd = ( nBlockYSize / nVerSubsampling );
nCummulator = 0;
for( nSourceYSec = nSourceY; nSourceYSec < nSourceYSecEnd; nSourceYSec ++)
{
for( nSourceXSec = nSourceX; nSourceXSec < nSourceXSecEnd; nSourceXSec ++)
{
nCummulator += * ( pabySrcTile + nSourceYSec * nSourceSampleRowSize
+ nSourceXSec * nSampleBlockSize
+ nSampleOffsetInSampleBlock );
}
}
nCummulatorCount = ( nSourceXSecEnd - nSourceX ) * ( nSourceYSecEnd - nSourceY );
* ( pabyOTile + nDestY * nDestSampleRowSize
+ nDestX * nSampleBlockSize
+ nSampleOffsetInSampleBlock ) =
( ( nCummulator + ( nCummulatorCount >> 1 ) ) / nCummulatorCount );
}
}
}
}
}
/************************************************************************/
/* TIFF_ProcessFullResBlock() */
/* */
/* Process one block of full res data, downsampling into each */
/* of the overviews. */
/************************************************************************/
void TIFF_ProcessFullResBlock( TIFF *hTIFF, int nPlanarConfig,
int bSubsampled, int nHorSubsampling, int nVerSubsampling,
int nOverviews, int * panOvList,
int nBitsPerPixel,
int nSamples, TIFFOvrCache ** papoRawBIs,
int nSXOff, int nSYOff,
unsigned char *pabySrcTile,
int nBlockXSize, int nBlockYSize,
int nSampleFormat, const char * pszResampling )
{
int iOverview, iSample;
for( iSample = 0; iSample < nSamples; iSample++ )
{
/*
* We have to read a tile/strip for each sample for
* PLANARCONFIG_SEPARATE. Otherwise, we just read all the samples
* at once when handling the first sample.
*/
if( nPlanarConfig == PLANARCONFIG_SEPARATE || iSample == 0 )
{
if( TIFFIsTiled(hTIFF) )
{
TIFFReadEncodedTile( hTIFF,
TIFFComputeTile(hTIFF, nSXOff, nSYOff,
0, (tsample_t)iSample ),
pabySrcTile,
TIFFTileSize(hTIFF));
}
else
{
TIFFReadEncodedStrip( hTIFF,
TIFFComputeStrip(hTIFF, nSYOff,
(tsample_t) iSample),
pabySrcTile,
TIFFStripSize(hTIFF) );
}
}
/*
* Loop over destination overview layers
*/
for( iOverview = 0; iOverview < nOverviews; iOverview++ )
{
TIFFOvrCache *poRBI = papoRawBIs[iOverview];
unsigned char *pabyOTile;
int nTXOff, nTYOff, nOXOff, nOYOff, nOMult;
int nOBlockXSize = poRBI->nBlockXSize;
int nOBlockYSize = poRBI->nBlockYSize;
int nSkewBits, nSampleByteOffset;
/*
* Fetch the destination overview tile
*/
nOMult = panOvList[iOverview];
nOXOff = (nSXOff/nOMult) / nOBlockXSize;
nOYOff = (nSYOff/nOMult) / nOBlockYSize;
if( bSubsampled )
{
pabyOTile = TIFFGetOvrBlock_Subsampled( poRBI, nOXOff, nOYOff );
/*
* Establish the offset into this tile at which we should
* start placing data.
*/
nTXOff = (nSXOff - nOXOff*nOMult*nOBlockXSize) / nOMult;
nTYOff = (nSYOff - nOYOff*nOMult*nOBlockYSize) / nOMult;
#ifdef DBMALLOC
malloc_chain_check( 1 );
#endif
TIFF_DownSample_Subsampled( pabySrcTile, iSample,
nBlockXSize, nBlockYSize,
pabyOTile,
poRBI->nBlockXSize, poRBI->nBlockYSize,
nTXOff, nTYOff,
nOMult, pszResampling,
nHorSubsampling, nVerSubsampling );
#ifdef DBMALLOC
malloc_chain_check( 1 );
#endif
}
else
{
pabyOTile = TIFFGetOvrBlock( poRBI, nOXOff, nOYOff, iSample );
/*
* Establish the offset into this tile at which we should
* start placing data.
*/
nTXOff = (nSXOff - nOXOff*nOMult*nOBlockXSize) / nOMult;
nTYOff = (nSYOff - nOYOff*nOMult*nOBlockYSize) / nOMult;
/*
* Figure out the skew (extra space between ``our samples'') and
* the byte offset to the first sample.
*/
assert( (nBitsPerPixel % 8) == 0 );
if( nPlanarConfig == PLANARCONFIG_SEPARATE )
{
nSkewBits = 0;
nSampleByteOffset = 0;
}
else
{
nSkewBits = nBitsPerPixel * (nSamples-1);
nSampleByteOffset = (nBitsPerPixel/8) * iSample;
}
/*
* Perform the downsampling.
*/
#ifdef DBMALLOC
malloc_chain_check( 1 );
#endif
TIFF_DownSample( pabySrcTile + nSampleByteOffset,
nBlockXSize, nBlockYSize,
nSkewBits, nBitsPerPixel, pabyOTile,
poRBI->nBlockXSize, poRBI->nBlockYSize,
nTXOff, nTYOff,
nOMult, nSampleFormat, pszResampling );
#ifdef DBMALLOC
malloc_chain_check( 1 );
#endif
}
}
}
}
/************************************************************************/
/* TIFF_BuildOverviews() */
/* */
/* Build the requested list of overviews. Overviews are */
/* maintained in a bunch of temporary files and then these are */
/* written back to the TIFF file. Only one pass through the */
/* source TIFF file is made for any number of output */
/* overviews. */
/************************************************************************/
void TIFFBuildOverviews( TIFF *hTIFF, int nOverviews, int * panOvList,
int bUseSubIFDs, const char *pszResampleMethod,
int (*pfnProgress)( double, void * ),
void * pProgressData )
{
TIFFOvrCache **papoRawBIs;
uint32 nXSize, nYSize, nBlockXSize, nBlockYSize;
uint16 nBitsPerPixel, nPhotometric, nCompressFlag, nSamples,
nPlanarConfig, nSampleFormat;
int bSubsampled;
uint16 nHorSubsampling, nVerSubsampling;
int bTiled, nSXOff, nSYOff, i;
unsigned char *pabySrcTile;
uint16 *panRedMap, *panGreenMap, *panBlueMap;
TIFFErrorHandler pfnWarning;
/* -------------------------------------------------------------------- */
/* Get the base raster size. */
/* -------------------------------------------------------------------- */
TIFFGetField( hTIFF, TIFFTAG_IMAGEWIDTH, &nXSize );
TIFFGetField( hTIFF, TIFFTAG_IMAGELENGTH, &nYSize );
TIFFGetField( hTIFF, TIFFTAG_BITSPERSAMPLE, &nBitsPerPixel );
/* TODO: nBitsPerPixel seems misnomer and may need renaming to nBitsPerSample */
TIFFGetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, &nSamples );
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_PLANARCONFIG, &nPlanarConfig );
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_PHOTOMETRIC, &nPhotometric );
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_COMPRESSION, &nCompressFlag );
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_SAMPLEFORMAT, &nSampleFormat );
if( nPhotometric == PHOTOMETRIC_YCBCR || nPhotometric == PHOTOMETRIC_ITULAB )
{
if( nBitsPerPixel != 8 || nSamples != 3 || nPlanarConfig != PLANARCONFIG_CONTIG ||
nSampleFormat != SAMPLEFORMAT_UINT)
{
/* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */
TIFFErrorExt( TIFFClientdata(hTIFF), "TIFFBuildOverviews",
"File `%s' has an unsupported subsampling configuration.\n",
TIFFFileName(hTIFF) );
/* If you need support for this particular flavor, please contact either
* Frank Warmerdam warmerdam@pobox.com
* Joris Van Damme info@awaresystems.be
*/
return;
}
bSubsampled = 1;
TIFFGetField( hTIFF, TIFFTAG_YCBCRSUBSAMPLING, &nHorSubsampling, &nVerSubsampling );
/* TODO: find out if maybe TIFFGetFieldDefaulted is better choice for YCbCrSubsampling tag */
}
else
{
if( nBitsPerPixel < 8 )
{
/* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */
TIFFErrorExt( TIFFClientdata(hTIFF), "TIFFBuildOverviews",
"File `%s' has samples of %d bits per sample. Sample\n"
"sizes of less than 8 bits per sample are not supported.\n",
TIFFFileName(hTIFF), nBitsPerPixel );
return;
}
bSubsampled = 0;
nHorSubsampling = 1;
nVerSubsampling = 1;
}
/* -------------------------------------------------------------------- */
/* Turn off warnings to avoid alot of repeated warnings while */
/* rereading directories. */
/* -------------------------------------------------------------------- */
pfnWarning = TIFFSetWarningHandler( NULL );
/* -------------------------------------------------------------------- */
/* Get the base raster block size. */
/* -------------------------------------------------------------------- */
if( TIFFGetField( hTIFF, TIFFTAG_ROWSPERSTRIP, &(nBlockYSize) ) )
{
nBlockXSize = nXSize;
bTiled = FALSE;
}
else
{
TIFFGetField( hTIFF, TIFFTAG_TILEWIDTH, &nBlockXSize );
TIFFGetField( hTIFF, TIFFTAG_TILELENGTH, &nBlockYSize );
bTiled = TRUE;
}
/* -------------------------------------------------------------------- */
/* Capture the pallette if there is one. */
/* -------------------------------------------------------------------- */
if( TIFFGetField( hTIFF, TIFFTAG_COLORMAP,
&panRedMap, &panGreenMap, &panBlueMap ) )
{
uint16 *panRed2, *panGreen2, *panBlue2;
int nColorCount = 1 << nBitsPerPixel;
panRed2 = (uint16 *) _TIFFmalloc(2*nColorCount);
panGreen2 = (uint16 *) _TIFFmalloc(2*nColorCount);
panBlue2 = (uint16 *) _TIFFmalloc(2*nColorCount);
memcpy( panRed2, panRedMap, 2 * nColorCount );
memcpy( panGreen2, panGreenMap, 2 * nColorCount );
memcpy( panBlue2, panBlueMap, 2 * nColorCount );
panRedMap = panRed2;
panGreenMap = panGreen2;
panBlueMap = panBlue2;
}
else
{
panRedMap = panGreenMap = panBlueMap = NULL;
}
/* -------------------------------------------------------------------- */
/* Initialize overviews. */
/* -------------------------------------------------------------------- */
papoRawBIs = (TIFFOvrCache **) _TIFFmalloc(nOverviews*sizeof(void*));
for( i = 0; i < nOverviews; i++ )
{
int nOXSize, nOYSize, nOBlockXSize, nOBlockYSize;
uint32 nDirOffset;
nOXSize = (nXSize + panOvList[i] - 1) / panOvList[i];
nOYSize = (nYSize + panOvList[i] - 1) / panOvList[i];
nOBlockXSize = MIN((int)nBlockXSize,nOXSize);
nOBlockYSize = MIN((int)nBlockYSize,nOYSize);
if( bTiled )
{
if( (nOBlockXSize % 16) != 0 )
nOBlockXSize = nOBlockXSize + 16 - (nOBlockXSize % 16);
if( (nOBlockYSize % 16) != 0 )
nOBlockYSize = nOBlockYSize + 16 - (nOBlockYSize % 16);
}
nDirOffset = TIFF_WriteOverview( hTIFF, nOXSize, nOYSize,
nBitsPerPixel, nPlanarConfig,
nSamples, nOBlockXSize, nOBlockYSize,
bTiled, nCompressFlag, nPhotometric,
nSampleFormat,
panRedMap, panGreenMap, panBlueMap,
bUseSubIFDs,
nHorSubsampling, nVerSubsampling );
papoRawBIs[i] = TIFFCreateOvrCache( hTIFF, nDirOffset );
}
if( panRedMap != NULL )
{
_TIFFfree( panRedMap );
_TIFFfree( panGreenMap );
_TIFFfree( panBlueMap );
}
/* -------------------------------------------------------------------- */
/* Allocate a buffer to hold a source block. */
/* -------------------------------------------------------------------- */
if( bTiled )
pabySrcTile = (unsigned char *) _TIFFmalloc(TIFFTileSize(hTIFF));
else
pabySrcTile = (unsigned char *) _TIFFmalloc(TIFFStripSize(hTIFF));
/* -------------------------------------------------------------------- */
/* Loop over the source raster, applying data to the */
/* destination raster. */
/* -------------------------------------------------------------------- */
for( nSYOff = 0; nSYOff < (int) nYSize; nSYOff += nBlockYSize )
{
for( nSXOff = 0; nSXOff < (int) nXSize; nSXOff += nBlockXSize )
{
/*
* Read and resample into the various overview images.
*/
TIFF_ProcessFullResBlock( hTIFF, nPlanarConfig,
bSubsampled,nHorSubsampling,nVerSubsampling,
nOverviews, panOvList,
nBitsPerPixel, nSamples, papoRawBIs,
nSXOff, nSYOff, pabySrcTile,
nBlockXSize, nBlockYSize,
nSampleFormat, pszResampleMethod );
}
}
_TIFFfree( pabySrcTile );
/* -------------------------------------------------------------------- */
/* Cleanup the rawblockedimage files. */
/* -------------------------------------------------------------------- */
for( i = 0; i < nOverviews; i++ )
{
TIFFDestroyOvrCache( papoRawBIs[i] );
}
if( papoRawBIs != NULL )
_TIFFfree( papoRawBIs );
TIFFSetWarningHandler( pfnWarning );
}

View File

@ -0,0 +1,333 @@
/******************************************************************************
* $Id: tif_ovrcache.c,v 1.6 2005/12/21 12:23:13 joris Exp $
*
* Project: TIFF Overview Builder
* Purpose: Library functions to maintain two rows of tiles or two strips
* of data for output overviews as an output cache.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
******************************************************************************
* Copyright (c) 2000, Frank Warmerdam
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE 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 SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
******************************************************************************
*/
#include "tiffiop.h"
#include "tif_ovrcache.h"
#include <assert.h>
/************************************************************************/
/* TIFFCreateOvrCache() */
/* */
/* Create an overview cache to hold two rows of blocks from an */
/* existing TIFF directory. */
/************************************************************************/
TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, int nDirOffset )
{
TIFFOvrCache *psCache;
uint32 nBaseDirOffset;
psCache = (TIFFOvrCache *) _TIFFmalloc(sizeof(TIFFOvrCache));
psCache->nDirOffset = nDirOffset;
psCache->hTIFF = hTIFF;
/* -------------------------------------------------------------------- */
/* Get definition of this raster from the TIFF file itself. */
/* -------------------------------------------------------------------- */
nBaseDirOffset = TIFFCurrentDirOffset( psCache->hTIFF );
TIFFSetSubDirectory( hTIFF, nDirOffset );
TIFFGetField( hTIFF, TIFFTAG_IMAGEWIDTH, &(psCache->nXSize) );
TIFFGetField( hTIFF, TIFFTAG_IMAGELENGTH, &(psCache->nYSize) );
TIFFGetField( hTIFF, TIFFTAG_BITSPERSAMPLE, &(psCache->nBitsPerPixel) );
TIFFGetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, &(psCache->nSamples) );
TIFFGetField( hTIFF, TIFFTAG_PLANARCONFIG, &(psCache->nPlanarConfig) );
if( !TIFFIsTiled( hTIFF ) )
{
TIFFGetField( hTIFF, TIFFTAG_ROWSPERSTRIP, &(psCache->nBlockYSize) );
psCache->nBlockXSize = psCache->nXSize;
psCache->nBytesPerBlock = TIFFStripSize(hTIFF);
psCache->bTiled = FALSE;
}
else
{
TIFFGetField( hTIFF, TIFFTAG_TILEWIDTH, &(psCache->nBlockXSize) );
TIFFGetField( hTIFF, TIFFTAG_TILELENGTH, &(psCache->nBlockYSize) );
psCache->nBytesPerBlock = TIFFTileSize(hTIFF);
psCache->bTiled = TRUE;
}
/* -------------------------------------------------------------------- */
/* Compute some values from this. */
/* -------------------------------------------------------------------- */
psCache->nBlocksPerRow = (psCache->nXSize + psCache->nBlockXSize - 1)
/ psCache->nBlockXSize;
psCache->nBlocksPerColumn = (psCache->nYSize + psCache->nBlockYSize - 1)
/ psCache->nBlockYSize;
if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE)
psCache->nBytesPerRow = psCache->nBytesPerBlock
* psCache->nBlocksPerRow * psCache->nSamples;
else
psCache->nBytesPerRow =
psCache->nBytesPerBlock * psCache->nBlocksPerRow;
/* -------------------------------------------------------------------- */
/* Allocate and initialize the data buffers. */
/* -------------------------------------------------------------------- */
psCache->pabyRow1Blocks =
(unsigned char *) _TIFFmalloc(psCache->nBytesPerRow);
psCache->pabyRow2Blocks =
(unsigned char *) _TIFFmalloc(psCache->nBytesPerRow);
if( psCache->pabyRow1Blocks == NULL
|| psCache->pabyRow2Blocks == NULL )
{
TIFFErrorExt( hTIFF->tif_clientdata, hTIFF->tif_name,
"Can't allocate memory for overview cache." );
/* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */
return NULL;
}
_TIFFmemset( psCache->pabyRow1Blocks, 0, psCache->nBytesPerRow );
_TIFFmemset( psCache->pabyRow2Blocks, 0, psCache->nBytesPerRow );
psCache->nBlockOffset = 0;
TIFFSetSubDirectory( psCache->hTIFF, nBaseDirOffset );
return psCache;
}
/************************************************************************/
/* TIFFWriteOvrRow() */
/* */
/* Write one entire row of blocks (row 1) to the tiff file, and */
/* then rotate the block buffers, essentially moving things */
/* down by one block. */
/************************************************************************/
static void TIFFWriteOvrRow( TIFFOvrCache * psCache )
{
int nRet, iTileX, iTileY = psCache->nBlockOffset;
unsigned char *pabyData;
uint32 nBaseDirOffset;
/* -------------------------------------------------------------------- */
/* If the output cache is multi-byte per sample, and the file */
/* being written to is of a different byte order than the current */
/* platform, we will need to byte swap the data. */
/* -------------------------------------------------------------------- */
if( TIFFIsByteSwapped(psCache->hTIFF) )
{
if( psCache->nBitsPerPixel == 16 )
TIFFSwabArrayOfShort( (uint16 *) psCache->pabyRow1Blocks,
(psCache->nBytesPerBlock * psCache->nSamples) / 2 );
else if( psCache->nBitsPerPixel == 32 )
TIFFSwabArrayOfLong( (uint32 *) psCache->pabyRow1Blocks,
(psCache->nBytesPerBlock * psCache->nSamples) / 4 );
else if( psCache->nBitsPerPixel == 64 )
TIFFSwabArrayOfDouble( (double *) psCache->pabyRow1Blocks,
(psCache->nBytesPerBlock * psCache->nSamples) / 8 );
}
/* -------------------------------------------------------------------- */
/* Record original directory position, so we can restore it at */
/* end. */
/* -------------------------------------------------------------------- */
nBaseDirOffset = TIFFCurrentDirOffset( psCache->hTIFF );
nRet = TIFFSetSubDirectory( psCache->hTIFF, psCache->nDirOffset );
assert( nRet == 1 );
/* -------------------------------------------------------------------- */
/* Write blocks to TIFF file. */
/* -------------------------------------------------------------------- */
for( iTileX = 0; iTileX < psCache->nBlocksPerRow; iTileX++ )
{
int nTileID;
if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE)
{
int iSample;
for( iSample = 0; iSample < psCache->nSamples; iSample++ )
{
pabyData = TIFFGetOvrBlock( psCache, iTileX, iTileY, iSample );
if( psCache->bTiled )
{
nTileID =
TIFFComputeTile( psCache->hTIFF,
iTileX * psCache->nBlockXSize,
iTileY * psCache->nBlockYSize,
0, (tsample_t) iSample );
TIFFWriteEncodedTile( psCache->hTIFF, nTileID,
pabyData,
TIFFTileSize(psCache->hTIFF) );
}
else
{
nTileID =
TIFFComputeStrip( psCache->hTIFF,
iTileY * psCache->nBlockYSize,
(tsample_t) iSample );
TIFFWriteEncodedStrip( psCache->hTIFF, nTileID,
pabyData,
TIFFStripSize(psCache->hTIFF) );
}
}
}
else
{
pabyData = TIFFGetOvrBlock( psCache, iTileX, iTileY, 0 );
if( psCache->bTiled )
{
nTileID =
TIFFComputeTile( psCache->hTIFF,
iTileX * psCache->nBlockXSize,
iTileY * psCache->nBlockYSize,
0, 0 );
TIFFWriteEncodedTile( psCache->hTIFF, nTileID,
pabyData,
TIFFTileSize(psCache->hTIFF) );
}
else
{
nTileID =
TIFFComputeStrip( psCache->hTIFF,
iTileY * psCache->nBlockYSize,
0 );
TIFFWriteEncodedStrip( psCache->hTIFF, nTileID,
pabyData,
TIFFStripSize(psCache->hTIFF) );
}
}
}
/* TODO: add checks on error status return of TIFFWriteEncodedTile and TIFFWriteEncodedStrip */
/* -------------------------------------------------------------------- */
/* Rotate buffers. */
/* -------------------------------------------------------------------- */
pabyData = psCache->pabyRow1Blocks;
psCache->pabyRow1Blocks = psCache->pabyRow2Blocks;
psCache->pabyRow2Blocks = pabyData;
_TIFFmemset( pabyData, 0, psCache->nBytesPerRow );
psCache->nBlockOffset++;
/* -------------------------------------------------------------------- */
/* Restore access to original directory. */
/* -------------------------------------------------------------------- */
TIFFFlush( psCache->hTIFF );
/* TODO: add checks on error status return of TIFFFlush */
TIFFSetSubDirectory( psCache->hTIFF, nBaseDirOffset );
/* TODO: add checks on error status return of TIFFSetSubDirectory */
}
/************************************************************************/
/* TIFFGetOvrBlock() */
/************************************************************************/
/* TODO: make TIFF_Downsample handle iSample offset, so that we can
* do with a single TIFFGetOvrBlock and no longer need TIFFGetOvrBlock_Subsampled */
unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY,
int iSample )
{
int nRowOffset;
if( iTileY > psCache->nBlockOffset + 1 )
TIFFWriteOvrRow( psCache );
assert( iTileX >= 0 && iTileX < psCache->nBlocksPerRow );
assert( iTileY >= 0 && iTileY < psCache->nBlocksPerColumn );
assert( iTileY >= psCache->nBlockOffset
&& iTileY < psCache->nBlockOffset+2 );
assert( iSample >= 0 && iSample < psCache->nSamples );
if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE)
nRowOffset = ((iTileX * psCache->nSamples) + iSample)
* psCache->nBytesPerBlock;
else
nRowOffset = iTileX * psCache->nBytesPerBlock +
(psCache->nBitsPerPixel + 7) / 8 * iSample;
if( iTileY == psCache->nBlockOffset )
return psCache->pabyRow1Blocks + nRowOffset;
else
return psCache->pabyRow2Blocks + nRowOffset;
}
/************************************************************************/
/* TIFFGetOvrBlock_Subsampled() */
/************************************************************************/
unsigned char *TIFFGetOvrBlock_Subsampled( TIFFOvrCache *psCache,
int iTileX, int iTileY )
{
int nRowOffset;
if( iTileY > psCache->nBlockOffset + 1 )
TIFFWriteOvrRow( psCache );
assert( iTileX >= 0 && iTileX < psCache->nBlocksPerRow );
assert( iTileY >= 0 && iTileY < psCache->nBlocksPerColumn );
assert( iTileY >= psCache->nBlockOffset
&& iTileY < psCache->nBlockOffset+2 );
assert( psCache->nPlanarConfig != PLANARCONFIG_SEPARATE );
nRowOffset = iTileX * psCache->nBytesPerBlock;
if( iTileY == psCache->nBlockOffset )
return psCache->pabyRow1Blocks + nRowOffset;
else
return psCache->pabyRow2Blocks + nRowOffset;
}
/************************************************************************/
/* TIFFDestroyOvrCache() */
/************************************************************************/
void TIFFDestroyOvrCache( TIFFOvrCache * psCache )
{
while( psCache->nBlockOffset < psCache->nBlocksPerColumn )
TIFFWriteOvrRow( psCache );
_TIFFfree( psCache->pabyRow1Blocks );
_TIFFfree( psCache->pabyRow2Blocks );
_TIFFfree( psCache );
}

View File

@ -0,0 +1,101 @@
/******************************************************************************
* tif_ovrcache.h,v 1.3 2005/05/25 09:03:16 dron Exp
*
* Project: TIFF Overview Builder
* Purpose: Library functions to maintain two rows of tiles or two strips
* of data for output overviews as an output cache.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
* This code could potentially be used by other applications wanting to
* manage a once-through write cache.
*
******************************************************************************
* Copyright (c) 2000, Frank Warmerdam
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE 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 SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
******************************************************************************
*/
#ifndef TIF_OVRCACHE_H_INCLUDED
#define TIF_OVRCACHE_H_INCLUDED
#include "tiffio.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct
{
uint32 nXSize;
uint32 nYSize;
uint16 nBitsPerPixel;
uint16 nSamples;
uint16 nPlanarConfig;
uint32 nBlockXSize;
uint32 nBlockYSize;
uint32 nBytesPerBlock;
uint32 nBytesPerRow;
int nBlocksPerRow;
int nBlocksPerColumn;
int nBlockOffset; /* what block is the first in papabyBlocks? */
unsigned char *pabyRow1Blocks;
unsigned char *pabyRow2Blocks;
int nDirOffset;
TIFF *hTIFF;
int bTiled;
} TIFFOvrCache;
TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, int nDirOffset );
unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY,
int iSample );
unsigned char *TIFFGetOvrBlock_Subsampled( TIFFOvrCache *psCache, int iTileX, int iTileY );
void TIFFDestroyOvrCache( TIFFOvrCache * );
void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
int (*)(double,void*), void * );
void TIFF_ProcessFullResBlock( TIFF *hTIFF, int nPlanarConfig,
int bSubsampled, int nHorSamples, int nVerSamples,
int nOverviews, int * panOvList,
int nBitsPerPixel,
int nSamples, TIFFOvrCache ** papoRawBIs,
int nSXOff, int nSYOff,
unsigned char *pabySrcTile,
int nBlockXSize, int nBlockYSize,
int nSampleFormat, const char * pszResampling );
uint32 TIFF_WriteOverview( TIFF *, int, int, int, int, int, int, int,
int, int, int, int, unsigned short *,
unsigned short *, unsigned short *, int,
int, int);
#if defined(__cplusplus)
}
#endif
#endif /* ndef TIF_OVRCACHE_H_INCLUDED */

View File

@ -0,0 +1,44 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
SUBDIRS = xtiff
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
EXTRA_DIST = README
noinst_PROGRAMS = tiff-bi tiff-grayscale tiff-palette tiff-rgb
tiff_bi_SOURCES = tiff-bi.c
tiff_bi_LDADD = $(LIBTIFF)
tiff_grayscale_SOURCES = tiff-grayscale.c
tiff_grayscale_LDADD = $(LIBTIFF)
tiff_palette_SOURCES = tiff-palette.c
tiff_palette_LDADD = $(LIBTIFF)
tiff_rgb_SOURCES = tiff-rgb.c
tiff_rgb_LDADD = $(LIBTIFF)
INCLUDES = -I$(top_srcdir)/libtiff

View File

@ -0,0 +1,640 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
noinst_PROGRAMS = tiff-bi$(EXEEXT) tiff-grayscale$(EXEEXT) \
tiff-palette$(EXEEXT) tiff-rgb$(EXEEXT)
subdir = contrib/dbs
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_tiff_bi_OBJECTS = tiff-bi.$(OBJEXT)
tiff_bi_OBJECTS = $(am_tiff_bi_OBJECTS)
am__DEPENDENCIES_1 = $(top_builddir)/libtiff/libtiff.la
tiff_bi_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_tiff_grayscale_OBJECTS = tiff-grayscale.$(OBJEXT)
tiff_grayscale_OBJECTS = $(am_tiff_grayscale_OBJECTS)
tiff_grayscale_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_tiff_palette_OBJECTS = tiff-palette.$(OBJEXT)
tiff_palette_OBJECTS = $(am_tiff_palette_OBJECTS)
tiff_palette_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_tiff_rgb_OBJECTS = tiff-rgb.$(OBJEXT)
tiff_rgb_OBJECTS = $(am_tiff_rgb_OBJECTS)
tiff_rgb_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/libtiff -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \
$(tiff_palette_SOURCES) $(tiff_rgb_SOURCES)
DIST_SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \
$(tiff_palette_SOURCES) $(tiff_rgb_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 = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
SUBDIRS = xtiff
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
EXTRA_DIST = README
tiff_bi_SOURCES = tiff-bi.c
tiff_bi_LDADD = $(LIBTIFF)
tiff_grayscale_SOURCES = tiff-grayscale.c
tiff_grayscale_LDADD = $(LIBTIFF)
tiff_palette_SOURCES = tiff-palette.c
tiff_palette_LDADD = $(LIBTIFF)
tiff_rgb_SOURCES = tiff-rgb.c
tiff_rgb_LDADD = $(LIBTIFF)
INCLUDES = -I$(top_srcdir)/libtiff
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/dbs/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/dbs/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
tiff-bi$(EXEEXT): $(tiff_bi_OBJECTS) $(tiff_bi_DEPENDENCIES)
@rm -f tiff-bi$(EXEEXT)
$(LINK) $(tiff_bi_LDFLAGS) $(tiff_bi_OBJECTS) $(tiff_bi_LDADD) $(LIBS)
tiff-grayscale$(EXEEXT): $(tiff_grayscale_OBJECTS) $(tiff_grayscale_DEPENDENCIES)
@rm -f tiff-grayscale$(EXEEXT)
$(LINK) $(tiff_grayscale_LDFLAGS) $(tiff_grayscale_OBJECTS) $(tiff_grayscale_LDADD) $(LIBS)
tiff-palette$(EXEEXT): $(tiff_palette_OBJECTS) $(tiff_palette_DEPENDENCIES)
@rm -f tiff-palette$(EXEEXT)
$(LINK) $(tiff_palette_LDFLAGS) $(tiff_palette_OBJECTS) $(tiff_palette_LDADD) $(LIBS)
tiff-rgb$(EXEEXT): $(tiff_rgb_OBJECTS) $(tiff_rgb_DEPENDENCIES)
@rm -f tiff-rgb$(EXEEXT)
$(LINK) $(tiff_rgb_LDFLAGS) $(tiff_rgb_OBJECTS) $(tiff_rgb_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-bi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-grayscale.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-palette.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-rgb.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
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) \
|| eval $$failcom; \
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:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
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) \
|| eval $$failcom; \
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; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
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; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
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_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(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 $(PROGRAMS)
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:
-test -z "$(CONFIG_CLEAN_FILES)" || 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 clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool 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 -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
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-libtool clean-noinstPROGRAMS \
clean-recursive ctags ctags-recursive distclean \
distclean-compile distclean-generic distclean-libtool \
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-compile mostlyclean-generic \
mostlyclean-libtool 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:

View File

@ -0,0 +1,7 @@
Wed May 9 09:11:35 PDT 1990
This directory contains programs from Dan Sears
(dbs@decwrl.dec.com). Contact him directly if
you have questions/problems.
Sam

View File

@ -0,0 +1,84 @@
/* $Id: tiff-bi.c,v 1.2 2004/05/03 16:46:36 dron Exp $ */
/*
* tiff-bi.c -- create a Class B (bilevel) TIFF file
*
* Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
*
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include "tiffio.h"
#define WIDTH 512
#define HEIGHT WIDTH
int main(int argc, char **argv)
{
int i;
unsigned char * scan_line;
TIFF * tif;
if (argc != 2) {
fprintf(stderr, "Usage: %s tiff-image\n", argv[0]);
return 0;
}
if ((tif = TIFFOpen(argv[1], "w")) == NULL) {
fprintf(stderr, "can't open %s as a TIFF file\n", argv[1]);
return 0;
}
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 1);
TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
scan_line = (unsigned char *) malloc(WIDTH / 8);
for (i = 0; i < (WIDTH / 8) / 2; i++)
scan_line[i] = 0;
for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)
scan_line[i] = 255;
for (i = 0; i < HEIGHT / 2; i++)
TIFFWriteScanline(tif, scan_line, i, 0);
for (i = 0; i < (WIDTH / 8) / 2; i++)
scan_line[i] = 255;
for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)
scan_line[i] = 0;
for (i = HEIGHT / 2; i < HEIGHT; i++)
TIFFWriteScanline(tif, scan_line, i, 0);
free(scan_line);
TIFFClose(tif);
return 0;
}

View File

@ -0,0 +1,139 @@
/* $Id: tiff-grayscale.c,v 1.4 2004/09/03 08:26:08 dron Exp $ */
/*
* tiff-grayscale.c -- create a Class G (grayscale) TIFF file
* with a gray response curve in linear optical density
*
* Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
*
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tiffio.h"
#define WIDTH 512
#define HEIGHT WIDTH
char * programName;
void Usage();
int main(int argc, char **argv)
{
int bits_per_pixel = 8, cmsize, i, j, k,
gray_index, chunk_size = 32, nchunks = 16;
unsigned char * scan_line;
uint16 * gray;
float refblackwhite[2*1];
TIFF * tif;
programName = argv[0];
if (argc != 4)
Usage();
if (!strcmp(argv[1], "-depth"))
bits_per_pixel = atoi(argv[2]);
else
Usage();
switch (bits_per_pixel) {
case 8:
nchunks = 16;
chunk_size = 32;
break;
case 4:
nchunks = 4;
chunk_size = 128;
break;
case 2:
nchunks = 2;
chunk_size = 256;
break;
default:
Usage();
}
cmsize = nchunks * nchunks;
gray = (uint16 *) malloc(cmsize * sizeof(uint16));
gray[0] = 3000;
for (i = 1; i < cmsize; i++)
gray[i] = (uint16) (-log10((double) i / (cmsize - 1)) * 1000);
refblackwhite[0] = 0.0;
refblackwhite[1] = (float)((1L<<bits_per_pixel) - 1);
if ((tif = TIFFOpen(argv[3], "w")) == NULL) {
fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);
return 0;
}
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);
TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, gray);
TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
scan_line = (unsigned char *) malloc(WIDTH / (8 / bits_per_pixel));
for (i = 0; i < HEIGHT; i++) {
for (j = 0, k = 0; j < WIDTH;) {
gray_index = (j / chunk_size) + ((i / chunk_size) * nchunks);
switch (bits_per_pixel) {
case 8:
scan_line[k++] = gray_index;
j++;
break;
case 4:
scan_line[k++] = (gray_index << 4) + gray_index;
j += 2;
break;
case 2:
scan_line[k++] = (gray_index << 6) + (gray_index << 4)
+ (gray_index << 2) + gray_index;
j += 4;
break;
}
}
TIFFWriteScanline(tif, scan_line, i, 0);
}
free(scan_line);
TIFFClose(tif);
return 0;
}
void
Usage()
{
fprintf(stderr, "Usage: %s -depth (8 | 4 | 2) tiff-image\n", programName);
exit(0);
}

View File

@ -0,0 +1,276 @@
/* $Id: tiff-palette.c,v 1.3 2004/09/03 08:27:20 dron Exp $ */
/*
* tiff-palette.c -- create a Class P (palette) TIFF file
*
* Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
*
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tiffio.h"
#define WIDTH 512
#define HEIGHT WIDTH
#define SCALE(x) ((x) * 257L)
char * programName;
void Usage();
int main(int argc, char **argv)
{
int bits_per_pixel = 8, cmsize, i, j, k,
cmap_index, chunk_size = 32, nchunks = 16;
unsigned char * scan_line;
uint16 *red, *green, *blue;
TIFF * tif;
programName = argv[0];
if (argc != 4)
Usage();
if (!strcmp(argv[1], "-depth"))
bits_per_pixel = atoi(argv[2]);
else
Usage();
switch (bits_per_pixel) {
case 8:
nchunks = 16;
chunk_size = 32;
break;
case 4:
nchunks = 4;
chunk_size = 128;
break;
case 2:
nchunks = 2;
chunk_size = 256;
break;
case 1:
nchunks = 2;
chunk_size = 256;
break;
default:
Usage();
}
if (bits_per_pixel != 1) {
cmsize = nchunks * nchunks;
} else {
cmsize = 2;
}
red = (uint16 *) malloc(cmsize * sizeof(uint16));
green = (uint16 *) malloc(cmsize * sizeof(uint16));
blue = (uint16 *) malloc(cmsize * sizeof(uint16));
switch (bits_per_pixel) {
case 8:
for (i = 0; i < cmsize; i++) {
if (i < 32)
red[i] = 0;
else if (i < 64)
red[i] = SCALE(36);
else if (i < 96)
red[i] = SCALE(73);
else if (i < 128)
red[i] = SCALE(109);
else if (i < 160)
red[i] = SCALE(146);
else if (i < 192)
red[i] = SCALE(182);
else if (i < 224)
red[i] = SCALE(219);
else if (i < 256)
red[i] = SCALE(255);
if ((i % 32) < 4)
green[i] = 0;
else if (i < 8)
green[i] = SCALE(36);
else if ((i % 32) < 12)
green[i] = SCALE(73);
else if ((i % 32) < 16)
green[i] = SCALE(109);
else if ((i % 32) < 20)
green[i] = SCALE(146);
else if ((i % 32) < 24)
green[i] = SCALE(182);
else if ((i % 32) < 28)
green[i] = SCALE(219);
else if ((i % 32) < 32)
green[i] = SCALE(255);
if ((i % 4) == 0)
blue[i] = SCALE(0);
else if ((i % 4) == 1)
blue[i] = SCALE(85);
else if ((i % 4) == 2)
blue[i] = SCALE(170);
else if ((i % 4) == 3)
blue[i] = SCALE(255);
}
break;
case 4:
red[0] = SCALE(255);
green[0] = 0;
blue[0] = 0;
red[1] = 0;
green[1] = SCALE(255);
blue[1] = 0;
red[2] = 0;
green[2] = 0;
blue[2] = SCALE(255);
red[3] = SCALE(255);
green[3] = SCALE(255);
blue[3] = SCALE(255);
red[4] = 0;
green[4] = SCALE(255);
blue[4] = SCALE(255);
red[5] = SCALE(255);
green[5] = 0;
blue[5] = SCALE(255);
red[6] = SCALE(255);
green[6] = SCALE(255);
blue[6] = 0;
red[7] = 0;
green[7] = 0;
blue[7] = 0;
red[8] = SCALE(176);
green[8] = SCALE(224);
blue[8] = SCALE(230);
red[9] = SCALE(100);
green[9] = SCALE(149);
blue[9] = SCALE(237);
red[10] = SCALE(46);
green[10] = SCALE(139);
blue[10] = SCALE(87);
red[11] = SCALE(160);
green[11] = SCALE(82);
blue[11] = SCALE(45);
red[12] = SCALE(238);
green[12] = SCALE(130);
blue[12] = SCALE(238);
red[13] = SCALE(176);
green[13] = SCALE(48);
blue[13] = SCALE(96);
red[14] = SCALE(50);
green[14] = SCALE(205);
blue[14] = SCALE(50);
red[15] = SCALE(240);
green[15] = SCALE(152);
blue[15] = SCALE(35);
break;
case 2:
red[0] = SCALE(255);
green[0] = 0;
blue[0] = 0;
red[1] = 0;
green[1] = SCALE(255);
blue[1] = 0;
red[2] = 0;
green[2] = 0;
blue[2] = SCALE(255);
red[3] = SCALE(255);
green[3] = SCALE(255);
blue[3] = SCALE(255);
break;
case 1:
red[0] = 0;
green[0] = 0;
blue[0] = 0;
red[1] = SCALE(255);
green[1] = SCALE(255);
blue[1] = SCALE(255);
break;
}
if ((tif = TIFFOpen(argv[3], "w")) == NULL) {
fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);
return 0;
}
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
scan_line = (unsigned char *) malloc(WIDTH / (8 / bits_per_pixel));
for (i = 0; i < HEIGHT; i++) {
for (j = 0, k = 0; j < WIDTH;) {
cmap_index = (j / chunk_size) + ((i / chunk_size) * nchunks);
switch (bits_per_pixel) {
case 8:
scan_line[k++] = cmap_index;
j++;
break;
case 4:
scan_line[k++] = (cmap_index << 4) + cmap_index;
j += 2;
break;
case 2:
scan_line[k++] = (cmap_index << 6) + (cmap_index << 4)
+ (cmap_index << 2) + cmap_index;
j += 4;
break;
case 1:
scan_line[k++] =
((j / chunk_size) == (i / chunk_size)) ? 0x00 : 0xff;
j += 8;
break;
}
}
TIFFWriteScanline(tif, scan_line, i, 0);
}
free(scan_line);
TIFFClose(tif);
return 0;
}
void
Usage()
{
fprintf(stderr, "Usage: %s -depth (8 | 4 | 2 | 1) tiff-image\n", programName);
exit(0);
}

View File

@ -0,0 +1,194 @@
/* $Id: tiff-rgb.c,v 1.3 2004/09/03 08:29:16 dron Exp $ */
/*
* tiff-rgb.c -- create a 24-bit Class R (rgb) TIFF file
*
* Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
*
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tiffio.h"
#define ROUND(x) (uint16) ((x) + 0.5)
#define CMSIZE 256
#define WIDTH 525
#define HEIGHT 512
#define TIFF_GAMMA 2.2
void Usage();
char * programName;
int main(int argc, char **argv)
{
char * input_file = NULL;
double image_gamma = TIFF_GAMMA;
int i, j;
TIFF * tif;
unsigned char * scan_line;
uint16 red[CMSIZE], green[CMSIZE], blue[CMSIZE];
float refblackwhite[2*3];
programName = argv[0];
switch (argc) {
case 2:
image_gamma = TIFF_GAMMA;
input_file = argv[1];
break;
case 4:
if (!strcmp(argv[1], "-gamma")) {
image_gamma = atof(argv[2]);
input_file = argv[3];
} else
Usage();
break;
default:
Usage();
}
for (i = 0; i < CMSIZE; i++) {
if (i == 0)
red[i] = green[i] = blue[i] = 0;
else {
red[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0));
green[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0));
blue[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0));
}
}
refblackwhite[0] = 0.0; refblackwhite[1] = 255.0;
refblackwhite[2] = 0.0; refblackwhite[3] = 255.0;
refblackwhite[4] = 0.0; refblackwhite[5] = 255.0;
if ((tif = TIFFOpen(input_file, "w")) == NULL) {
fprintf(stderr, "can't open %s as a TIFF file\n", input_file);
exit(0);
}
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3);
TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#ifdef notdef
TIFFSetField(tif, TIFFTAG_WHITEPOINT, whitex, whitey);
TIFFSetField(tif, TIFFTAG_PRIMARYCHROMATICITIES, primaries);
#endif
TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);
TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, red, green, blue);
scan_line = (unsigned char *) malloc(WIDTH * 3);
for (i = 0; i < 255; i++) {
for (j = 0; j < 75; j++) {
scan_line[j * 3] = 255;
scan_line[(j * 3) + 1] = 255 - i;
scan_line[(j * 3) + 2] = 255 - i;
}
for (j = 75; j < 150; j++) {
scan_line[j * 3] = 255 - i;
scan_line[(j * 3) + 1] = 255;
scan_line[(j * 3) + 2] = 255 - i;
}
for (j = 150; j < 225; j++) {
scan_line[j * 3] = 255 - i;
scan_line[(j * 3) + 1] = 255 - i;
scan_line[(j * 3) + 2] = 255;
}
for (j = 225; j < 300; j++) {
scan_line[j * 3] = (i - 1) / 2;
scan_line[(j * 3) + 1] = (i - 1) / 2;
scan_line[(j * 3) + 2] = (i - 1) / 2;
}
for (j = 300; j < 375; j++) {
scan_line[j * 3] = 255 - i;
scan_line[(j * 3) + 1] = 255;
scan_line[(j * 3) + 2] = 255;
}
for (j = 375; j < 450; j++) {
scan_line[j * 3] = 255;
scan_line[(j * 3) + 1] = 255 - i;
scan_line[(j * 3) + 2] = 255;
}
for (j = 450; j < 525; j++) {
scan_line[j * 3] = 255;
scan_line[(j * 3) + 1] = 255;
scan_line[(j * 3) + 2] = 255 - i;
}
TIFFWriteScanline(tif, scan_line, i, 0);
}
for (i = 255; i < 512; i++) {
for (j = 0; j < 75; j++) {
scan_line[j * 3] = i;
scan_line[(j * 3) + 1] = 0;
scan_line[(j * 3) + 2] = 0;
}
for (j = 75; j < 150; j++) {
scan_line[j * 3] = 0;
scan_line[(j * 3) + 1] = i;
scan_line[(j * 3) + 2] = 0;
}
for (j = 150; j < 225; j++) {
scan_line[j * 3] = 0;
scan_line[(j * 3) + 1] = 0;
scan_line[(j * 3) + 2] = i;
}
for (j = 225; j < 300; j++) {
scan_line[j * 3] = (i - 1) / 2;
scan_line[(j * 3) + 1] = (i - 1) / 2;
scan_line[(j * 3) + 2] = (i - 1) / 2;
}
for (j = 300; j < 375; j++) {
scan_line[j * 3] = 0;
scan_line[(j * 3) + 1] = i;
scan_line[(j * 3) + 2] = i;
}
for (j = 375; j < 450; j++) {
scan_line[j * 3] = i;
scan_line[(j * 3) + 1] = 0;
scan_line[(j * 3) + 2] = i;
}
for (j = 450; j < 525; j++) {
scan_line[j * 3] = i;
scan_line[(j * 3) + 1] = i;
scan_line[(j * 3) + 2] = 0;
}
TIFFWriteScanline(tif, scan_line, i, 0);
}
free(scan_line);
TIFFClose(tif);
exit(0);
}
void
Usage()
{
fprintf(stderr, "Usage: %s -gamma gamma tiff-image\n", programName);
exit(0);
}

View File

@ -0,0 +1,17 @@
#
# Imakefile -- to generate a Makefile for xtiff, use:
# /usr/local/X11/mit/config/imake \
# -I/usr/local/X11/mit/config \
# -DTOPDIR=/usr/local/X11/mit \
# -DCURDIR=/usr/local/X11/mit \
# -DDESTDIR=/usr/local/X11/mit
#
SYS_LIBRARIES = -lm
LOCAL_LIBRARIES = XawClientLibs
DEPLIBS = XawClientDepLibs
TIFF = ../../../libtiff
EXTRA_LIBRARIES = $(TIFF)/libtiff.so -lm
EXTRA_INCLUDES = -I$(TIFF)
SimpleProgramTarget(xtiff)

View File

@ -0,0 +1,29 @@
# $Id: Makefile.am,v 1.2 2006/03/23 14:54:01 dron Exp $
#
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = Imakefile README patchlevel.h xtiff.c xtifficon.h

View File

@ -0,0 +1,387 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# $Id: Makefile.in,v 1.32 2006/03/23 14:54:01 dron Exp $
#
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/dbs/xtiff
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = Imakefile README patchlevel.h xtiff.c xtifficon.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/dbs/xtiff/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/dbs/xtiff/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,6 @@
xtiff 2.0
xtiff is a tool for viewing a TIFF file in an X window. It was written to
handle as many different kinds of TIFF files as possible while remaining
simple, portable and efficient. xtiff requires X11 R4, the Athena Widgets
and Sam Leffler's libtiff package (which can be found on ucbvax.berkeley.edu).

View File

@ -0,0 +1 @@
#define PATCHLEVEL 0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
#define xtifficon_width 32
#define xtifficon_height 32
static char xtifficon_bits[] = {
0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x7e, 0xc0, 0xfc, 0x03, 0x7e, 0x60,
0xf8, 0x07, 0x06, 0x30, 0xf8, 0x07, 0x1e, 0x18, 0xf0, 0x0f, 0x1e, 0x0c,
0xe0, 0x1f, 0x06, 0x06, 0xc0, 0x3f, 0x06, 0x06, 0xc0, 0x3f, 0x06, 0x03,
0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00, 0x00, 0xfe, 0x61, 0x00,
0x00, 0xfe, 0x31, 0x7e, 0x7e, 0xfc, 0x33, 0x7e, 0x7e, 0xf8, 0x1b, 0x06,
0x18, 0xf0, 0x0d, 0x1e, 0x18, 0xf0, 0x0e, 0x1e, 0x18, 0x60, 0x1f, 0x06,
0x18, 0xb0, 0x3f, 0x06, 0x18, 0x98, 0x7f, 0x06, 0x18, 0x98, 0x7f, 0x00,
0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01, 0x00, 0x63, 0xfc, 0x03,
0x80, 0x61, 0xfc, 0x03, 0xc0, 0x60, 0xf8, 0x07, 0xc0, 0x60, 0xf0, 0x0f,
0x60, 0x60, 0xe0, 0x1f, 0x30, 0x60, 0xe0, 0x1f, 0x18, 0x60, 0xc0, 0x3f,
0x0c, 0x60, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff};

View File

@ -0,0 +1,36 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
EXTRA_DIST = README test.iptc test.txt
noinst_PROGRAMS = iptcutil
iptcutil_SOURCES = iptcutil.c
iptcutil_LDADD = $(LIBTIFF)
INCLUDES = -I$(top_srcdir)/libtiff

View File

@ -0,0 +1,498 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
noinst_PROGRAMS = iptcutil$(EXEEXT)
subdir = contrib/iptcutil
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_iptcutil_OBJECTS = iptcutil.$(OBJEXT)
iptcutil_OBJECTS = $(am_iptcutil_OBJECTS)
am__DEPENDENCIES_1 = $(top_builddir)/libtiff/libtiff.la
iptcutil_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/libtiff -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(iptcutil_SOURCES)
DIST_SOURCES = $(iptcutil_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
EXTRA_DIST = README test.iptc test.txt
iptcutil_SOURCES = iptcutil.c
iptcutil_LDADD = $(LIBTIFF)
INCLUDES = -I$(top_srcdir)/libtiff
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/iptcutil/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/iptcutil/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
iptcutil$(EXEEXT): $(iptcutil_OBJECTS) $(iptcutil_DEPENDENCIES)
@rm -f iptcutil$(EXEEXT)
$(LINK) $(iptcutil_LDFLAGS) $(iptcutil_OBJECTS) $(iptcutil_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iptcutil.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
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: $(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; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
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 -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
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 \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags 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:

View File

@ -0,0 +1,25 @@
Program: IPTCUTIL.C
Purpose: Convert between IPTC binary and a "special" IPTC text file format.
Usage: iptcutil -t | -b [-i file] [-o file] <input >output
Notes: You tell the program the "type" of input file via the -t and -b
switches. The -t says that the input is text, while the -b says
that the input is binary IPTC. You can use either the -i or the
-o switches to tell the program what the input and output files
will be, or use simple piping.
Author: William T. Radcliffe (billr@corbis.com)
Parts of this program were derived from other places. The original
binary to text conversion was taken from the PHP distribution and
the tokenizer was written many years ago, by someone else as well.
This software is provided freely "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 William T. Radcliffe 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 IPTCUTIL

View File

@ -0,0 +1,934 @@
/* $Id: iptcutil.c,v 1.4 2004/09/21 13:34:39 dron Exp $ */
#include "tif_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <ctype.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_IO_H
# include <io.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#ifdef WIN32
#define STRNICMP strnicmp
#else
#define STRNICMP strncasecmp
#endif
typedef struct _tag_spec
{
short
id;
char
*name;
} tag_spec;
static tag_spec tags[] = {
{ 5,"Image Name" },
{ 7,"Edit Status" },
{ 10,"Priority" },
{ 15,"Category" },
{ 20,"Supplemental Category" },
{ 22,"Fixture Identifier" },
{ 25,"Keyword" },
{ 30,"Release Date" },
{ 35,"Release Time" },
{ 40,"Special Instructions" },
{ 45,"Reference Service" },
{ 47,"Reference Date" },
{ 50,"Reference Number" },
{ 55,"Created Date" },
{ 60,"Created Time" },
{ 65,"Originating Program" },
{ 70,"Program Version" },
{ 75,"Object Cycle" },
{ 80,"Byline" },
{ 85,"Byline Title" },
{ 90,"City" },
{ 95,"Province State" },
{ 100,"Country Code" },
{ 101,"Country" },
{ 103,"Original Transmission Reference" },
{ 105,"Headline" },
{ 110,"Credit" },
{ 115,"Source" },
{ 116,"Copyright String" },
{ 120,"Caption" },
{ 121,"Local Caption" },
{ 122,"Caption Writer" },
{ 200,"Custom Field 1" },
{ 201,"Custom Field 2" },
{ 202,"Custom Field 3" },
{ 203,"Custom Field 4" },
{ 204,"Custom Field 5" },
{ 205,"Custom Field 6" },
{ 206,"Custom Field 7" },
{ 207,"Custom Field 8" },
{ 208,"Custom Field 9" },
{ 209,"Custom Field 10" },
{ 210,"Custom Field 11" },
{ 211,"Custom Field 12" },
{ 212,"Custom Field 13" },
{ 213,"Custom Field 14" },
{ 214,"Custom Field 15" },
{ 215,"Custom Field 16" },
{ 216,"Custom Field 17" },
{ 217,"Custom Field 18" },
{ 218,"Custom Field 19" },
{ 219,"Custom Field 20" }
};
/*
* We format the output using HTML conventions
* to preserve control characters and such.
*/
void formatString(FILE *ofile, const char *s, int len)
{
putc('"', ofile);
for (; len > 0; --len, ++s) {
int c = *s;
switch (c) {
case '&':
fputs("&amp;", ofile);
break;
#ifdef HANDLE_GT_LT
case '<':
fputs("&lt;", ofile);
break;
case '>':
fputs("&gt;", ofile);
break;
#endif
case '"':
fputs("&quot;", ofile);
break;
default:
if (iscntrl(c))
fprintf(ofile, "&#%d;", c);
else
putc(*s, ofile);
break;
}
}
fputs("\"\n", ofile);
}
typedef struct _html_code
{
short
len;
const char
*code,
val;
} html_code;
static html_code html_codes[] = {
#ifdef HANDLE_GT_LT
{ 4,"&lt;",'<' },
{ 4,"&gt;",'>' },
#endif
{ 5,"&amp;",'&' },
{ 6,"&quot;",'"' }
};
/*
* This routine converts HTML escape sequence
* back to the original ASCII representation.
* - returns the number of characters dropped.
*/
int convertHTMLcodes(char *s, int len)
{
if (len <=0 || s==(char*)NULL || *s=='\0')
return 0;
if (s[1] == '#')
{
int val, o;
if (sscanf(s,"&#%d;",&val) == 1)
{
o = 3;
while (s[o] != ';')
{
o++;
if (o > 5)
break;
}
if (o < 5)
strcpy(s+1, s+1+o);
*s = val;
return o;
}
}
else
{
int
i,
codes = sizeof(html_codes) / sizeof(html_code);
for (i=0; i < codes; i++)
{
if (html_codes[i].len <= len)
if (STRNICMP(s, html_codes[i].code, html_codes[i].len) == 0)
{
strcpy(s+1, s+html_codes[i].len);
*s = html_codes[i].val;
return html_codes[i].len-1;
}
}
}
return 0;
}
int formatIPTC(FILE *ifile, FILE *ofile)
{
unsigned int
foundiptc,
tagsfound;
unsigned char
recnum,
dataset;
char
*readable,
*str;
long
tagindx,
taglen;
int
i,
tagcount = sizeof(tags) / sizeof(tag_spec);
char
c;
foundiptc = 0; /* found the IPTC-Header */
tagsfound = 0; /* number of tags found */
c = getc(ifile);
while (c != EOF)
{
if (c == 0x1c)
foundiptc = 1;
else
{
if (foundiptc)
return -1;
else
continue;
}
/* we found the 0x1c tag and now grab the dataset and record number tags */
dataset = getc(ifile);
if ((char) dataset == EOF)
return -1;
recnum = getc(ifile);
if ((char) recnum == EOF)
return -1;
/* try to match this record to one of the ones in our named table */
for (i=0; i< tagcount; i++)
{
if (tags[i].id == recnum)
break;
}
if (i < tagcount)
readable = tags[i].name;
else
readable = "";
/* then we decode the length of the block that follows - long or short fmt */
c = getc(ifile);
if (c == EOF)
return 0;
if (c & (unsigned char) 0x80)
{
unsigned char
buffer[4];
for (i=0; i<4; i++)
{
c = buffer[i] = getc(ifile);
if (c == EOF)
return -1;
}
taglen = (((long) buffer[ 0 ]) << 24) |
(((long) buffer[ 1 ]) << 16) |
(((long) buffer[ 2 ]) << 8) |
(((long) buffer[ 3 ]));
}
else
{
unsigned char
x = c;
taglen = ((long) x) << 8;
x = getc(ifile);
if ((char)x == EOF)
return -1;
taglen |= (long) x;
}
/* make a buffer to hold the tag data and snag it from the input stream */
str = (char *) malloc((unsigned int) (taglen+1));
if (str == (char *) NULL)
{
printf("Memory allocation failed");
return 0;
}
for (tagindx=0; tagindx<taglen; tagindx++)
{
c = str[tagindx] = getc(ifile);
if (c == EOF)
return -1;
}
str[ taglen ] = 0;
/* now finish up by formatting this binary data into ASCII equivalent */
if (strlen(readable) > 0)
fprintf(ofile, "%d#%d#%s=",(unsigned int)dataset, (unsigned int) recnum, readable);
else
fprintf(ofile, "%d#%d=",(unsigned int)dataset, (unsigned int) recnum);
formatString( ofile, str, taglen );
free(str);
tagsfound++;
c = getc(ifile);
}
return tagsfound;
}
int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
char *white,char *brkchar,char *quote,char eschar,char *brkused,
int *next,char *quoted);
char *super_fgets(char *b, int *blen, FILE *file)
{
int
c,
len;
char
*q;
len=*blen;
for (q=b; ; q++)
{
c=fgetc(file);
if (c == EOF || c == '\n')
break;
if (((int)q - (int)b + 1 ) >= (int) len)
{
int
tlen;
tlen=(int)q-(int)b;
len<<=1;
b=(char *) realloc((char *) b,(len+2));
if ((char *) b == (char *) NULL)
break;
q=b+tlen;
}
*q=(unsigned char) c;
}
*blen=0;
if ((unsigned char *)b != (unsigned char *) NULL)
{
int
tlen;
tlen=(int)q - (int)b;
if (tlen == 0)
return (char *) NULL;
b[tlen] = '\0';
*blen=++tlen;
}
return b;
}
#define BUFFER_SZ 4096
int main(int argc, char *argv[])
{
unsigned int
length;
unsigned char
*buffer;
int
i,
mode; /* iptc binary, or iptc text */
FILE
*ifile = stdin,
*ofile = stdout;
char
c,
*usage = "usage: iptcutil -t | -b [-i file] [-o file] <input >output";
if( argc < 2 )
{
printf(usage);
return 1;
}
mode = 0;
length = -1;
buffer = (unsigned char *)NULL;
for (i=1; i<argc; i++)
{
c = argv[i][0];
if (c == '-' || c == '/')
{
c = argv[i][1];
switch( c )
{
case 't':
mode = 1;
#ifdef WIN32
/* Set "stdout" to binary mode: */
_setmode( _fileno( ofile ), _O_BINARY );
#endif
break;
case 'b':
mode = 0;
#ifdef WIN32
/* Set "stdin" to binary mode: */
_setmode( _fileno( ifile ), _O_BINARY );
#endif
break;
case 'i':
if (mode == 0)
ifile = fopen(argv[++i], "rb");
else
ifile = fopen(argv[++i], "rt");
if (ifile == (FILE *)NULL)
{
printf("Unable to open: %s\n", argv[i]);
return 1;
}
break;
case 'o':
if (mode == 0)
ofile = fopen(argv[++i], "wt");
else
ofile = fopen(argv[++i], "wb");
if (ofile == (FILE *)NULL)
{
printf("Unable to open: %s\n", argv[i]);
return 1;
}
break;
default:
printf("Unknown option: %s\n", argv[i]);
return 1;
}
}
else
{
printf(usage);
return 1;
}
}
if (mode == 0) /* handle binary iptc info */
formatIPTC(ifile, ofile);
if (mode == 1) /* handle text form of iptc info */
{
char
brkused,
quoted,
*line,
*token,
*newstr;
int
state,
next;
unsigned char
recnum = 0,
dataset = 0;
int
inputlen = BUFFER_SZ;
line = (char *) malloc(inputlen);
token = (char *)NULL;
while((line = super_fgets(line,&inputlen,ifile))!=NULL)
{
state=0;
next=0;
token = (char *) malloc(inputlen);
newstr = (char *) malloc(inputlen);
while(tokenizer(0, token, inputlen, line, "", "=", "\"", 0,
&brkused,&next,&quoted)==0)
{
if (state == 0)
{
int
state,
next;
char
brkused,
quoted;
state=0;
next=0;
while(tokenizer(0, newstr, inputlen, token, "", "#", "", 0,
&brkused, &next, &quoted)==0)
{
if (state == 0)
dataset = (unsigned char) atoi(newstr);
else
if (state == 1)
recnum = (unsigned char) atoi(newstr);
state++;
}
}
else
if (state == 1)
{
int
next;
unsigned long
len;
char
brkused,
quoted;
next=0;
len = strlen(token);
while(tokenizer(0, newstr, inputlen, token, "", "&", "", 0,
&brkused, &next, &quoted)==0)
{
if (brkused && next > 0)
{
char
*s = &token[next-1];
len -= convertHTMLcodes(s, strlen(s));
}
}
fputc(0x1c, ofile);
fputc(dataset, ofile);
fputc(recnum, ofile);
if (len < 0x10000)
{
fputc((len >> 8) & 255, ofile);
fputc(len & 255, ofile);
}
else
{
fputc(((len >> 24) & 255) | 0x80, ofile);
fputc((len >> 16) & 255, ofile);
fputc((len >> 8) & 255, ofile);
fputc(len & 255, ofile);
}
next=0;
while (len--)
fputc(token[next++], ofile);
}
state++;
}
free(token);
token = (char *)NULL;
free(newstr);
newstr = (char *)NULL;
}
free(line);
fclose( ifile );
fclose( ofile );
}
return 0;
}
/*
This routine is a generalized, finite state token parser. It allows
you extract tokens one at a time from a string of characters. The
characters used for white space, for break characters, and for quotes
can be specified. Also, characters in the string can be preceded by
a specifiable escape character which removes any special meaning the
character may have.
There are a lot of formal parameters in this subroutine call, but
once you get familiar with them, this routine is fairly easy to use.
"#define" macros can be used to generate simpler looking calls for
commonly used applications of this routine.
First, some terminology:
token: used here, a single unit of information in
the form of a group of characters.
white space: space that gets ignored (except within quotes
or when escaped), like blanks and tabs. in
addition, white space terminates a non-quoted
token.
break character: a character that separates non-quoted tokens.
commas are a common break character. the
usage of break characters to signal the end
of a token is the same as that of white space,
except multiple break characters with nothing
or only white space between generate a null
token for each two break characters together.
for example, if blank is set to be the white
space and comma is set to be the break
character, the line ...
A, B, C , , DEF
... consists of 5 tokens:
1) "A"
2) "B"
3) "C"
4) "" (the null string)
5) "DEF"
quote character: a character that, when surrounding a group
of other characters, causes the group of
characters to be treated as a single token,
no matter how many white spaces or break
characters exist in the group. also, a
token always terminates after the closing
quote. for example, if ' is the quote
character, blank is white space, and comma
is the break character, the following
string ...
A, ' B, CD'EF GHI
... consists of 4 tokens:
1) "A"
2) " B, CD" (note the blanks & comma)
3) "EF"
4) "GHI"
the quote characters themselves do
not appear in the resultant tokens. the
double quotes are delimiters i use here for
documentation purposes only.
escape character: a character which itself is ignored but
which causes the next character to be
used as is. ^ and \ are often used as
escape characters. an escape in the last
position of the string gets treated as a
"normal" (i.e., non-quote, non-white,
non-break, and non-escape) character.
for example, assume white space, break
character, and quote are the same as in the
above examples, and further, assume that
^ is the escape character. then, in the
string ...
ABC, ' DEF ^' GH' I ^ J K^ L ^
... there are 7 tokens:
1) "ABC"
2) " DEF ' GH"
3) "I"
4) " " (a lone blank)
5) "J"
6) "K L"
7) "^" (passed as is at end of line)
OK, now that you have this background, here's how to call "tokenizer":
result=tokenizer(flag,token,maxtok,string,white,break,quote,escape,
brkused,next,quoted)
result: 0 if we haven't reached EOS (end of string), and
1 if we have (this is an "int").
flag: right now, only the low order 3 bits are used.
1 => convert non-quoted tokens to upper case
2 => convert non-quoted tokens to lower case
0 => do not convert non-quoted tokens
(this is a "char").
token: a character string containing the returned next token
(this is a "char[]").
maxtok: the maximum size of "token". characters beyond
"maxtok" are truncated (this is an "int").
string: the string to be parsed (this is a "char[]").
white: a string of the valid white spaces. example:
char whitesp[]={" \t"};
blank and tab will be valid white space (this is
a "char[]").
break: a string of the valid break characters. example:
char breakch[]={";,"};
semicolon and comma will be valid break characters
(this is a "char[]").
IMPORTANT: do not use the name "break" as a C
variable, as this is a reserved word in C.
quote: a string of the valid quote characters. an example
would be
char whitesp[]={"'\"");
(this causes single and double quotes to be valid)
note that a token starting with one of these characters
needs the same quote character to terminate it.
for example,
"ABC '
is unterminated, but
"DEF" and 'GHI'
are properly terminated. note that different quote
characters can appear on the same line; only for
a given token do the quote characters have to be
the same (this is a "char[]").
escape: the escape character (NOT a string ... only one
allowed). use zero if none is desired (this is
a "char").
brkused: the break character used to terminate the current
token. if the token was quoted, this will be the
quote used. if the token is the last one on the
line, this will be zero (this is a pointer to a
"char").
next: this variable points to the first character of the
next token. it gets reset by "tokenizer" as it steps
through the string. set it to 0 upon initialization,
and leave it alone after that. you can change it
if you want to jump around in the string or re-parse
from the beginning, but be careful (this is a
pointer to an "int").
quoted: set to 1 (true) if the token was quoted and 0 (false)
if not. you may need this information (for example:
in C, a string with quotes around it is a character
string, while one without is an identifier).
(this is a pointer to a "char").
*/
/* states */
#define IN_WHITE 0
#define IN_TOKEN 1
#define IN_QUOTE 2
#define IN_OZONE 3
int _p_state; /* current state */
unsigned _p_flag; /* option flag */
char _p_curquote; /* current quote char */
int _p_tokpos; /* current token pos */
/* routine to find character in string ... used only by "tokenizer" */
int sindex(char ch,char *string)
{
char *cp;
for(cp=string;*cp;++cp)
if(ch==*cp)
return (int)(cp-string); /* return postion of character */
return -1; /* eol ... no match found */
}
/* routine to store a character in a string ... used only by "tokenizer" */
void chstore(char *string,int max,char ch)
{
char c;
if(_p_tokpos>=0&&_p_tokpos<max-1)
{
if(_p_state==IN_QUOTE)
c=ch;
else
switch(_p_flag&3)
{
case 1: /* convert to upper */
c=toupper(ch);
break;
case 2: /* convert to lower */
c=tolower(ch);
break;
default: /* use as is */
c=ch;
break;
}
string[_p_tokpos++]=c;
}
return;
}
int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
char *white,char *brkchar,char *quote,char eschar,char *brkused,
int *next,char *quoted)
{
int qp;
char c,nc;
*brkused=0; /* initialize to null */
*quoted=0; /* assume not quoted */
if(!line[*next]) /* if we're at end of line, indicate such */
return 1;
_p_state=IN_WHITE; /* initialize state */
_p_curquote=0; /* initialize previous quote char */
_p_flag=inflag; /* set option flag */
for(_p_tokpos=0;(c=line[*next]);++(*next)) /* main loop */
{
if((qp=sindex(c,brkchar))>=0) /* break */
{
switch(_p_state)
{
case IN_WHITE: /* these are the same here ... */
case IN_TOKEN: /* ... just get out */
case IN_OZONE: /* ditto */
++(*next);
*brkused=brkchar[qp];
goto byebye;
case IN_QUOTE: /* just keep going */
chstore(token,tokmax,c);
break;
}
}
else if((qp=sindex(c,quote))>=0) /* quote */
{
switch(_p_state)
{
case IN_WHITE: /* these are identical, */
_p_state=IN_QUOTE; /* change states */
_p_curquote=quote[qp]; /* save quote char */
*quoted=1; /* set to true as long as something is in quotes */
break;
case IN_QUOTE:
if(quote[qp]==_p_curquote) /* same as the beginning quote? */
{
_p_state=IN_OZONE;
_p_curquote=0;
}
else
chstore(token,tokmax,c); /* treat as regular char */
break;
case IN_TOKEN:
case IN_OZONE:
*brkused=c; /* uses quote as break char */
goto byebye;
}
}
else if((qp=sindex(c,white))>=0) /* white */
{
switch(_p_state)
{
case IN_WHITE:
case IN_OZONE:
break; /* keep going */
case IN_TOKEN:
_p_state=IN_OZONE;
break;
case IN_QUOTE:
chstore(token,tokmax,c); /* it's valid here */
break;
}
}
else if(c==eschar) /* escape */
{
nc=line[(*next)+1];
if(nc==0) /* end of line */
{
*brkused=0;
chstore(token,tokmax,c);
++(*next);
goto byebye;
}
switch(_p_state)
{
case IN_WHITE:
--(*next);
_p_state=IN_TOKEN;
break;
case IN_TOKEN:
case IN_QUOTE:
++(*next);
chstore(token,tokmax,nc);
break;
case IN_OZONE:
goto byebye;
}
}
else /* anything else is just a real character */
{
switch(_p_state)
{
case IN_WHITE:
_p_state=IN_TOKEN; /* switch states */
case IN_TOKEN: /* these 2 are */
case IN_QUOTE: /* identical here */
chstore(token,tokmax,c);
break;
case IN_OZONE:
goto byebye;
}
}
} /* end of main loop */
byebye:
token[_p_tokpos]=0; /* make sure token ends with EOS */
return 0;
}

Binary file not shown.

View File

@ -0,0 +1,32 @@
2#0="&#0;&#2;"
2#120#Caption="Chairman of the US House Judiciary Committee, Henry Hyde,R-IL, makes his opening statement during impeachment hearings 11 December on Capitol Hill in Washington, DC. The committee is debating the articles of impechment and my take a vote on the impeachment of US President BIll Clinton on charges that he obstucted justice, lied and abused the power of his office as early as today. AFP PHOTO Paul J. RICHARDS&#13;"
2#122#Caption Writer="kb/lt"
2#100#Country Code="USA"
2#105#Headline="Old fart squeezing two fingers."
2#30#Release Date="19981211"
2#35#Release Time="000000+0000"
2#40#Special Instructions="This is a test. This is only a test. ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890"
2#80#Byline="PAUL J. RICHARDS"
2#85#Byline Title="STF"
2#110#Credit="AFP"
2#65#Originating Program="MacDesk Reporter"
2#115#Source="AFP"
2#5#Image Name="US-HYDE"
2#55#Created Date="19981211"
2#90#City="WASHINGTON"
2#95#Province State="DC"
2#101#Country="UNITED STATES"
2#103#Original Transmission Reference="DCA03"
2#15#Category="POL"
2#20#Supplemental Category="GOVERNMENT"
2#10#Priority="5"
2#25#Keyword="fart"
2#25#Keyword="squeezing"
2#25#Keyword="old"
2#25#Keyword="fingers"
2#75#Object Cycle="a"
2#60#Created Time="000000+0000"
2#70#Program Version="2.0.3"
2#130="3S"
2#135="GB"
2#231="Kaya A. Hoffmann 12/14/98 12:00:44 PM Copy To : Selects - \\KINYANI\Selects&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;"

View File

@ -0,0 +1,27 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = Makefile.script README mac_main.c mac_main.h metrowerks.note mkg3_main.c version.h

View File

@ -0,0 +1,385 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/mac-cw
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = Makefile.script README mac_main.c mac_main.h metrowerks.note mkg3_main.c version.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/mac-cw/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/mac-cw/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,72 @@
(* You must manually set the top-level PATHNAME here; everything else is automatic *)
set PATHNAME to "ritter:tiff-v3.4beta028:"
set PRINTING to "NO"
set MKG3STATES to PATHNAME & "mkg3states.mw"
set LIBTIFF to PATHNAME & "libtiff-68K.mw"
set TIFFINFO to PATHNAME & "tiffinfo.mw"
with timeout of 60000 seconds
tell application "MW C/C++ 68K 1.2.2"
activate
(* Create tif_fax3sm.c file *)
Create Project {file MKG3STATES}
Add Files {"mkg3states.c", "mkg3_main.c", "getopt.c"}
Add Files {"MacOS.lib"} To Segment 2
Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
Add Files {"SIOUX.68K.Lib"} To Segment 4
Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
Set Preferences To {Project Type:0, File Name:"mkg3states", File Creator:"????", File Type:"APPL"}
Make Project
Run Project
Remove Binaries
Close Project
(* Create LIBTIFF *)
Create Project {file LIBTIFF}
Add Files {"tif_apple.c", "tif_aux.c", "tif_close.c", "tif_codec.c", "tif_compress.c", "tif_dumpmode.c", "tif_error.c", "tif_flush.c", "tif_lzw.c", "tif_next.c", "tif_open.c", "tif_packbits.c"}
Add Files {"tif_fax3.c"} To Segment 2
Add Files {"tif_dirinfo.c", "tif_dir.c", "tif_dirwrite.c", "tif_dirread.c"} To Segment 3
Add Files {"tif_predict.c", "tif_print.c", "tif_read.c", "tif_strip.c", "tif_swab.c", "tif_thunder.c", "tif_tile.c", "tif_version.c", "tif_zip.c", "tif_jpeg.c", "tif_warning.c", "tif_write.c"} To Segment 4
Add Files {"tif_fax3sm.c"} To Segment 5
Add Files {"tif_getimage.c"} To Segment 6
Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"MacHeaders68K"}
Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
Set Preferences To {MacsBug Symbols:2, Generate SYM File:true, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
Set Preferences To {Project Type:2, File Name:"libtiff-68K", File Creator:"????", File Type:"APPL"}
Make Project
Close Project
Create Project {file TIFFINFO}
Add Files {"tiffinfo.c", "mac_main.c", "getopt.c"}
Add Files {"MacOS.lib"} To Segment 2
Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
Add Files {"SIOUX.68K.Lib"} To Segment 4
Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
Add Files {"libtiff-68K"} To Segment 6
Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
Set Preferences To {Project Type:0, File Name:"tiffinfo", File Creator:"????", File Type:"APPL"}
Make Project
Close Project
end tell
end timeout

View File

@ -0,0 +1,18 @@
----------------------------------------------------
Build instructions for LIBTIFF - CodeWarrior (6.1):
----------------------------------------------------
In this directory you will find a Makefile.script Applescript
file, which should be run in order to build the libtiff code
using MetroWerks CodeWarrior.
Refer to the "metrowerks.note" instructions on building the
library for 68k and PowerPC native code, as well as building
some of the libtiff tools, which are rather unix-like, but
at least give an example of how to link everything together.
Questions, comments, bug reports to Niles Ritter
(ndr@tazboy.jpl.nasa.gov). Sam Leffler takes no responsibility
for the viability of this stuff.
-Niles.

View File

@ -0,0 +1,20 @@
/*
* mac_main.c -- The REAL entry point which
* calls the tools main code. For the tools
* the symbol "main" has been #defined to "tool_main"
* so that this entry point may be used to access
* the user-input first.
*/
#undef main
int
main()
{
int argc;
char **argv;
argc=ccommand(&argv);
return tool_main(argc,argv); // Call the tool "main()" routine
}

View File

@ -0,0 +1,12 @@
/*
* mac_main.h -- redefines main entry point
*/
#ifndef _mac_main_h
#define _mac_main_h
#undef main
#define main tool_main
#endif /* _mac_main_h */

View File

@ -0,0 +1,84 @@
----------------------------------------------------
Build instructions for LIBTIFF - CodeWarrior (6.1):
----------------------------------------------------
Note: there is a bug in CW earlier than 6.1 which will generate
16-bit offset link errors for any projects using libtiff; you must
download the CodeWarrior 6.1 patch located at:
ftp://ftp.metrowerks.com/pub/updates/metro-patches-61.hqx
unpack the archive, insert the files and recompile the libraries
using the AppleScript provided.
1. Make sure that the directory containing these files is under
the "contrib" directory of the tiff folder; otherwise, some
access path preferences will need to be updated.
2. The instructions below are for the 68k platform build.
A similar script can be put together for the PPC version,
or you can just directly convert the projects. Be sure to
use the native libraries as well. NOTE: if anyone cooks
up an equivalent script for PPC, send it to me and I'll include
it with the rest of the package.
3. Open the file Makefile.script with an AppleScript Editor
and change the PATHNAME variable to point to your
top-level TIFF directory
4. Run the Script. It will do the following things:
4a. Prompt you for the current location of the CodeWarrior 68K
program.
4b. Create the source file "tif_fax3sm.c":
i) Build the project CW project mkg3states.cw. It will
produce a small program called mkg3states. Only a
68k version is provided, since you only have to run
this code once, and it only takes a few seconds.
ii) Run the built mkg3states program:
The program will temporarily take over ALL of the CPU, so
don't panic. After a few seconds it will produce a file called
"tif_fax3sm.c".
4c. Build the library project libtiff-68K.mw, producing library
called libtiff-68K.
4d. Build program project tiffinfo.mw; it will produce a
program called tiffinfo, which can dump the tiff tags of
a named file. Passing in no arguments will dump a help file
for the program. It is unix-flavored, but hey, it works.
5 When the script finishes, you will have a usable libtiff-68K
library, a passable "tiffinfo" program, and the projects used
to build them. Note that to get tiffinfo to work I have put
an include file in the project that redefines main(), and
then have a mac_main.c program that calls ccommand() first
and passes that to the actual main code. A real mac app,
of course, would never use this stuff at all...
. The tiffinfo.mw project may be used as a template to build
most of the other libtiff tools, or your own code. When
modifying a copy of the project, you will most likely need
to update the "Access Paths" directory if it is moved out of
the contrib folder.
6. If you are going to create a project from scratch, be sure
to set up the preferences with
4-byte ints
8-byte doubles
Far Code/Far Data
Large Linking model
and everything should work fine. If the console-style error
reports bother you, you can always override the error and
warning mechanism with TIFFSetErrorHandler to do something
more Mac-like.
Questions, comments to Niles Ritter (ndr@tazboy.jpl.nasa.gov).

View File

@ -0,0 +1,14 @@
/*
* mkg3_main.c -- passes fake arguments into main
*/
#undef main
int
main()
{
static char *argv[4] = {
"mkg3states", "-c", "const", "tif_fax3sm.c" };
return tool_main(4,argv); // Call the tool "main()" routine
}

View File

@ -0,0 +1,4 @@
#define VERSION \
"LIBTIFF, Version 3.4beta028 \n"\
"Copyright (c) 1988-1995 Sam Leffler\n"\
"Copyright (c) 1991-1996 Silicon Graphics, Inc."

View File

@ -0,0 +1,47 @@
# BUILD.mpw:
#
# Full build for Apple Macintosh Programmer's Workshop (MPW).
#
# This is an executable MPW script which creates various
# utilities, sets up the MPW makefiles and runs the builds.
# This script should be run at the top level TIFF directory with:
#
# directory :::
# :contrib:mac-mpw:BUILD.mpw
#
# NOTE: The full build requires that MPW have at least 6 MB
# allocated to it to compile the CCITT Fax codec tables. To
# deactivate CCITT compression edit the file :contrib:mac:libtiff.make
# first and follow the directions for disabling Fax decoding.
#
# All TIFF tools are built as MPW tools, executable from the
# MPW shell or other compatible tool server.
#
# Written by: Niles Ritter (ndr@tazboy.jpl.nasa.gov).
#
echo "############# Full Scratch Build for MPW #############"
# Create the ascii->mpw translation tool; this is used to
# convert standard ASCII files into ones using the special
# MPW characters, which don't live comfortably in unix tar files.
#
echo "######## Creating ASCII->MPW translator ########"
set contrib ':contrib:mac-mpw:'
directory {contrib}
createmake -tool mactrans mactrans.c > dev:null
make -f mactrans.make | streamedit -e "/CSANELib/||/Math/||/ToolLibs/ del" > mactrans.bld
execute mactrans.bld > dev:null
delete -y mactrans.make mactrans.bld mactrans.c.o || set status 0
directory ::: #An mpw trick for going up two levels
# Create the top-level Makefile and run it
echo "######## Creating Makefile ########"
catenate {contrib}top.make | {contrib}mactrans > Makefile
echo "######## Running Makefile ########"
make > build.mpw
execute build.mpw
echo "############# MPW Build Complete #############"
exit 0

View File

@ -0,0 +1,27 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = BUILD.mpw README libtiff.make mactrans.c port.make tools.make top.make

View File

@ -0,0 +1,385 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/mac-mpw
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = BUILD.mpw README libtiff.make mactrans.c port.make tools.make top.make
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/mac-mpw/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/mac-mpw/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,20 @@
######################
About contrib:mac-mpw:
######################
This directory contains all of the utilities and makefile source
to build the LIBTIFF library and tools from the MPW Shell. The
file BUILD.mpw in this directory is an executable script
which uses all of these files to create the MPW makefiles and
run them.
The <file>.make files are not MPW makefiles as such,
but are when run through the "mactrans" program, which turns
the ascii "%nn" metacharacters into the standard weird MPW
make characters.
This translation trick is necessary to protect the files when
they are put into unix tarfiles, which tend to mangle the
special characters.
--Niles Ritter (ndr@tazboy.jpl.nasa.gov)

View File

@ -0,0 +1,202 @@
#
# Tag Image File Format Library
#
# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
# Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
#
#
# Makefile for Mac using MPW 3.3.1 and MPW C 3.2.4
#
# Note: This file must be run through "mactrans" before it can
# be recognized by MPW as a valid makefile. The problem is that MPW
# uses special non-ASCII characters, which tend to get mangled when stored
# in unix tar files, etc. "mactrans" is built as part of the TIFF MPW build.
#
#
DEPTH = ::
# FAX Options: If you do not wish to include the FAX options, uncomment
# the first four definitions and comment out the next four
# definitions. Note that to build programs with the FAX libraries you
# have to include "-model far" in your compile and link statements.
#
# Also, to build the fax code (including the tif_fax3sm.c file, which is
# created by the MPW tool "mkg3states", also built below), you will
# need to size the MPW program up to about 6 megabytes or so.
#FAX_OPTIONS =
#FAX_OBJECTS =
#FAX_SOURCES = tif_fax3.c
#FAX_CONFIG =
FAX_OPTIONS = -model far
FAX_OBJECTS = tif_fax3.c.o tif_fax3sm.c.o
FAX_SOURCES = tif_fax3.c tif_fax3sm.c
FAX_CONFIG = -d CCITT_SUPPORT
NULL=
RM = delete -y -i
COPTS =
LIBPORT=::port:libport.o
#
.c.o %c4 .c
{C} -model far {CFLAGS} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
CONF_LIBRARY= %b6
-d HAVE_IEEEFP=1 %b6
-d BSDTYPES
CONF_COMPRESSION= %b6
{FAX_CONFIG} %b6
-d COMPRESSION_SUPPORT %b6
-d PACKBITS_SUPPORT %b6
-d LZW_SUPPORT %b6
-d THUNDER_SUPPORT %b6
-d NEXT_SUPPORT
CFLAGS= {FAX_OPTIONS} {IPATH} {CONF_LIBRARY} {CONF_COMPRESSION}
INCS= tiff.h tiffio.h
SRCS= %b6
{FAX_SOURCES} %b6
tif_apple.c %b6
tif_aux.c %b6
tif_close.c %b6
tif_codec.c %b6
tif_compress.c %b6
tif_dir.c %b6
tif_dirinfo.c %b6
tif_dirread.c %b6
tif_dirwrite.c %b6
tif_dumpmode.c %b6
tif_error.c %b6
tif_getimage.c %b6
tif_jpeg.c %b6
tif_flush.c %b6
tif_lzw.c %b6
tif_next.c %b6
tif_open.c %b6
tif_packbits.c %b6
tif_predict.c %b6
tif_print.c %b6
tif_read.c %b6
tif_swab.c %b6
tif_strip.c %b6
tif_thunder.c %b6
tif_tile.c %b6
tif_version.c %b6
tif_warning.c %b6
tif_write.c %b6
tif_zip.c %b6
{NULL}
OBJS= %b6
{FAX_OBJECTS} %b6
tif_apple.c.o %b6
tif_aux.c.o %b6
tif_close.c.o %b6
tif_codec.c.o %b6
tif_compress.c.o %b6
tif_dir.c.o %b6
tif_dirinfo.c.o %b6
tif_dirread.c.o %b6
tif_dirwrite.c.o %b6
tif_dumpmode.c.o %b6
tif_error.c.o %b6
tif_getimage.c.o %b6
tif_jpeg.c.o %b6
tif_flush.c.o %b6
tif_lzw.c.o %b6
tif_next.c.o %b6
tif_open.c.o %b6
tif_packbits.c.o %b6
tif_predict.c.o %b6
tif_print.c.o %b6
tif_read.c.o %b6
tif_swab.c.o %b6
tif_strip.c.o %b6
tif_thunder.c.o %b6
tif_tile.c.o %b6
tif_version.c.o %b6
tif_warning.c.o %b6
tif_write.c.o %b6
tif_zip.c.o %b6
{NULL}
ALL=libtiff.o
all %c4 {ALL}
libtiff.o %c4 {OBJS}
Lib {OBJS} -o libtiff.o
{OBJS} %c4 tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h
#
# The finite state machine tables used by the G3/G4 decoders
# are generated by the mkg3states program. On systems without
# make these rules have to be manually carried out.
#
tif_fax3sm.c %c4 mkg3states tif_fax3.h
{RM} tif_fax3sm.c || set status 0
:mkg3states -c const tif_fax3sm.c
mkg3states.c.o %c4 mkg3states.c
C -model far mkg3states.c -o mkg3states.c.o
mkg3states %c4%c4 mkg3states.c.o
Link -model far -d -c 'MPS ' -t MPST %b6
mkg3states.c.o %b6
{LIBPORT} %b6
"{CLibraries}"StdClib.o %b6
"{Libraries}"Stubs.o %b6
"{Libraries}"Runtime.o %b6
"{Libraries}"Interface.o %b6
-o mkg3states
ALPHA = "{DEPTH}dist:tiff.alpha"
VERSION = "{DEPTH}VERSION"
version.h %c4 {VERSION} {ALPHA}
Set VERSION1 `catenate {VERSION}`
Set VERSION2 "{VERSION1}`streamedit -e "1 rep /%a5%c5 %c5 (%c5)%a81/ %a81" {ALPHA}`"
delete -y -i version.h || set status 0
echo '#define VERSION "LIBTIFF, Version' {VERSION2} '\nCopyright (c) 1988-1995 Sam Leffler\nCopyright (c) 1991-1995 Silicon Graphics, Inc."' >version.h
tif_version.c.o %c4 version.h
clean %c4
{RM} {ALL} || set status 0
{RM} {OBJS} || set status 0
{RM} mkg3states || set status 0
{RM} mkg3states.c.o || set status 0
{RM} tif_fax3sm.c%c5 || set status 0
{RM} version.h || set status 0

View File

@ -0,0 +1,56 @@
/*
* mactrans.c -- Hack filter used to generate MPW files
* with special characters from pure ASCII, denoted "%nn"
* where nn is hex. (except for "%%", which is literal '%').
*
* calling sequence:
*
* catenate file | mactrans [-toascii | -fromascii] > output
*
* Written by: Niles Ritter.
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
void to_ascii(void);
void from_ascii(void);
main(int argc, char *argv[])
{
if (argc<2 || argv[1][1]=='f') from_ascii();
else to_ascii();
exit (0);
}
void from_ascii(void)
{
char c;
int d;
while ((c=getchar())!=EOF)
{
if (c!='%' || (c=getchar())=='%') putchar(c);
else
{
ungetc(c,stdin);
scanf("%2x",&d);
*((unsigned char *)&c) = d;
putchar(c);
}
}
}
void to_ascii(void)
{
char c;
int d;
while ((c=getchar())!=EOF)
{
if (isascii(c)) putchar (c);
else
{
d = *((unsigned char *)&c);
printf("%%%2x",d);
}
}
}

View File

@ -0,0 +1,53 @@
#
# Tag Image File Format Library
#
# Copyright (c) 1995 Sam Leffler
# Copyright (c) 1995 Silicon Graphics, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
#
DEPTH= ::
SRCDIR= :
NULL =
CC = C
AR = Lib
AROPTS =
RM= delete -y
IPATH = -I {DEPTH} -I {SRCDIR}
COPTS =
OPTIMIZER=
CFLAGS = {COPTS} {OPTIMIZER} {IPATH}
CFILES =
OBJECTS = getopt.c.o
TARGETS = libport.o
.c.o %c4 .c
{CC} -model far {COptions} {CFLAGS} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
all %c4 {TARGETS}
libport.o %c4 {OBJECTS}
{AR} {OBJECTS} -o libport.o
clean %c4
{RM} {TARGETS} {OBJECTS} || set status 0

View File

@ -0,0 +1,138 @@
#
# Tag Image File Format Library
#
# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
# Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Stanford and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
#
#
# Makefile for Mac using MPW 3.2.3 and MPW C 3.2.4
#
COPTS = -model far
.c.o %c4 .c
{C} {COPTS} {CFLAGS} -s {Default} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
RM = delete -y -i
CONF_LIBRARY= %b6
-d USE_CONST=0 %b6
-d BSDTYPES
NULL=
IPATH= -I ::libtiff
CFLAGS= -w -m {IPATH} {CONF_LIBRARY}
LIBPORT= ::port:libport.o
LOptions= -model far -w -srt -d -c 'MPS ' -t MPST
LIBTIFF= ::libtiff:libtiff.o
LIBS= {LIBTIFF} %b6
{LIBPORT} %b6
"{CLibraries}"CSANELib.o %b6
"{CLibraries}"Math.o %b6
"{CLibraries}"StdClib.o %b6
"{Libraries}"Stubs.o %b6
"{Libraries}"Runtime.o %b6
"{Libraries}"Interface.o %b6
"{Libraries}"ToolLibs.o %b6
{NULL}
SRCS= %b6
pal2rgb.c %b6
ras2tiff.c %b6
thumbnail.c %b6
tiff2bw.c %b6
tiff2ps.c %b6
tiffcmp.c %b6
tiffcp.c %b6
tiffdither.c %b6
tiffdump.c %b6
tiffinfo.c %b6
tiffmedian.c %b6
{NULL}
MACHALL=ras2tiff
ALL= %b6
tiffinfo %b6
tiffcmp %b6
tiffcp %b6
tiffdump %b6
tiffmedian %b6
tiff2bw %b6
tiffdither %b6
tiff2ps %b6
pal2rgb %b6
gif2tiff %b6
{MACHALL}
all %c4 {ALL}
tiffinfo %c4 tiffinfo.c.o {LIBTIFF}
Link {LOptions} tiffinfo.c.o {LIBS} -o tiffinfo
tiffcmp %c4 tiffcmp.c.o {LIBTIFF}
Link {LOptions} tiffcmp.c.o {LIBS} -o tiffcmp
tiffcp %c4 tiffcp.c.o {LIBTIFF}
Link {LOptions} tiffcp.c.o {LIBS} -o tiffcp
tiffdump %c4 tiffdump.c.o {LIBTIFF}
Link {LOptions} tiffdump.c.o {LIBS} -o tiffdump
tiffmedian %c4 tiffmedian.c.o {LIBTIFF}
Link {LOptions} tiffmedian.c.o {LIBS} -o tiffmedian
tiff2ps %c4 tiff2ps.c.o {LIBTIFF}
Link {LOptions} tiff2ps.c.o {LIBS} -o tiff2ps
# junky stuff...
# convert RGB image to B&W
tiff2bw %c4 tiff2bw.c.o {LIBTIFF}
Link {LOptions} tiff2bw.c.o {LIBS} -o tiff2bw
# convert B&W image to bilevel w/ FS dithering
tiffdither %c4 tiffdither.c.o {LIBTIFF}
Link {LOptions} tiffdither.c.o {LIBS} -o tiffdither
# GIF converter
gif2tiff %c4 gif2tiff.c.o {LIBTIFF}
Link {LOptions} gif2tiff.c.o {LIBS} -o gif2tiff
# convert Palette image to RGB
pal2rgb %c4 pal2rgb.c.o {LIBTIFF}
Link {LOptions} pal2rgb.c.o {LIBS} -o pal2rgb
# Sun rasterfile converter
ras2tiff %c4 ras2tiff.c.o {LIBTIFF}
Link {LOptions} ras2tiff.c.o {LIBS} -o ras2tiff
# generate thumbnail images from fax
thumbnail %c4 thumbnail.c.o {LIBTIFF}
Link {LOptions} thumbnail.c.o {LIBS} -o thumbnail
clean %c4
{RM} {ALL} %c5.c.o ycbcr

View File

@ -0,0 +1,133 @@
#
# Tag Image File Format Library
#
# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
# Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Stanford and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
#
#
# Makefile for Mac using MPW 3.2.3 and MPW C 3.2.4
#
#
# Written by: Niles D. Ritter
#
RM= delete -y -i
PORT=:port:
LIBTIFF=:libtiff:
TOOLS=:tools:
CONTRIB=:contrib:mac-mpw:
MACTRANS="{CONTRIB}mactrans"
NULL=
MAKEFILES = %b6
{PORT}Makefile %b6
{LIBTIFF}Makefile %b6
{TOOLS}Makefile %b6
{NULL}
all %c4 PORT LIBTIFF TOOLS
MAKEFILES %c4 {MAKEFILES}
TOOLS %c4 LIBTIFF
LIBTIFF %c4 PORT
# Create the port routines
PORT %c4 {PORT}Makefile
directory {PORT}
(make || set status 0) > build.mpw
set echo 1
execute build.mpw
set echo 0
{RM} build.mpw || set status 0
directory ::
# Create the port routines
LIBTIFF %c4 {LIBTIFF}Makefile
directory {LIBTIFF}
(make || set status 0) > build.mpw
set echo 1
execute build.mpw
set echo 0
{RM} build.mpw || set status 0
directory ::
# Create the tools
TOOLS %c4 {TOOLS}Makefile
directory {TOOLS}
(make || set status 0) > build.mpw
set echo 1
execute build.mpw
set echo 0
{RM} build.mpw || set status 0
directory ::
# Makefile dependencies
{PORT}Makefile %c4 {CONTRIB}port.make
catenate {CONTRIB}port.make | {MACTRANS} > {PORT}Makefile
{LIBTIFF}Makefile %c4 {CONTRIB}libtiff.make
catenate {CONTRIB}libtiff.make | {MACTRANS} > {LIBTIFF}Makefile
{TOOLS}Makefile %c4 {CONTRIB}tools.make
catenate {CONTRIB}tools.make | {MACTRANS} > {TOOLS}Makefile
clean %c4 clean.port clean.contrib clean.libtiff clean.tools clean.make
clean.port %c4
directory {PORT}
(make clean || set status 0) > purge
purge
{RM} purge || set status 0
{RM} Makefile || set status 0
{RM} build.mpw || set status 0
cd ::
clean.contrib %c4
{RM} {MACTRANS} || set status 0
clean.libtiff %c4
directory {LIBTIFF}
(make clean || set status 0) > purge
purge
{RM} purge || set status 0
{RM} Makefile || set status 0
{RM} build.mpw || set status 0
cd ::
clean.tools %c4
directory {TOOLS}
(make clean || set status 0) > purge
purge
{RM} purge || set status 0
{RM} Makefile || set status 0
{RM} build.mpw || set status 0
cd ::
clean.make %c4
{RM} {MAKEFILES} || set status 0
{RM} build.mpw || set status 0

View File

@ -0,0 +1,27 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = README mfs_file.c

View File

@ -0,0 +1,385 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/mfs
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = README mfs_file.c
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/mfs/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/mfs/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,37 @@
Date: Mon, 23 Jun 1997 13:30:48 +0200
To: <sam@cthulhu.engr.sgi.com>
From: "Mike Johnson" <mikehunt@swipnet.se>
Subject: libtiff - Thanks
Return-Path: mikehunt@swipnet.se
Delivery-Date: Mon, 23 Jun 1997 06:53:39 -0700
Hi Sam,
I noticed in the README from libtiff that you would like to know about
what people have done with libtiff, so I thought I would drop you a
line.
We have used libtiff to create and convert TIFF images of financial
documents which are sent from and to major document processing systems
in Sweden and Denmark.
I would like to express my deep gratitude to yourself and Sillicon
Graphics for making this excellent library available for public use.
There is obviously a lot of work that has gone in to libtiff and the
quality of the code and documentation is an example to others.
One thing that libtiff did not do was work on a memory area rather than
files. In my applications I had already read a TIFF or other format
file in to memory and did not want to waste I/O writing it out again
for libtiff's benefit. I therefore constructed a set of functions to
pass up to TIFFClientOpen to simulate a file in memory. I have attached
my mfs (memory file system) source code for you to use or junk, as you
see fit. :-)
Once again, thanks very much for making my life simpler.
Best Regards,
Mike Johnson.

View File

@ -0,0 +1,579 @@
/*
--------------------------------------------------------------------------------
- Module : mem_file.c
- Description : A general purpose library for manipulating a memory area
- as if it were a file.
- mfs_ stands for memory file system.
- Author : Mike Johnson - Banctec AB 03/07/96
-
--------------------------------------------------------------------------------
*/
/*
Copyright (c) 1996 Mike Johnson
Copyright (c) 1996 BancTec AB
Permission to use, copy, modify, distribute, and sell this software
for any purpose is hereby granted without fee, provided
that (i) the above copyright notices and this permission notice appear in
all copies of the software and related documentation, and (ii) the names of
Mike Johnson and BancTec may not be used in any advertising or
publicity relating to the software.
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MIKE JOHNSON OR BANCTEC BE LIABLE FOR
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.
*/
/*
--------------------------------------------------------------------------------
- Includes
--------------------------------------------------------------------------------
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
--------------------------------------------------------------------------------
- Definitions
--------------------------------------------------------------------------------
*/
#define MAX_BUFFS 20
#define FALSE 0
#define TRUE 1
/*
--------------------------------------------------------------------------------
- Globals
--------------------------------------------------------------------------------
*/
static char *buf[MAX_BUFFS]; /* Memory for each open buf */
static long buf_off[MAX_BUFFS]; /* File pointer for each buf */
static long buf_size[MAX_BUFFS]; /* Count of bytes allocated for each buf */
static long fds[MAX_BUFFS]; /* File descriptor status */
static int buf_mode[MAX_BUFFS]; /* Mode of buffer (r, w, a) */
static int library_init_done = FALSE;
/*
--------------------------------------------------------------------------------
- Function prototypes
--------------------------------------------------------------------------------
*/
int mfs_open (void *ptr, int size, char *mode);
int mfs_lseek (int fd, int offset, int whence);
int mfs_read (int fd, void *buf, int size);
int mfs_write (int fd, void *buf, int size);
int mfs_size (int fd);
int mfs_map (int fd, char **addr, size_t *len);
int mfs_unmap (int fd);
int mfs_close (int fd);
static int extend_mem_file (int fd, int size);
static void mem_init ();
/*
--------------------------------------------------------------------------------
- Function code
--------------------------------------------------------------------------------
*/
/*
--------------------------------------------------------------------------------
- Function : mfs_open ()
-
- Arguments : Pointer to allocated buffer, initial size of buffer,
- mode spec (r, w, a)
-
- Returns : File descriptor or -1 if error.
-
- Description : Register this area of memory (which has been allocated
- and has a file read into it) under the mem_file library.
- A file descriptor is returned which can the be passed
- back to TIFFClientOpen and used as if it was a disk
- based fd.
- If the call is for mode 'w' then pass (void *)NULL as
- the buffer and zero size and the library will
- allocate memory for you.
- If the mode is append then pass (void *)NULL and size
- zero or with a valid address.
-
--------------------------------------------------------------------------------
*/
int mfs_open (void *buffer, int size, char *mode)
{
int ret, i;
void *tmp;
if (library_init_done == FALSE)
{
mem_init ();
library_init_done = TRUE;
}
ret = -1;
/* Find a free fd */
for (i = 0; i < MAX_BUFFS; i++)
{
if (fds[i] == -1)
{
ret = i;
break;
}
}
if (i == MAX_BUFFS) /* No more free descriptors */
{
ret = -1;
errno = EMFILE;
}
if (ret >= 0 && *mode == 'r')
{
if (buffer == (void *)NULL)
{
ret = -1;
errno = EINVAL;
}
else
{
buf[ret] = (char *)buffer;
buf_size[ret] = size;
buf_off[ret] = 0;
}
}
else if (ret >= 0 && *mode == 'w')
{
if (buffer != (void *)NULL)
{
ret = -1;
errno = EINVAL;
}
else
{
tmp = malloc (0); /* Get a pointer */
if (tmp == (void *)NULL)
{
ret = -1;
errno = EDQUOT;
}
else
{
buf[ret] = (char *)tmp;
buf_size[ret] = 0;
buf_off[ret] = 0;
}
}
}
else if (ret >= 0 && *mode == 'a')
{
if (buffer == (void *) NULL) /* Create space for client */
{
tmp = malloc (0); /* Get a pointer */
if (tmp == (void *)NULL)
{
ret = -1;
errno = EDQUOT;
}
else
{
buf[ret] = (char *)tmp;
buf_size[ret] = 0;
buf_off[ret] = 0;
}
}
else /* Client has file read in already */
{
buf[ret] = (char *)buffer;
buf_size[ret] = size;
buf_off[ret] = 0;
}
}
else /* Some other invalid combination of parameters */
{
ret = -1;
errno = EINVAL;
}
if (ret != -1)
{
fds[ret] = 0;
buf_mode[ret] = *mode;
}
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : mfs_lseek ()
-
- Arguments : File descriptor, offset, whence
-
- Returns : as per man lseek (2)
-
- Description : Does the same as lseek (2) except on a memory based file.
- Note: the memory area will be extended if the caller
- attempts to seek past the current end of file (memory).
-
--------------------------------------------------------------------------------
*/
int mfs_lseek (int fd, int offset, int whence)
{
int ret;
long test_off;
if (fds[fd] == -1) /* Not open */
{
ret = -1;
errno = EBADF;
}
else if (offset < 0 && whence == SEEK_SET)
{
ret = -1;
errno = EINVAL;
}
else
{
switch (whence)
{
case SEEK_SET:
if (offset > buf_size[fd])
extend_mem_file (fd, offset);
buf_off[fd] = offset;
ret = offset;
break;
case SEEK_CUR:
test_off = buf_off[fd] + offset;
if (test_off < 0)
{
ret = -1;
errno = EINVAL;
}
else
{
if (test_off > buf_size[fd])
extend_mem_file (fd, test_off);
buf_off[fd] = test_off;
ret = test_off;
}
break;
case SEEK_END:
test_off = buf_size[fd] + offset;
if (test_off < 0)
{
ret = -1;
errno = EINVAL;
}
else
{
if (test_off > buf_size[fd])
extend_mem_file (fd, test_off);
buf_off[fd] = test_off;
ret = test_off;
}
break;
default:
errno = EINVAL;
ret = -1;
break;
}
}
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : mfs_read ()
-
- Arguments : File descriptor, buffer, size
-
- Returns : as per man read (2)
-
- Description : Does the same as read (2) except on a memory based file.
- Note: An attempt to read past the end of memory currently
- allocated to the file will return 0 (End Of File)
-
--------------------------------------------------------------------------------
*/
int mfs_read (int fd, void *clnt_buf, int size)
{
int ret;
if (fds[fd] == -1 || buf_mode[fd] != 'r')
{
/* File is either not open, or not opened for read */
ret = -1;
errno = EBADF;
}
else if (buf_off[fd] + size > buf_size[fd])
{
ret = 0; /* EOF */
}
else
{
memcpy (clnt_buf, (void *) (buf[fd] + buf_off[fd]), size);
buf_off[fd] = buf_off[fd] + size;
ret = size;
}
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : mfs_write ()
-
- Arguments : File descriptor, buffer, size
-
- Returns : as per man write (2)
-
- Description : Does the same as write (2) except on a memory based file.
- Note: the memory area will be extended if the caller
- attempts to write past the current end of file (memory).
-
--------------------------------------------------------------------------------
*/
int mfs_write (int fd, void *clnt_buf, int size)
{
int ret;
if (fds[fd] == -1 || buf_mode[fd] == 'r')
{
/* Either the file is not open or it is opened for reading only */
ret = -1;
errno = EBADF;
}
else if (buf_mode[fd] == 'w')
{
/* Write */
if (buf_off[fd] + size > buf_size[fd])
{
extend_mem_file (fd, buf_off[fd] + size);
buf_size[fd] = (buf_off[fd] + size);
}
memcpy ((buf[fd] + buf_off[fd]), clnt_buf, size);
buf_off[fd] = buf_off[fd] + size;
ret = size;
}
else
{
/* Append */
if (buf_off[fd] != buf_size[fd])
buf_off[fd] = buf_size[fd];
extend_mem_file (fd, buf_off[fd] + size);
buf_size[fd] += size;
memcpy ((buf[fd] + buf_off[fd]), clnt_buf, size);
buf_off[fd] = buf_off[fd] + size;
ret = size;
}
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : mfs_size ()
-
- Arguments : File descriptor
-
- Returns : integer file size
-
- Description : This function returns the current size of the file in bytes.
-
--------------------------------------------------------------------------------
*/
int mfs_size (int fd)
{
int ret;
if (fds[fd] == -1) /* Not open */
{
ret = -1;
errno = EBADF;
}
else
ret = buf_size[fd];
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : mfs_map ()
-
- Arguments : File descriptor, ptr to address, ptr to length
-
- Returns : Map status (succeeded or otherwise)
-
- Description : This function tells the client where the file is mapped
- in memory and what size the mapped area is. It is provided
- to satisfy the MapProc function in libtiff. It pretends
- that the file has been mmap (2)ped.
-
--------------------------------------------------------------------------------
*/
int mfs_map (int fd, char **addr, size_t *len)
{
int ret;
if (fds[fd] == -1) /* Not open */
{
ret = -1;
errno = EBADF;
}
else
{
*addr = buf[fd];
*len = buf_size[fd];
ret = 0;
}
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : mfs_unmap ()
-
- Arguments : File descriptor
-
- Returns : UnMap status (succeeded or otherwise)
-
- Description : This function does nothing as the file is always
- in memory.
-
--------------------------------------------------------------------------------
*/
int mfs_unmap (int fd)
{
return (0);
}
/*
--------------------------------------------------------------------------------
- Function : mfs_close ()
-
- Arguments : File descriptor
-
- Returns : close status (succeeded or otherwise)
-
- Description : Close the open memory file. (Make fd available again.)
-
--------------------------------------------------------------------------------
*/
int mfs_close (int fd)
{
int ret;
if (fds[fd] == -1) /* Not open */
{
ret = -1;
errno = EBADF;
}
else
{
fds[fd] = -1;
ret = 0;
}
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : extend_mem_file ()
-
- Arguments : File descriptor, length to extend to.
-
- Returns : 0 - All OK, -1 - realloc () failed.
-
- Description : Increase the amount of memory allocated to a file.
-
--------------------------------------------------------------------------------
*/
static int extend_mem_file (int fd, int size)
{
void *new_mem;
int ret;
if ((new_mem = realloc (buf[fd], size)) == (void *) NULL)
ret = -1;
else
{
buf[fd] = (char *) new_mem;
ret = 0;
}
return (ret);
}
/*
--------------------------------------------------------------------------------
- Function : mem_init ()
-
- Arguments : None
-
- Returns : void
-
- Description : Initialise the library.
-
--------------------------------------------------------------------------------
*/
static void mem_init ()
{
int i;
for (i = 0; i < MAX_BUFFS; i++)
{
fds[i] = -1;
buf[i] = (char *)NULL;
buf_size[i] = 0;
buf_off[i] = 0;
}
}

View File

@ -0,0 +1,27 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = README jdhuff_add.c

View File

@ -0,0 +1,385 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/ojpeg
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = README jdhuff_add.c
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/ojpeg/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/ojpeg/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,24 @@
For the broadest possible support for OJPEG files the following steps are
necessary:
o Ensure you are able to build with JPEG support (see config.site).
o Uncomment OJPEG="yes" statement in config.site file or
#define OJPEG_SUPPORT somewhere. This can be put in tiffconf.h for
instance.
o Append the jdhuff_add.c code to the end of jdhuff.c within the IJG JPEG
libraries jdhuff.c file and recompile libjpeg (jpeg-6b tested).
o Rebuild cleanly.
OJPEG support implemented by Scott Marovich at HP (marovich@hpl.hp.com).
---
For notes on further improved JPEG-in-TIFF support also see the following
bug in bugzilla:
http://bugzilla.remotesensing.org/show_bug.cgi?id=156

View File

@ -0,0 +1,32 @@
/*
* BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in-
* TIFF encapsulations produced by Microsoft's Wang Imaging
* for Windows application with the public-domain TIFF Library. Based upon an
* examination of selected output files, this program apparently divides a JPEG
* bit-stream into consecutive horizontal TIFF "strips", such that the JPEG
* encoder's/decoder's DC coefficients for each image component are reset before
* each "strip". Moreover, a "strip" is not necessarily encoded in a multiple
* of 8 bits, so one must sometimes discard 1-7 bits at the end of each "strip"
* for alignment to the next input-Byte storage boundary. IJG JPEG Library
* decoder state is not normally exposed to client applications, so this sub-
* routine provides the TIFF Library with a "hook" to make these corrections.
* It should be called after "jpeg_start_decompress()" and before
* "jpeg_finish_decompress()", just before decoding each "strip" using
* "jpeg_read_raw_data()" or "jpeg_read_scanlines()".
*
* This kludge is not sanctioned or supported by the Independent JPEG Group, and
* future changes to the IJG JPEG Library might invalidate it. Do not send bug
* reports about this code to IJG developers. Instead, contact the author for
* advice: Scott B. Marovich <marovich@hpl.hp.com>, Hewlett-Packard Labs, 6/01.
*/
GLOBAL(void)
jpeg_reset_huff_decode (register j_decompress_ptr cinfo,register float *refbw)
{ register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy;
register int ci = 0;
/* Re-initialize DC predictions */
do entropy->saved.last_dc_val[ci] = -refbw[ci << 1];
while (++ci < cinfo->comps_in_scan);
/* Discard encoded input bits, up to the next Byte boundary */
entropy->bitstate.bits_left &= ~7;
}

View File

@ -0,0 +1,27 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c

View File

@ -0,0 +1,385 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/pds
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/pds/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/pds/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,90 @@
Date: Fri, 01 Aug 1997 20:14:52 MDT
To: Sam Leffler <sam@cthulhu.engr.sgi.com>
From: "Conrad J. Poelman (WSAT)" <poelmanc@plk.af.mil>
Subject: Potential TIFF library additions
Delivery-Date: Fri, 01 Aug 1997 19:21:06 -0700
Sam,
You probably don't remember me, but I sent in a couple of bug fixes
regarding the TIFF library about a 16 months ago or so...
I just wanted to send you two other additions that I have made to our
local version of the TIFF library in hopes that you will want to
incorporate them into your next major release of the TIFF library.
(These additions are based on TIFF version 3.4beta31, but they sit on
top of the library so they shouldn't be much trouble to incorporate them
into any more recent version.) They are internally documented to a
reasonable extent and we've been successfully using them in our code
here for over a year. If you think they would make good additions to the
TIFF library, I'd be happy to clean them up more, document them more,
and/or integrate them with the latest version of the TIFF library, but I
figured I'd see if you were interested in using them before I went to
all that trouble.
TIFF Image Iterator
-------------------
Your ReadRGBA() routine works well for reading many different formats
(TILED, STIP, compressed or not, etc.) of the most basic types of data
(RGB, 8-bit greyscale, 8-bit colormapped) into an SGI-style data array,
and serves as a good template for users with other needs. I used it as
an exmaple of how to make an iterator which, rather than fill a data
array, calls an arbitrary user-supplied callback function for each
"chunk" of data - that "chunk" might be a strip or a tile, and might
have one sample-per-pixel or two, and might be 8-bit data or 16-bit or
24-bit. The callback function can do whatever it wants with the data -
store it in a big array, convert it to RGBA, or draw it directly to the
screen. I was able to use this iterator to read 16-bit greyscale and 32-
and 64-bit floating point data, which wasn't possible with ReadRGBA().
I have tested this routine with 8- and 16-bit greyscale data as well as
with 32- and 64-bit floating point data. I believe nearly all of our
data is organized in strips, so actually I'd appreciate it if you had
some tiled images that I could test it with.
It should certainly be possible and would be cleanest to reimplement
ReadRGBA() in terms of the image iterator, but I haven't done that.
Private Sub-Directory Read/Write
--------------------------------
TIFF-PL is a Phillips Laboratory extension to the TIFF tags that allows
us to store satellite imaging-specific information in a TIFF format,
such as the satellite's trajectory, the imaging time, etc. In order to
give us the flexibility to modify the tag definitions without getting
approval from the TIFF committee every time, we were given only three
TIFF tags - a PL signature, a PL version number, and PL directory
offset, which lists the position in the file at which to find a private
sub-directory of tags-value pairs. So I wrote two routines:
TIFFWritePrivateDataSubDirectory(), which takes a list of tags and a
"get" function and writes the tag values into the TIFF file, returning
the offset within the file at which it wrote the directory; and
TIFFReadPrivateDataSubDirectory(), which takes an offset, a list of
tags, and a "set" function and reads all the data from the private
directory. The functions themselves are pretty simple. (The files are
huge because I had to basically copy all of the tif_dirread.c and
tif_dirwrite.c files in order to access the various fetching routines
which were all declared static and therefore inaccessible in the TIFF
library.)
I'm including the four source files (tif_imgiter.h, tif_imgiter.c,
tif_pdsdirread.c, tif_pdsdirwrite.c) in case you want to take a look at
them. I can also send you some sample code that uses them if you like.
If you're interested in having them incorporated into the standard TIFF
library, I'd be happy to do that integration and clean up and document
the routines. (For example, I've already realized that instead of
limiting the SEP callback function to three bands (R,G,B) it should take
an array to enable the handling of n-banded multi-spectral data...) If
not, I'll just leave them as they are, since they work fine for us now.
Holler if you have any questions.
-- Conrad
__________________________________________________________________
Capt Conrad J. Poelman PL/WSAT (Phillips Laboratory)
505-846-4347 3550 Aberdeen Ave SE
(FAX) 505-846-4374 Kirtland AFB, NM 87117-5776

View File

@ -0,0 +1,518 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_imageiter.c,v 1.3 2005/12/21 12:23:13 joris Exp $ */
/*
* Copyright (c) 1991-1996 Sam Leffler
* Copyright (c) 1991-1996 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
/*
* TIFF Library
*
* Written by Conrad J. Poelman, PL/WSAT, Kirtland AFB, NM on 26 Mar 96.
*
* This file contains code to allow a calling program to "iterate" over each
* pixels in an image as it is read from the file. The iterator takes care of
* reading strips versus (possibly clipped) tiles, decoding the information
* according to the decoding method, and so on, so that calling program can
* ignore those details. The calling program does, however, need to be
* conscious of the type of the pixel data that it is receiving.
*
* For reasons of efficiency, the callback function actually gets called for
* "blocks" of pixels rather than for individual pixels. The format of the
* callback arguments is given below.
*
* This code was taken from TIFFReadRGBAImage() in tif_getimage.c of the original
* TIFF distribution, and simplified and generalized to provide this general
* iteration capability. Those routines could certainly be re-implemented in terms
* of a TIFFImageIter if desired.
*
*/
#include "tiffiop.h"
#include "tif_imageiter.h"
#include <assert.h>
#include <stdio.h>
static int gtTileContig(TIFFImageIter*, void *udata, uint32, uint32);
static int gtTileSeparate(TIFFImageIter*, void *udata, uint32, uint32);
static int gtStripContig(TIFFImageIter*, void *udata, uint32, uint32);
static int gtStripSeparate(TIFFImageIter*, void *udata, uint32, uint32);
static const char photoTag[] = "PhotometricInterpretation";
static int
isCCITTCompression(TIFF* tif)
{
uint16 compress;
TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress);
return (compress == COMPRESSION_CCITTFAX3 ||
compress == COMPRESSION_CCITTFAX4 ||
compress == COMPRESSION_CCITTRLE ||
compress == COMPRESSION_CCITTRLEW);
}
int
TIFFImageIterBegin(TIFFImageIter* img, TIFF* tif, int stop, char emsg[1024])
{
uint16* sampleinfo;
uint16 extrasamples;
uint16 planarconfig;
int colorchannels;
img->tif = tif;
img->stoponerr = stop;
TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
img->alpha = 0;
TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel);
TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
&extrasamples, &sampleinfo);
if (extrasamples == 1)
switch (sampleinfo[0]) {
case EXTRASAMPLE_ASSOCALPHA: /* data is pre-multiplied */
case EXTRASAMPLE_UNASSALPHA: /* data is not pre-multiplied */
img->alpha = sampleinfo[0];
break;
}
colorchannels = img->samplesperpixel - extrasamples;
TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig);
if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) {
switch (colorchannels) {
case 1:
if (isCCITTCompression(tif))
img->photometric = PHOTOMETRIC_MINISWHITE;
else
img->photometric = PHOTOMETRIC_MINISBLACK;
break;
case 3:
img->photometric = PHOTOMETRIC_RGB;
break;
default:
sprintf(emsg, "Missing needed %s tag", photoTag);
return (0);
}
}
switch (img->photometric) {
case PHOTOMETRIC_PALETTE:
if (!TIFFGetField(tif, TIFFTAG_COLORMAP,
&img->redcmap, &img->greencmap, &img->bluecmap)) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Missing required \"Colormap\" tag");
return (0);
}
/* fall thru... */
case PHOTOMETRIC_MINISWHITE:
case PHOTOMETRIC_MINISBLACK:
/* This should work now so skip the check - BSR
if (planarconfig == PLANARCONFIG_CONTIG && img->samplesperpixel != 1) {
sprintf(emsg,
"Sorry, can not handle contiguous data with %s=%d, and %s=%d",
photoTag, img->photometric,
"Samples/pixel", img->samplesperpixel);
return (0);
}
*/
break;
case PHOTOMETRIC_YCBCR:
if (planarconfig != PLANARCONFIG_CONTIG) {
sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
"Planarconfiguration", planarconfig);
return (0);
}
/* It would probably be nice to have a reality check here. */
{ uint16 compress;
TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress);
if (compress == COMPRESSION_JPEG && planarconfig == PLANARCONFIG_CONTIG) {
/* can rely on libjpeg to convert to RGB */
/* XXX should restore current state on exit */
TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
img->photometric = PHOTOMETRIC_RGB;
}
}
break;
case PHOTOMETRIC_RGB:
if (colorchannels < 3) {
sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
"Color channels", colorchannels);
return (0);
}
break;
case PHOTOMETRIC_SEPARATED: {
uint16 inkset;
TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
if (inkset != INKSET_CMYK) {
sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
"InkSet", inkset);
return (0);
}
if (img->samplesperpixel != 4) {
sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
"Samples/pixel", img->samplesperpixel);
return (0);
}
break;
}
default:
sprintf(emsg, "Sorry, can not handle image with %s=%d",
photoTag, img->photometric);
return (0);
}
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height);
TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation);
switch (img->orientation) {
case ORIENTATION_BOTRIGHT:
case ORIENTATION_RIGHTBOT: /* XXX */
case ORIENTATION_LEFTBOT: /* XXX */
TIFFWarning(TIFFFileName(tif), "using bottom-left orientation");
img->orientation = ORIENTATION_BOTLEFT;
/* fall thru... */
case ORIENTATION_BOTLEFT:
break;
case ORIENTATION_TOPRIGHT:
case ORIENTATION_RIGHTTOP: /* XXX */
case ORIENTATION_LEFTTOP: /* XXX */
default:
TIFFWarning(TIFFFileName(tif), "using top-left orientation");
img->orientation = ORIENTATION_TOPLEFT;
/* fall thru... */
case ORIENTATION_TOPLEFT:
break;
}
img->isContig =
!(planarconfig == PLANARCONFIG_SEPARATE && colorchannels > 1);
if (img->isContig) {
img->get = TIFFIsTiled(tif) ? gtTileContig : gtStripContig;
} else {
img->get = TIFFIsTiled(tif) ? gtTileSeparate : gtStripSeparate;
}
return (1);
}
int
TIFFImageIterGet(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
{
if (img->get == NULL) {
TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif), "No \"get\" routine setup");
return (0);
}
if (img->callback.any == NULL) {
TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif),
"No \"put\" routine setupl; probably can not handle image format");
return (0);
}
return (*img->get)(img, udata, w, h);
}
TIFFImageIterEnd(TIFFImageIter* img)
{
/* Nothing to free... ? */
}
/*
* Read the specified image into an ABGR-format raster.
*/
int
TIFFReadImageIter(TIFF* tif,
uint32 rwidth, uint32 rheight, uint8* raster, int stop)
{
char emsg[1024];
TIFFImageIter img;
int ok;
if (TIFFImageIterBegin(&img, tif, stop, emsg)) {
/* XXX verify rwidth and rheight against width and height */
ok = TIFFImageIterGet(&img, raster, rwidth, img.height);
TIFFImageIterEnd(&img);
} else {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
ok = 0;
}
return (ok);
}
/*
* Get an tile-organized image that has
* PlanarConfiguration contiguous if SamplesPerPixel > 1
* or
* SamplesPerPixel == 1
*/
static int
gtTileContig(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
{
TIFF* tif = img->tif;
ImageIterTileContigRoutine callback = img->callback.contig;
uint16 orientation;
uint32 col, row;
uint32 tw, th;
u_char* buf;
int32 fromskew;
uint32 nrow;
buf = (u_char*) _TIFFmalloc(TIFFTileSize(tif));
if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
return (0);
}
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
orientation = img->orientation;
for (row = 0; row < h; row += th) {
nrow = (row + th > h ? h - row : th);
for (col = 0; col < w; col += tw) {
if (TIFFReadTile(tif, buf, col, row, 0, 0) < 0 && img->stoponerr)
break;
if (col + tw > w) {
/*
* Tile is clipped horizontally. Calculate
* visible portion and skewing factors.
*/
uint32 npix = w - col;
fromskew = tw - npix;
(*callback)(img, udata, col, row, npix, nrow, fromskew, buf);
} else {
(*callback)(img, udata, col, row, tw, nrow, 0, buf);
}
}
}
_TIFFfree(buf);
return (1);
}
/*
* Get an tile-organized image that has
* SamplesPerPixel > 1
* PlanarConfiguration separated
* We assume that all such images are RGB.
*/
static int
gtTileSeparate(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
{
TIFF* tif = img->tif;
ImageIterTileSeparateRoutine callback = img->callback.separate;
uint16 orientation;
uint32 col, row;
uint32 tw, th;
u_char* buf;
u_char* r;
u_char* g;
u_char* b;
u_char* a;
tsize_t tilesize;
int32 fromskew;
int alpha = img->alpha;
uint32 nrow;
tilesize = TIFFTileSize(tif);
buf = (u_char*) _TIFFmalloc(4*tilesize);
if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
return (0);
}
r = buf;
g = r + tilesize;
b = g + tilesize;
a = b + tilesize;
if (!alpha)
memset(a, 0xff, tilesize);
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
orientation = img->orientation;
for (row = 0; row < h; row += th) {
nrow = (row + th > h ? h - row : th);
for (col = 0; col < w; col += tw) {
if (TIFFReadTile(tif, r, col, row,0,0) < 0 && img->stoponerr)
break;
if (TIFFReadTile(tif, g, col, row,0,1) < 0 && img->stoponerr)
break;
if (TIFFReadTile(tif, b, col, row,0,2) < 0 && img->stoponerr)
break;
if (alpha && TIFFReadTile(tif,a,col,row,0,3) < 0 && img->stoponerr)
break;
if (col + tw > w) {
/*
* Tile is clipped horizontally. Calculate
* visible portion and skewing factors.
*/
uint32 npix = w - col;
fromskew = tw - npix;
(*callback)(img, udata, col, row, npix, nrow, fromskew, r, g, b, a);
} else {
(*callback)(img, udata, col, row, tw, nrow, 0, r, g, b, a);
}
}
}
_TIFFfree(buf);
return (1);
}
/*
* Get a strip-organized image that has
* PlanarConfiguration contiguous if SamplesPerPixel > 1
* or
* SamplesPerPixel == 1
*/
static int
gtStripContig(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
{
TIFF* tif = img->tif;
ImageIterTileContigRoutine callback = img->callback.contig;
uint16 orientation;
uint32 row, nrow;
u_char* buf;
uint32 rowsperstrip;
uint32 imagewidth = img->width;
tsize_t scanline;
int32 fromskew;
buf = (u_char*) _TIFFmalloc(TIFFStripSize(tif));
if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for strip buffer");
return (0);
}
orientation = img->orientation;
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
scanline = TIFFScanlineSize(tif);
fromskew = (w < imagewidth ? imagewidth - w : 0);
for (row = 0; row < h; row += rowsperstrip) {
nrow = (row + rowsperstrip > h ? h - row : rowsperstrip);
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0),
buf, nrow*scanline) < 0 && img->stoponerr)
break;
(*callback)(img, udata, 0, row, w, nrow, fromskew, buf);
}
_TIFFfree(buf);
return (1);
}
/*
* Get a strip-organized image with
* SamplesPerPixel > 1
* PlanarConfiguration separated
* We assume that all such images are RGB.
*/
static int
gtStripSeparate(TIFFImageIter* img, void *udata, uint32 w, uint32 h)
{
TIFF* tif = img->tif;
ImageIterTileSeparateRoutine callback = img->callback.separate;
uint16 orientation;
u_char *buf;
u_char *r, *g, *b, *a;
uint32 row, nrow;
tsize_t scanline;
uint32 rowsperstrip;
uint32 imagewidth = img->width;
tsize_t stripsize;
int32 fromskew;
int alpha = img->alpha;
stripsize = TIFFStripSize(tif);
r = buf = (u_char *)_TIFFmalloc(4*stripsize);
if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
return (0);
}
g = r + stripsize;
b = g + stripsize;
a = b + stripsize;
if (!alpha)
memset(a, 0xff, stripsize);
orientation = img->orientation;
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
scanline = TIFFScanlineSize(tif);
fromskew = (w < imagewidth ? imagewidth - w : 0);
for (row = 0; row < h; row += rowsperstrip) {
nrow = (row + rowsperstrip > h ? h - row : rowsperstrip);
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0),
r, nrow*scanline) < 0 && img->stoponerr)
break;
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 1),
g, nrow*scanline) < 0 && img->stoponerr)
break;
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 2),
b, nrow*scanline) < 0 && img->stoponerr)
break;
if (alpha &&
(TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 3),
a, nrow*scanline) < 0 && img->stoponerr))
break;
(*callback)(img, udata, 0, row, w, nrow, fromskew, r, g, b, a);
}
_TIFFfree(buf);
return (1);
}
DECLAREContigCallbackFunc(TestContigCallback)
{
printf("Contig Callback called with x = %d, y = %d, w = %d, h = %d, fromskew = %d\n",
x, y, w, h, fromskew);
}
DECLARESepCallbackFunc(TestSepCallback)
{
printf("Sep Callback called with x = %d, y = %d, w = %d, h = %d, fromskew = %d\n",
x, y, w, h, fromskew);
}
#ifdef MAIN
main(int argc, char **argv)
{
char emsg[1024];
TIFFImageIter img;
int ok;
int stop = 1;
TIFF *tif;
unsigned long nx, ny;
unsigned short BitsPerSample, SamplesPerPixel;
int isColorMapped, isPliFile;
unsigned char *ColorMap;
unsigned char *data;
if (argc < 2) {
fprintf(stderr,"usage: %s tiff_file\n",argv[0]);
exit(1);
}
tif = (TIFF *)PLIGetImage(argv[1], (void *) &data, &ColorMap,
&nx, &ny, &BitsPerSample, &SamplesPerPixel,
&isColorMapped, &isPliFile);
if (tif != NULL) {
if (TIFFImageIterBegin(&img, tif, stop, emsg)) {
/* Here need to set data and callback function! */
if (img.isContig) {
img.callback = TestContigCallback;
} else {
img.callback = TestSepCallback;
}
ok = TIFFImageIterGet(&img, NULL, img.width, img.height);
TIFFImageIterEnd(&img);
} else {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
}
}
}
#endif

View File

@ -0,0 +1,57 @@
typedef struct _TIFFImageIter TIFFImageIter;
/* The callback function is called for each "block" of image pixel data after
it has been read from the file and decoded. This image pixel data is in the
buffer pp, and this data represents the image pixels from (x,y) to
(x+w,y+h). It is stored in pixel format, so each pixel contains
img->samplesperpixel consecutive samples each containing img->bitspersample
bits of data. The array pp is ordered in h consecutive rows of w+fromskew
pixels each. */
typedef void (*ImageIterTileContigRoutine)
(TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
unsigned char*);
#define DECLAREContigCallbackFunc(name) \
static void name(\
TIFFImageIter* img, \
void* user_data, \
uint32 x, uint32 y, \
uint32 w, uint32 h, \
int32 fromskew, \
u_char* pp \
)
typedef void (*ImageIterTileSeparateRoutine)
(TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
unsigned char*, unsigned char*, unsigned char*, unsigned char*);
#define DECLARESepCallbackFunc(name) \
static void name(\
TIFFImageIter* img, \
void* user_data, \
uint32 x, uint32 y, \
uint32 w, uint32 h,\
int32 fromskew, \
u_char* r, u_char* g, u_char* b, u_char* a\
)
struct _TIFFImageIter {
TIFF* tif; /* image handle */
int stoponerr; /* stop on read error */
int isContig; /* data is packed/separate */
int alpha; /* type of alpha data present */
uint32 width; /* image width */
uint32 height; /* image height */
uint16 bitspersample; /* image bits/sample */
uint16 samplesperpixel; /* image samples/pixel */
uint16 orientation; /* image orientation */
uint16 photometric; /* image photometric interp */
uint16* redcmap; /* colormap pallete */
uint16* greencmap;
uint16* bluecmap;
/* get image data routine */
int (*get)(TIFFImageIter*, void *udata, uint32, uint32);
union {
void (*any)(TIFFImageIter*);
ImageIterTileContigRoutine contig;
ImageIterTileSeparateRoutine separate;
} callback; /* fn to exec for each block */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,964 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirwrite.c,v 1.3 2005/12/21 12:23:13 joris Exp $ */
/* When writing data to TIFF files, it is often useful to store application-
specific data in a private TIFF directory so that the tags don't need to
be registered and won't conflict with other people's user-defined tags.
One needs to have a registered public tag which contains some amount of
raw data. That raw data, however, is interpreted at an independent,
separate, private tiff directory. This file provides some routines which
will be useful for converting that data from its raw binary form into
the proper form for your application.
*/
/*
* Copyright (c) 1988-1996 Sam Leffler
* Copyright (c) 1991-1996 Silicon Graphics, Inc.
* Copyright (c( 1996 USAF Phillips Laboratory
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
/*
* TIFF Library.
*
* These routines written by Conrad J. Poelman on a single late-night of
* March 20-21, 1996.
*
* The entire purpose of this file is to provide a single external function,
* TIFFWritePrivateDataSubDirectory(). This function is intended for use
* in writing a private subdirectory structure into a TIFF file. The
* actual reading of data from the structure is handled by the getFieldFn(),
* which is passed to TIFFWritePrivateDataSubDirectory() as a parameter. The
* idea is to enable any application wishing to read private subdirectories to
* do so easily using this function, without modifying the TIFF library.
*
* The astute observer will notice that only two functions are at all different
* from the original tif_dirwrite.c file: TIFFWritePrivateDataSubDirectory()and
* TIFFWriteNormalSubTag(). All the other stuff that makes this file so huge
* is only necessary because all of those functions are declared static in
* tif_dirwrite.c, so we have to totally duplicate them in order to use them.
*
* Oh, also please note the bug-fix in the routine TIFFWriteNormalSubTag(),
* which equally should be applied to TIFFWriteNormalTag().
*
*/
#include "tiffiop.h"
#if HAVE_IEEEFP
#define TIFFCvtNativeToIEEEFloat(tif, n, fp)
#define TIFFCvtNativeToIEEEDouble(tif, n, dp)
#else
extern void TIFFCvtNativeToIEEEFloat(TIFF*, uint32, float*);
extern void TIFFCvtNativeToIEEEDouble(TIFF*, uint32, double*);
#endif
static int TIFFWriteNormalTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*);
static int TIFFWriteNormalSubTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*,
int (*getFieldFn)(TIFF *tif,ttag_t tag,...));
static void TIFFSetupShortLong(TIFF*, ttag_t, TIFFDirEntry*, uint32);
static int TIFFSetupShortPair(TIFF*, ttag_t, TIFFDirEntry*);
static int TIFFWritePerSampleShorts(TIFF*, ttag_t, TIFFDirEntry*);
static int TIFFWritePerSampleAnys(TIFF*, TIFFDataType, ttag_t, TIFFDirEntry*);
static int TIFFWriteShortTable(TIFF*, ttag_t, TIFFDirEntry*, uint32, uint16**);
static int TIFFWriteShortArray(TIFF*,
TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint16*);
static int TIFFWriteLongArray(TIFF *,
TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint32*);
static int TIFFWriteRationalArray(TIFF *,
TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
static int TIFFWriteFloatArray(TIFF *,
TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
static int TIFFWriteDoubleArray(TIFF *,
TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
static int TIFFWriteByteArray(TIFF*, TIFFDirEntry*, char*);
static int TIFFWriteAnyArray(TIFF*,
TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
#ifdef COLORIMETRY_SUPPORT
static int TIFFWriteTransferFunction(TIFF*, TIFFDirEntry*);
#endif
static int TIFFWriteData(TIFF*, TIFFDirEntry*, char*);
static int TIFFLinkDirectory(TIFF*);
#define WriteRationalPair(type, tag1, v1, tag2, v2) { \
if (!TIFFWriteRational(tif, type, tag1, dir, v1)) \
goto bad; \
if (!TIFFWriteRational(tif, type, tag2, dir+1, v2)) \
goto bad; \
dir++; \
}
#define TIFFWriteRational(tif, type, tag, dir, v) \
TIFFWriteRationalArray((tif), (type), (tag), (dir), 1, &(v))
#ifndef TIFFWriteRational
static int TIFFWriteRational(TIFF*,
TIFFDataType, ttag_t, TIFFDirEntry*, float);
#endif
/* This function will write an entire directory to the disk, and return the
offset value indicating where in the file it wrote the beginning of the
directory structure. This is NOT the same as the offset value before
calling this function, because some of the fields may have caused various
data items to be written out BEFORE writing the directory structure.
This code was basically written by ripping of the TIFFWriteDirectory()
code and generalizing it, using RPS's TIFFWritePliIfd() code for
inspiration. My original goal was to make this code general enough that
the original TIFFWriteDirectory() could be rewritten to just call this
function with the appropriate field and field-accessing arguments.
However, now I realize that there's a lot of code that gets executed for
the main, standard TIFF directories that does not apply to special
private subdirectories, so such a reimplementation for the sake of
eliminating redundant or duplicate code is probably not possible,
unless we also pass in a Main flag to indiciate which type of handling
to do, which would be kind of a hack. I've marked those places where I
changed or ripped out code which would have to be re-inserted to
generalize this function. If it can be done in a clean and graceful way,
it would be a great way to generalize the TIFF library. Otherwise, I'll
just leave this code here where it duplicates but remains on top of and
hopefully mostly independent of the main TIFF library.
The caller will probably want to free the sub directory structure after
returning from this call, since otherwise once written out, the user
is likely to forget about it and leave data lying around.
*/
toff_t
TIFFWritePrivateDataSubDirectory(TIFF* tif,
uint32 pdir_fieldsset[], int pdir_fields_last,
TIFFFieldInfo *field_info,
int (*getFieldFn)(TIFF *tif, ttag_t tag, ...))
{
uint16 dircount;
uint32 diroff, nextdiroff;
ttag_t tag;
uint32 nfields;
tsize_t dirsize;
char* data;
TIFFDirEntry* dir;
u_long b, *fields, fields_size;
toff_t directory_offset;
TIFFFieldInfo* fip;
/*
* Deleted out all of the encoder flushing and such code from here -
* not necessary for subdirectories.
*/
/* Finish writing out any image data. */
TIFFFlushData(tif);
/*
* Size the directory so that we can calculate
* offsets for the data items that aren't kept
* in-place in each field.
*/
nfields = 0;
for (b = 0; b <= pdir_fields_last; b++)
if (FieldSet(pdir_fieldsset, b))
/* Deleted code to make size of first 4 tags 2
instead of 1. */
nfields += 1;
dirsize = nfields * sizeof (TIFFDirEntry);
data = (char*) _TIFFmalloc(dirsize);
if (data == NULL) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"Cannot write private subdirectory, out of space");
return (0);
}
/*
* Place directory in data section of the file. If there isn't one
* yet, place it at the end of the file. The directory is treated as
* data, so we don't link it into the directory structure at all.
*/
if (tif->tif_dataoff == 0)
tif->tif_dataoff =(TIFFSeekFile(tif, (toff_t) 0, SEEK_END)+1) &~ 1;
diroff = tif->tif_dataoff;
tif->tif_dataoff = (toff_t)(
diroff + sizeof (uint16) + dirsize + sizeof (toff_t));
if (tif->tif_dataoff & 1)
tif->tif_dataoff++;
(void) TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET);
/*tif->tif_curdir++;*/
dir = (TIFFDirEntry*) data;
/*
* Setup external form of directory
* entries and write data items.
*/
/*
* We make a local copy of the fieldsset here so that we don't mess
* up the original one when we call ResetFieldBit(). But I'm not sure
* why the original code calls ResetFieldBit(), since we're already
* going through the fields in order...
*
* fields_size is the number of uint32's we will need to hold the
* bit-mask for all of the fields. If our highest field number is
* 100, then we'll need 100 / (8*4)+1 == 4 uint32's to hold the
* fieldset.
*
* Unlike the original code, we allocate fields dynamically based
* on the requested pdir_fields_last value, allowing private
* data subdirectories to contain more than the built-in code's limit
* of 95 tags in a directory.
*/
fields_size = pdir_fields_last / (8*sizeof(uint32)) + 1;
fields = _TIFFmalloc(fields_size*sizeof(uint32));
_TIFFmemcpy(fields, pdir_fieldsset, fields_size * sizeof(uint32));
/* Deleted "write out extra samples tag" code here. */
/* Deleted code for checking a billion little special cases for the
* standard TIFF tags. Should add a general mechanism for overloading
* write function for each field, just like Brian kept telling me!!!
*/
for (fip = field_info; fip->field_tag; fip++) {
/* Deleted code to check for FIELD_IGNORE!! */
if (/* fip->field_bit == FIELD_IGNORE || */
!FieldSet(fields, fip->field_bit))
continue;
if (!TIFFWriteNormalSubTag(tif, dir, fip, getFieldFn))
goto bad;
dir++;
ResetFieldBit(fields, fip->field_bit);
}
/* Now we've written all of the referenced data, and are about to
write the main directory structure, so grab the tif_dataoff value
now so we can remember where we wrote the directory. */
directory_offset = tif->tif_dataoff;
/*
* Write directory.
*/
dircount = (uint16) nfields;
/* Deleted code to link to the next directory - we set it to zero! */
nextdiroff = 0;
if (tif->tif_flags & TIFF_SWAB) {
/*
* The file's byte order is opposite to the
* native machine architecture. We overwrite
* the directory information with impunity
* because it'll be released below after we
* write it to the file. Note that all the
* other tag construction routines assume that
* we do this byte-swapping; i.e. they only
* byte-swap indirect data.
*/
for (dir = (TIFFDirEntry*) data; dircount; dir++, dircount--) {
TIFFSwabArrayOfShort(&dir->tdir_tag, 2);
TIFFSwabArrayOfLong(&dir->tdir_count, 2);
}
dircount = (uint16) nfields;
TIFFSwabShort(&dircount);
TIFFSwabLong(&nextdiroff);
}
(void) TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET);
if (!WriteOK(tif, &dircount, sizeof (dircount))) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing private subdirectory count");
goto bad;
}
if (!WriteOK(tif, data, dirsize)) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing private subdirectory contents");
goto bad;
}
if (!WriteOK(tif, &nextdiroff, sizeof (nextdiroff))) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing private subdirectory link");
goto bad;
}
tif->tif_dataoff += sizeof(dircount) + dirsize + sizeof(nextdiroff);
_TIFFfree(data);
_TIFFfree(fields);
tif->tif_flags &= ~TIFF_DIRTYDIRECT;
#if (0)
/* This stuff commented out because I don't think we want it for
subdirectories, but I could be wrong. */
(*tif->tif_cleanup)(tif);
/*
* Reset directory-related state for subsequent
* directories.
*/
TIFFDefaultDirectory(tif);
tif->tif_curoff = 0;
tif->tif_row = (uint32) -1;
tif->tif_curstrip = (tstrip_t) -1;
#endif
return (directory_offset);
bad:
_TIFFfree(data);
_TIFFfree(fields);
return (0);
}
#undef WriteRationalPair
/*
* Process tags that are not special cased.
*/
/* The standard function TIFFWriteNormalTag() could definitely be replaced
with a simple call to this function, just adding TIFFGetField() as the
last argument. */
static int
TIFFWriteNormalSubTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip,
int (*getFieldFn)(TIFF *tif, ttag_t tag, ...))
{
u_short wc = (u_short) fip->field_writecount;
dir->tdir_tag = fip->field_tag;
dir->tdir_type = (u_short) fip->field_type;
dir->tdir_count = wc;
#define WRITEF(x,y) x(tif, fip->field_type, fip->field_tag, dir, wc, y)
switch (fip->field_type) {
case TIFF_SHORT:
case TIFF_SSHORT:
if (wc > 1) {
uint16* wp;
if (wc == (u_short) TIFF_VARIABLE) {
(*getFieldFn)(tif, fip->field_tag, &wc, &wp);
dir->tdir_count = wc;
} else
(*getFieldFn)(tif, fip->field_tag, &wp);
if (!WRITEF(TIFFWriteShortArray, wp))
return (0);
} else {
uint16 sv;
(*getFieldFn)(tif, fip->field_tag, &sv);
dir->tdir_offset =
TIFFInsertData(tif, dir->tdir_type, sv);
}
break;
case TIFF_LONG:
case TIFF_SLONG:
if (wc > 1) {
uint32* lp;
if (wc == (u_short) TIFF_VARIABLE) {
(*getFieldFn)(tif, fip->field_tag, &wc, &lp);
dir->tdir_count = wc;
} else
(*getFieldFn)(tif, fip->field_tag, &lp);
if (!WRITEF(TIFFWriteLongArray, lp))
return (0);
} else {
/* XXX handle LONG->SHORT conversion */
(*getFieldFn)(tif, fip->field_tag, &dir->tdir_offset);
}
break;
case TIFF_RATIONAL:
case TIFF_SRATIONAL:
if (wc > 1) {
float* fp;
if (wc == (u_short) TIFF_VARIABLE) {
(*getFieldFn)(tif, fip->field_tag, &wc, &fp);
dir->tdir_count = wc;
} else
(*getFieldFn)(tif, fip->field_tag, &fp);
if (!WRITEF(TIFFWriteRationalArray, fp))
return (0);
} else {
float fv;
(*getFieldFn)(tif, fip->field_tag, &fv);
if (!WRITEF(TIFFWriteRationalArray, &fv))
return (0);
}
break;
case TIFF_FLOAT:
if (wc > 1) {
float* fp;
if (wc == (u_short) TIFF_VARIABLE) {
(*getFieldFn)(tif, fip->field_tag, &wc, &fp);
dir->tdir_count = wc;
} else
(*getFieldFn)(tif, fip->field_tag, &fp);
if (!WRITEF(TIFFWriteFloatArray, fp))
return (0);
} else {
float fv;
(*getFieldFn)(tif, fip->field_tag, &fv);
if (!WRITEF(TIFFWriteFloatArray, &fv))
return (0);
}
break;
case TIFF_DOUBLE:
/* Hey - I think this is a bug, or at least a "gross
inconsistency", in the TIFF library. Look at the original
TIFF library code below within the "#if (0) ... #else".
Just from the type of *dp, you can see that this code
expects TIFFGetField() to be handed a double ** for
any TIFF_DOUBLE tag, even for the constant wc==1 case.
This is totally inconsistent with other fields (like
TIFF_FLOAT, above) and is also inconsistent with the
TIFFSetField() function for TIFF_DOUBLEs, which expects
to be passed a single double by value for the wc==1 case.
(See the handling of TIFFFetchNormalTag() in tif_dirread.c
for an example.) Maybe this function was written before
TIFFWriteDoubleArray() was written, not that that's an
excuse. Anyway, the new code below is a trivial modification
of the TIFF_FLOAT code above. The fact that even single
doubles get written out in the data segment and get an
offset value stored is irrelevant here - that is all
handled by TIFFWriteDoubleArray(). */
#if (0)
{ double* dp;
if (wc == (u_short) TIFF_VARIABLE) {
(*getFieldFn)(tif, fip->field_tag, &wc, &dp);
dir->tdir_count = wc;
} else
(*getFieldFn)(tif, fip->field_tag, &dp);
TIFFCvtNativeToIEEEDouble(tif, wc, dp);
if (!TIFFWriteData(tif, dir, (char*) dp))
return (0);
}
#else
if (wc > 1) {
double* dp;
if (wc == (u_short) TIFF_VARIABLE) {
(*getFieldFn)(tif, fip->field_tag, &wc, &dp);
dir->tdir_count = wc;
} else
(*getFieldFn)(tif, fip->field_tag, &dp);
if (!WRITEF(TIFFWriteDoubleArray, dp))
return (0);
} else {
double dv;
(*getFieldFn)(tif, fip->field_tag, &dv);
if (!WRITEF(TIFFWriteDoubleArray, &dv))
return (0);
}
#endif
break;
case TIFF_ASCII:
{ char* cp;
(*getFieldFn)(tif, fip->field_tag, &cp);
dir->tdir_count = (uint32) (strlen(cp) + 1);
if (!TIFFWriteByteArray(tif, dir, cp))
return (0);
}
break;
case TIFF_UNDEFINED:
{ char* cp;
if (wc == (u_short) TIFF_VARIABLE) {
(*getFieldFn)(tif, fip->field_tag, &wc, &cp);
dir->tdir_count = wc;
} else
(*getFieldFn)(tif, fip->field_tag, &cp);
if (!TIFFWriteByteArray(tif, dir, cp))
return (0);
}
break;
}
return (1);
}
#undef WRITEF
/* Everything after this is exactly duplicated from the standard tif_dirwrite.c
file, necessitated by the fact that they are declared static there so
we can't call them!
*/
/*
* Setup a directory entry with either a SHORT
* or LONG type according to the value.
*/
static void
TIFFSetupShortLong(TIFF* tif, ttag_t tag, TIFFDirEntry* dir, uint32 v)
{
dir->tdir_tag = tag;
dir->tdir_count = 1;
if (v > 0xffffL) {
dir->tdir_type = (short) TIFF_LONG;
dir->tdir_offset = v;
} else {
dir->tdir_type = (short) TIFF_SHORT;
dir->tdir_offset = TIFFInsertData(tif, (int) TIFF_SHORT, v);
}
}
#undef MakeShortDirent
#ifndef TIFFWriteRational
/*
* Setup a RATIONAL directory entry and
* write the associated indirect value.
*/
static int
TIFFWriteRational(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, float v)
{
return (TIFFWriteRationalArray(tif, type, tag, dir, 1, &v));
}
#endif
#define NITEMS(x) (sizeof (x) / sizeof (x[0]))
/*
* Setup a directory entry that references a
* samples/pixel array of SHORT values and
* (potentially) write the associated indirect
* values.
*/
static int
TIFFWritePerSampleShorts(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
{
uint16 buf[10], v;
uint16* w = buf;
int i, status, samples = tif->tif_dir.td_samplesperpixel;
if (samples > NITEMS(buf))
w = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
TIFFGetField(tif, tag, &v);
for (i = 0; i < samples; i++)
w[i] = v;
status = TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, samples, w);
if (w != buf)
_TIFFfree((char*) w);
return (status);
}
/*
* Setup a directory entry that references a samples/pixel array of ``type''
* values and (potentially) write the associated indirect values. The source
* data from TIFFGetField() for the specified tag must be returned as double.
*/
static int
TIFFWritePerSampleAnys(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir)
{
double buf[10], v;
double* w = buf;
int i, status;
int samples = (int) tif->tif_dir.td_samplesperpixel;
if (samples > NITEMS(buf))
w = (double*) _TIFFmalloc(samples * sizeof (double));
TIFFGetField(tif, tag, &v);
for (i = 0; i < samples; i++)
w[i] = v;
status = TIFFWriteAnyArray(tif, type, tag, dir, samples, w);
if (w != buf)
_TIFFfree(w);
return (status);
}
#undef NITEMS
/*
* Setup a pair of shorts that are returned by
* value, rather than as a reference to an array.
*/
static int
TIFFSetupShortPair(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
{
uint16 v[2];
TIFFGetField(tif, tag, &v[0], &v[1]);
return (TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, 2, v));
}
/*
* Setup a directory entry for an NxM table of shorts,
* where M is known to be 2**bitspersample, and write
* the associated indirect data.
*/
static int
TIFFWriteShortTable(TIFF* tif,
ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16** table)
{
uint32 i, off;
dir->tdir_tag = tag;
dir->tdir_type = (short) TIFF_SHORT;
/* XXX -- yech, fool TIFFWriteData */
dir->tdir_count = (uint32) (1L<<tif->tif_dir.td_bitspersample);
off = tif->tif_dataoff;
for (i = 0; i < n; i++)
if (!TIFFWriteData(tif, dir, (char *)table[i]))
return (0);
dir->tdir_count *= n;
dir->tdir_offset = off;
return (1);
}
/*
* Write/copy data associated with an ASCII or opaque tag value.
*/
static int
TIFFWriteByteArray(TIFF* tif, TIFFDirEntry* dir, char* cp)
{
if (dir->tdir_count > 4) {
if (!TIFFWriteData(tif, dir, cp))
return (0);
} else
_TIFFmemcpy(&dir->tdir_offset, cp, dir->tdir_count);
return (1);
}
/*
* Setup a directory entry of an array of SHORT
* or SSHORT and write the associated indirect values.
*/
static int
TIFFWriteShortArray(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16* v)
{
dir->tdir_tag = tag;
dir->tdir_type = (short) type;
dir->tdir_count = n;
if (n <= 2) {
if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
dir->tdir_offset = (uint32) ((long) v[0] << 16);
if (n == 2)
dir->tdir_offset |= v[1] & 0xffff;
} else {
dir->tdir_offset = v[0] & 0xffff;
if (n == 2)
dir->tdir_offset |= (long) v[1] << 16;
}
return (1);
} else
return (TIFFWriteData(tif, dir, (char*) v));
}
/*
* Setup a directory entry of an array of LONG
* or SLONG and write the associated indirect values.
*/
static int
TIFFWriteLongArray(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint32* v)
{
dir->tdir_tag = tag;
dir->tdir_type = (short) type;
dir->tdir_count = n;
if (n == 1) {
dir->tdir_offset = v[0];
return (1);
} else
return (TIFFWriteData(tif, dir, (char*) v));
}
/*
* Setup a directory entry of an array of RATIONAL
* or SRATIONAL and write the associated indirect values.
*/
static int
TIFFWriteRationalArray(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
{
uint32 i;
uint32* t;
int status;
dir->tdir_tag = tag;
dir->tdir_type = (short) type;
dir->tdir_count = n;
t = (uint32*) _TIFFmalloc(2*n * sizeof (uint32));
for (i = 0; i < n; i++) {
float fv = v[i];
int sign = 1;
uint32 den;
if (fv < 0) {
if (type == TIFF_RATIONAL) {
TIFFWarning(tif->tif_name,
"\"%s\": Information lost writing value (%g) as (unsigned) RATIONAL",
_TIFFFieldWithTag(tif,tag)->field_name, v);
fv = 0;
} else
fv = -fv, sign = -1;
}
den = 1L;
if (fv > 0) {
while (fv < 1L<<(31-3) && den < 1L<<(31-3))
fv *= 1<<3, den *= 1L<<3;
}
t[2*i+0] = sign * (fv + 0.5);
t[2*i+1] = den;
}
status = TIFFWriteData(tif, dir, (char *)t);
_TIFFfree((char*) t);
return (status);
}
static int
TIFFWriteFloatArray(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
{
dir->tdir_tag = tag;
dir->tdir_type = (short) type;
dir->tdir_count = n;
TIFFCvtNativeToIEEEFloat(tif, n, v);
if (n == 1) {
dir->tdir_offset = *(uint32*) &v[0];
return (1);
} else
return (TIFFWriteData(tif, dir, (char*) v));
}
static int
TIFFWriteDoubleArray(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
{
dir->tdir_tag = tag;
dir->tdir_type = (short) type;
dir->tdir_count = n;
TIFFCvtNativeToIEEEDouble(tif, n, v);
return (TIFFWriteData(tif, dir, (char*) v));
}
/*
* Write an array of ``type'' values for a specified tag (i.e. this is a tag
* which is allowed to have different types, e.g. SMaxSampleType).
* Internally the data values are represented as double since a double can
* hold any of the TIFF tag types (yes, this should really be an abstract
* type tany_t for portability). The data is converted into the specified
* type in a temporary buffer and then handed off to the appropriate array
* writer.
*/
static int
TIFFWriteAnyArray(TIFF* tif,
TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
{
char buf[10 * sizeof(double)];
char* w = buf;
int i, status = 0;
if (n * TIFFDataWidth(type) > sizeof buf)
w = (char*) _TIFFmalloc(n * TIFFDataWidth(type));
switch (type) {
case TIFF_BYTE:
{ unsigned char* bp = (unsigned char*) w;
for (i = 0; i < n; i++)
bp[i] = (unsigned char) v[i];
dir->tdir_tag = tag;
dir->tdir_type = (short) type;
dir->tdir_count = n;
if (!TIFFWriteByteArray(tif, dir, (char*) bp))
goto out;
}
break;
case TIFF_SBYTE:
{ signed char* bp = (signed char*) w;
for (i = 0; i < n; i++)
bp[i] = (signed char) v[i];
dir->tdir_tag = tag;
dir->tdir_type = (short) type;
dir->tdir_count = n;
if (!TIFFWriteByteArray(tif, dir, (char*) bp))
goto out;
}
break;
case TIFF_SHORT:
{ uint16* bp = (uint16*) w;
for (i = 0; i < n; i++)
bp[i] = (uint16) v[i];
if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
goto out;
}
break;
case TIFF_SSHORT:
{ int16* bp = (int16*) w;
for (i = 0; i < n; i++)
bp[i] = (int16) v[i];
if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
goto out;
}
break;
case TIFF_LONG:
{ uint32* bp = (uint32*) w;
for (i = 0; i < n; i++)
bp[i] = (uint32) v[i];
if (!TIFFWriteLongArray(tif, type, tag, dir, n, bp))
goto out;
}
break;
case TIFF_SLONG:
{ int32* bp = (int32*) w;
for (i = 0; i < n; i++)
bp[i] = (int32) v[i];
if (!TIFFWriteLongArray(tif, type, tag, dir, n, (uint32*) bp))
goto out;
}
break;
case TIFF_FLOAT:
{ float* bp = (float*) w;
for (i = 0; i < n; i++)
bp[i] = (float) v[i];
if (!TIFFWriteFloatArray(tif, type, tag, dir, n, bp))
goto out;
}
break;
case TIFF_DOUBLE:
return (TIFFWriteDoubleArray(tif, type, tag, dir, n, v));
default:
/* TIFF_NOTYPE */
/* TIFF_ASCII */
/* TIFF_UNDEFINED */
/* TIFF_RATIONAL */
/* TIFF_SRATIONAL */
goto out;
}
status = 1;
out:
if (w != buf)
_TIFFfree(w);
return (status);
}
#ifdef COLORIMETRY_SUPPORT
static int
TIFFWriteTransferFunction(TIFF* tif, TIFFDirEntry* dir)
{
TIFFDirectory* td = &tif->tif_dir;
tsize_t n = (1L<<td->td_bitspersample) * sizeof (uint16);
uint16** tf = td->td_transferfunction;
int ncols;
/*
* Check if the table can be written as a single column,
* or if it must be written as 3 columns. Note that we
* write a 3-column tag if there are 2 samples/pixel and
* a single column of data won't suffice--hmm.
*/
switch (td->td_samplesperpixel - td->td_extrasamples) {
default: if (_TIFFmemcmp(tf[0], tf[2], n)) { ncols = 3; break; }
case 2: if (_TIFFmemcmp(tf[0], tf[1], n)) { ncols = 3; break; }
case 1: case 0: ncols = 1;
}
return (TIFFWriteShortTable(tif,
TIFFTAG_TRANSFERFUNCTION, dir, ncols, tf));
}
#endif
/*
* Write a contiguous directory item.
*/
static int
TIFFWriteData(TIFF* tif, TIFFDirEntry* dir, char* cp)
{
tsize_t cc;
if (tif->tif_flags & TIFF_SWAB) {
switch (dir->tdir_type) {
case TIFF_SHORT:
case TIFF_SSHORT:
TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
break;
case TIFF_LONG:
case TIFF_SLONG:
case TIFF_FLOAT:
TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
break;
case TIFF_RATIONAL:
case TIFF_SRATIONAL:
TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
break;
case TIFF_DOUBLE:
TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
break;
}
}
dir->tdir_offset = tif->tif_dataoff;
cc = dir->tdir_count * TIFFDataWidth(dir->tdir_type);
if (SeekOK(tif, dir->tdir_offset) &&
WriteOK(tif, cp, cc)) {
tif->tif_dataoff += (cc + 1) & ~1;
return (1);
}
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing data for field \"%s\"",
_TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
return (0);
}
/*
* Link the current directory into the
* directory chain for the file.
*/
static int
TIFFLinkDirectory(TIFF* tif)
{
static const char module[] = "TIFFLinkDirectory";
uint32 nextdir;
uint32 diroff;
tif->tif_diroff = (TIFFSeekFile(tif, (toff_t) 0, SEEK_END)+1) &~ 1;
diroff = (uint32) tif->tif_diroff;
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabLong(&diroff);
#if SUBIFD_SUPPORT
if (tif->tif_flags & TIFF_INSUBIFD) {
(void) TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET);
if (!WriteOK(tif, &diroff, sizeof (diroff))) {
TIFFErrorExt(tif->tif_clientdata, module,
"%s: Error writing SubIFD directory link",
tif->tif_name);
return (0);
}
/*
* Advance to the next SubIFD or, if this is
* the last one configured, revert back to the
* normal directory linkage.
*/
if (--tif->tif_nsubifd)
tif->tif_subifdoff += sizeof (diroff);
else
tif->tif_flags &= ~TIFF_INSUBIFD;
return (1);
}
#endif
if (tif->tif_header.tiff_diroff == 0) {
/*
* First directory, overwrite offset in header.
*/
tif->tif_header.tiff_diroff = (uint32) tif->tif_diroff;
#define HDROFF(f) ((toff_t) &(((TIFFHeader*) 0)->f))
(void) TIFFSeekFile(tif, HDROFF(tiff_diroff), SEEK_SET);
if (!WriteOK(tif, &diroff, sizeof (diroff))) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error writing TIFF header");
return (0);
}
return (1);
}
/*
* Not the first directory, search to the last and append.
*/
nextdir = tif->tif_header.tiff_diroff;
do {
uint16 dircount;
if (!SeekOK(tif, nextdir) ||
!ReadOK(tif, &dircount, sizeof (dircount))) {
TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory count");
return (0);
}
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabShort(&dircount);
(void) TIFFSeekFile(tif,
dircount * sizeof (TIFFDirEntry), SEEK_CUR);
if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
TIFFErrorExt(tif->tif_clientdata, module, "Error fetching directory link");
return (0);
}
if (tif->tif_flags & TIFF_SWAB)
TIFFSwabLong(&nextdir);
} while (nextdir != 0);
(void) TIFFSeekFile(tif, -(toff_t) sizeof (nextdir), SEEK_CUR);
if (!WriteOK(tif, &diroff, sizeof (diroff))) {
TIFFErrorExt(tif->tif_clientdata, module, "Error writing directory link");
return (0);
}
return (1);
}

View File

@ -0,0 +1,27 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = README ras2tif.c tif2ras.c

View File

@ -0,0 +1,385 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
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_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = contrib/ras
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLUT_CFLAGS = @GLUT_CFLAGS@
GLUT_LIBS = @GLUT_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAVE_CXX_FALSE = @HAVE_CXX_FALSE@
HAVE_CXX_TRUE = @HAVE_CXX_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_RPATH_FALSE = @HAVE_RPATH_FALSE@
HAVE_RPATH_TRUE = @HAVE_RPATH_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
LIBTIFF_VERSION = @LIBTIFF_VERSION@
LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
acx_pthread_config = @acx_pthread_config@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = README ras2tif.c tif2ras.c
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 contrib/ras/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/ras/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
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
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:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || 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-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
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 mostlyclean-libtool
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-libtool \
distclean distclean-generic distclean-libtool 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 \
mostlyclean-libtool pdf pdf-am ps ps-am 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:

View File

@ -0,0 +1,10 @@
Sun May 19 22:28:16 PDT 1991
These programs are from Patrick Naughton (naughton@wind.sun.com).
I've tried to update them to reflect changes to the library, but
I am unable to verify that they operate properly, because they
require the Sun pixrect library.
Please contact Patrick directly if you have questions/problems.
Sam

Some files were not shown because too many files have changed in this diff Show More