jasper-1.900.1/0000755000175000017500000000000010554237064012142 5ustar ernieerniejasper-1.900.1/src/0000755000175000017500000000000010554237065012732 5ustar ernieerniejasper-1.900.1/src/Makefile.in0000644000175000017500000004227110554237044015002 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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 = libjasper appl msvc all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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: jasper-1.900.1/src/msvc/0000755000175000017500000000000010554237065013702 5ustar ernieerniejasper-1.900.1/src/msvc/Makefile.in0000644000175000017500000003012010554237047015743 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/msvc DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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 \ jasper.dsw \ libjasper.dsp \ jasper.dsp \ jiv.dsp \ imgcmp.dsp \ imginfo.dsp all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/msvc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/msvc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 clean-local 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 \ clean-local 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 clean-local: rm -rf *Win32_Debug *Win32_Release rm -rf Release Debug rm -rf *.ncb *.opt *.plg # 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: jasper-1.900.1/src/msvc/jasper.dsw0000644000175000017500000000303510554235550015703 0ustar ernieernieMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "imgcmp"=".\imgcmp.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name libjasper End Project Dependency }}} ############################################################################### Project: "imginfo"=".\imginfo.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name libjasper End Project Dependency }}} ############################################################################### Project: "jasper"=".\jasper.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name libjasper End Project Dependency }}} ############################################################################### Project: "jiv"=".\jiv.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "libjasper"=".\libjasper.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### jasper-1.900.1/src/msvc/jasper.dsp0000644000175000017500000001032010554235550015667 0ustar ernieernie# Microsoft Developer Studio Project File - Name="jasper" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=jasper - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "jasper.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "jasper.mak" CFG="jasper - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "jasper - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "jasper - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "jasper - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Win32_Release" # PROP Intermediate_Dir "jasper___Win32_Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\libjasper\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /machine:I386 /libpath:"Win32_Release" !ELSEIF "$(CFG)" == "jasper - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "jasper___Win32_Debug" # PROP BASE Intermediate_Dir "jasper___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Win32_Debug" # PROP Intermediate_Dir "jasper___Win32_Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\libjasper\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Win32_Debug" !ENDIF # Begin Target # Name "jasper - Win32 Release" # Name "jasper - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\appl\jasper.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project jasper-1.900.1/src/msvc/imgcmp.dsp0000644000175000017500000001026610554235550015670 0ustar ernieernie# Microsoft Developer Studio Project File - Name="imgcmp" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=imgcmp - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "imgcmp.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "imgcmp.mak" CFG="imgcmp - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "imgcmp - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "imgcmp - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "imgcmp - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "imgcmp___Win32_Release" # PROP BASE Intermediate_Dir "imgcmp___Win32_Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Win32_Release" # PROP Intermediate_Dir "imgcmp___Win32_Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\libjasper\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /machine:I386 /libpath:"Win32_Release" !ELSEIF "$(CFG)" == "imgcmp - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "imgcmp___Win32_Debug" # PROP BASE Intermediate_Dir "imgcmp___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Win32_Debug" # PROP Intermediate_Dir "imgcmp___Win32_Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\libjasper\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Win32_Debug" !ENDIF # Begin Target # Name "imgcmp - Win32 Release" # Name "imgcmp - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\appl\imgcmp.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project jasper-1.900.1/src/msvc/imginfo.dsp0000644000175000017500000001040010554235550016032 0ustar ernieernie# Microsoft Developer Studio Project File - Name="imginfo" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=imginfo - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "imginfo.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "imginfo.mak" CFG="imginfo - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "imginfo - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "imginfo - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "imginfo - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "imginfo___Win32_Release" # PROP BASE Intermediate_Dir "imginfo___Win32_Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Win32_Release" # PROP Intermediate_Dir "imginfo___Win32_Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\libjasper\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /machine:I386 /libpath:"Win32_Release" !ELSEIF "$(CFG)" == "imginfo - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "imginfo___Win32_Debug" # PROP BASE Intermediate_Dir "imginfo___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Win32_Debug" # PROP Intermediate_Dir "imginfo___Win32_Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\libjasper\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Win32_Debug" !ENDIF # Begin Target # Name "imginfo - Win32 Release" # Name "imginfo - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\appl\imginfo.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project jasper-1.900.1/src/msvc/README0000644000175000017500000000017210554235550014557 0ustar ernieernieThis directory contains the workspace and project files necessary to build JasPer under Windows using MS Visual C Studio. jasper-1.900.1/src/msvc/libjasper.dsp0000644000175000017500000002247610554235550016375 0ustar ernieernie# Microsoft Developer Studio Project File - Name="libjasper" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=libjasper - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "libjasper.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libjasper.mak" CFG="libjasper - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libjasper - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "libjasper - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "libjasper - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Win32_Release" # PROP Intermediate_Dir "libjasper___Win32_Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\libjasper\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "JAS_WIN_MSVC_BUILD" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ELSEIF "$(CFG)" == "libjasper - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Win32_Debug" # PROP Intermediate_Dir "libjasper___Win32_Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\libjasper\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "JAS_WIN_MSVC_BUILD" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo !ENDIF # Begin Target # Name "libjasper - Win32 Release" # Name "libjasper - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\libjasper\bmp\bmp_cod.c # End Source File # Begin Source File SOURCE=..\libjasper\bmp\bmp_dec.c # End Source File # Begin Source File SOURCE=..\libjasper\bmp\bmp_enc.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_cm.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_debug.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_getopt.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_icc.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_iccdata.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_image.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_init.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_malloc.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_seq.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_stream.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_string.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_tmr.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_tvp.c # End Source File # Begin Source File SOURCE=..\libjasper\base\jas_version.c # End Source File # Begin Source File SOURCE=..\libjasper\jp2\jp2_cod.c # End Source File # Begin Source File SOURCE=..\libjasper\jp2\jp2_dec.c # End Source File # Begin Source File SOURCE=..\libjasper\jp2\jp2_enc.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_bs.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_cs.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_dec.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_enc.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_math.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mct.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mqcod.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mqdec.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mqenc.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_qmfb.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t1cod.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t1dec.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t1enc.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t2cod.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t2dec.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t2enc.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_tagtree.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_tsfb.c # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_util.c # End Source File # Begin Source File SOURCE=..\libjasper\jpg\jpg_dummy.c # End Source File # Begin Source File SOURCE=..\libjasper\jpg\jpg_val.c # End Source File # Begin Source File SOURCE=..\libjasper\mif\mif_cod.c # End Source File # Begin Source File SOURCE=..\libjasper\pgx\pgx_cod.c # End Source File # Begin Source File SOURCE=..\libjasper\pgx\pgx_dec.c # End Source File # Begin Source File SOURCE=..\libjasper\pgx\pgx_enc.c # End Source File # Begin Source File SOURCE=..\libjasper\pnm\pnm_cod.c # End Source File # Begin Source File SOURCE=..\libjasper\pnm\pnm_dec.c # End Source File # Begin Source File SOURCE=..\libjasper\pnm\pnm_enc.c # End Source File # Begin Source File SOURCE=..\libjasper\ras\ras_cod.c # End Source File # Begin Source File SOURCE=..\libjasper\ras\ras_dec.c # End Source File # Begin Source File SOURCE=..\libjasper\ras\ras_enc.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\libjasper\bmp\bmp_cod.h # End Source File # Begin Source File SOURCE=..\libjasper\include\jasper\jas_cm.h # End Source File # Begin Source File SOURCE=..\libjasper\include\jasper\jas_icc.h # End Source File # Begin Source File SOURCE=..\libjasper\include\jasper\jas_tmr.h # End Source File # Begin Source File SOURCE=..\libjasper\jp2\jp2_cod.h # End Source File # Begin Source File SOURCE=..\libjasper\jp2\jp2_dec.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_bs.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_cod.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_cs.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_dec.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_enc.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_fix.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_flt.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_math.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mct.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mqcod.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mqdec.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_mqenc.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_qmfb.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t1cod.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t1dec.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t1enc.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t2cod.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t2dec.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_t2enc.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_tagtree.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_tsfb.h # End Source File # Begin Source File SOURCE=..\libjasper\jpc\jpc_util.h # End Source File # Begin Source File SOURCE=..\libjasper\jpg\jpg_cod.h # End Source File # Begin Source File SOURCE=..\libjasper\mif\mif_cod.h # End Source File # Begin Source File SOURCE=..\libjasper\pgx\pgx_cod.h # End Source File # Begin Source File SOURCE=..\libjasper\pnm\pnm_cod.h # End Source File # Begin Source File SOURCE=..\libjasper\ras\ras_cod.h # End Source File # End Group # End Target # End Project jasper-1.900.1/src/msvc/jiv.dsp0000644000175000017500000001021010554235550015171 0ustar ernieernie# Microsoft Developer Studio Project File - Name="jiv" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=jiv - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "jiv.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "jiv.mak" CFG="jiv - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "jiv - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "jiv - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "jiv - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Win32_Release" # PROP Intermediate_Dir "jiv___Win32_Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\libjasper\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /machine:I386 /libpath:"Win32_Release" !ELSEIF "$(CFG)" == "jiv - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Win32_Debug" # PROP Intermediate_Dir "jiv___Win32_Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\libjasper\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "JAS_WIN_MSVC_BUILD" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjasper.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Win32_Debug" !ENDIF # Begin Target # Name "jiv - Win32 Release" # Name "jiv - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\appl\jiv.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project jasper-1.900.1/src/msvc/Makefile.am0000644000175000017500000000616210554235550015740 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ EXTRA_DIST = \ README \ jasper.dsw \ libjasper.dsp \ jasper.dsp \ jiv.dsp \ imgcmp.dsp \ imginfo.dsp clean-local: rm -rf *Win32_Debug *Win32_Release rm -rf Release Debug rm -rf *.ncb *.opt *.plg jasper-1.900.1/src/appl/0000755000175000017500000000000010554237065013666 5ustar ernieerniejasper-1.900.1/src/appl/Makefile.in0000644000175000017500000005373610554237045015747 0ustar ernieernie# 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@ # Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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@ bin_PROGRAMS = jasper$(EXEEXT) $(am__EXEEXT_2) imgcmp$(EXEEXT) \ imginfo$(EXEEXT) tmrdemo$(EXEEXT) EXTRA_PROGRAMS = $(am__EXEEXT_1) dummy$(EXEEXT) dummy2$(EXEEXT) subdir = src/appl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = @HAVE_OPENGL_FALSE@am__EXEEXT_1 = jiv$(EXEEXT) @HAVE_OPENGL_TRUE@am__EXEEXT_2 = jiv$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_dummy_OBJECTS = dummy.$(OBJEXT) dummy_OBJECTS = $(am_dummy_OBJECTS) am__DEPENDENCIES_1 = ../libjasper/libjasper.la dummy_DEPENDENCIES = $(am__DEPENDENCIES_1) am_dummy2_OBJECTS = dummy2.$(OBJEXT) dummy2_OBJECTS = $(am_dummy2_OBJECTS) dummy2_DEPENDENCIES = $(am__DEPENDENCIES_1) am_imgcmp_OBJECTS = imgcmp.$(OBJEXT) imgcmp_OBJECTS = $(am_imgcmp_OBJECTS) imgcmp_DEPENDENCIES = $(am__DEPENDENCIES_1) am_imginfo_OBJECTS = imginfo.$(OBJEXT) imginfo_OBJECTS = $(am_imginfo_OBJECTS) imginfo_DEPENDENCIES = $(am__DEPENDENCIES_1) am_jasper_OBJECTS = jasper.$(OBJEXT) jasper_OBJECTS = $(am_jasper_OBJECTS) jasper_DEPENDENCIES = $(am__DEPENDENCIES_1) am_jiv_OBJECTS = jiv.$(OBJEXT) jiv_OBJECTS = $(am_jiv_OBJECTS) am__DEPENDENCIES_2 = jiv_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_tmrdemo_OBJECTS = tmrdemo.$(OBJEXT) tmrdemo_OBJECTS = $(am_tmrdemo_OBJECTS) tmrdemo_DEPENDENCIES = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(dummy_SOURCES) $(dummy2_SOURCES) $(imgcmp_SOURCES) \ $(imginfo_SOURCES) $(jasper_SOURCES) $(jiv_SOURCES) \ $(tmrdemo_SOURCES) DIST_SOURCES = $(dummy_SOURCES) $(dummy2_SOURCES) $(imgcmp_SOURCES) \ $(imginfo_SOURCES) $(jasper_SOURCES) $(jiv_SOURCES) \ $(tmrdemo_SOURCES) man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) 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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ @HAVE_OPENGL_FALSE@BIN_JIV = @HAVE_OPENGL_TRUE@BIN_JIV = jiv @HAVE_OPENGL_FALSE@EXTRA_JIV = jiv @HAVE_OPENGL_TRUE@EXTRA_JIV = jasper_SOURCES = jasper.c imgcmp_SOURCES = imgcmp.c imginfo_SOURCES = imginfo.c dummy_SOURCES = dummy.c dummy2_SOURCES = dummy2.c tmrdemo_SOURCES = tmrdemo.c jiv_SOURCES = jiv.c man_MANS = imgcmp.1 imginfo.1 jasper.1 jiv.1 EXTRA_DIST = $(man_MANS) INCLUDES = -I$(top_srcdir)/src/libjasper/include MYLDFLAGS = ../libjasper/libjasper.la jasper_LDADD = $(MYLDFLAGS) imgcmp_LDADD = $(MYLDFLAGS) imginfo_LDADD = $(MYLDFLAGS) jiv_LDADD = $(MYLDFLAGS) $(OPENGL_LIBS) dummy_LDADD = $(MYLDFLAGS) dummy2_LDADD = $(MYLDFLAGS) tmrdemo_LDADD = $(MYLDFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/appl/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/appl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done dummy$(EXEEXT): $(dummy_OBJECTS) $(dummy_DEPENDENCIES) @rm -f dummy$(EXEEXT) $(LINK) $(dummy_LDFLAGS) $(dummy_OBJECTS) $(dummy_LDADD) $(LIBS) dummy2$(EXEEXT): $(dummy2_OBJECTS) $(dummy2_DEPENDENCIES) @rm -f dummy2$(EXEEXT) $(LINK) $(dummy2_LDFLAGS) $(dummy2_OBJECTS) $(dummy2_LDADD) $(LIBS) imgcmp$(EXEEXT): $(imgcmp_OBJECTS) $(imgcmp_DEPENDENCIES) @rm -f imgcmp$(EXEEXT) $(LINK) $(imgcmp_LDFLAGS) $(imgcmp_OBJECTS) $(imgcmp_LDADD) $(LIBS) imginfo$(EXEEXT): $(imginfo_OBJECTS) $(imginfo_DEPENDENCIES) @rm -f imginfo$(EXEEXT) $(LINK) $(imginfo_LDFLAGS) $(imginfo_OBJECTS) $(imginfo_LDADD) $(LIBS) jasper$(EXEEXT): $(jasper_OBJECTS) $(jasper_DEPENDENCIES) @rm -f jasper$(EXEEXT) $(LINK) $(jasper_LDFLAGS) $(jasper_OBJECTS) $(jasper_LDADD) $(LIBS) jiv$(EXEEXT): $(jiv_OBJECTS) $(jiv_DEPENDENCIES) @rm -f jiv$(EXEEXT) $(LINK) $(jiv_LDFLAGS) $(jiv_OBJECTS) $(jiv_LDADD) $(LIBS) tmrdemo$(EXEEXT): $(tmrdemo_OBJECTS) $(tmrdemo_DEPENDENCIES) @rm -f tmrdemo$(EXEEXT) $(LINK) $(tmrdemo_LDFLAGS) $(tmrdemo_OBJECTS) $(tmrdemo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imgcmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imginfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jasper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmrdemo.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: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ 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: $(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) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done 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-binPROGRAMS clean-generic clean-libtool 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-man install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: install-man1 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-binPROGRAMS uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 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-binPROGRAMS uninstall-info-am \ uninstall-man uninstall-man1 # 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: jasper-1.900.1/src/appl/jiv.c0000644000175000017500000006374110554235554014636 0ustar ernieernie/* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes \******************************************************************************/ #include #include #include #include /******************************************************************************\ * \******************************************************************************/ #define MAXCMPTS 256 #define BIGPANAMOUNT 0.90 #define SMALLPANAMOUNT 0.05 #define BIGZOOMAMOUNT 2.0 #define SMALLZOOMAMOUNT 1.41421356237310 #define min(x, y) (((x) < (y)) ? (x) : (y)) #define max(x, y) (((x) > (y)) ? (x) : (y)) typedef struct { /* The number of image files to view. */ int numfiles; /* The names of the image files. */ char **filenames; /* The title for the window. */ char *title; /* The time to wait before advancing to the next image (in ms). */ int tmout; /* Loop indefinitely over all images. */ int loop; int verbose; } cmdopts_t; typedef struct { int width; int height; GLshort *data; } pixmap_t; typedef struct { /* The index of the current image file. */ int filenum; /* The image. */ jas_image_t *image; jas_image_t *altimage; float botleftx; float botlefty; float toprightx; float toprighty; int viewportwidth; int viewportheight; /* The image for display. */ pixmap_t vp; /* The active timer ID. */ int activetmid; /* The next available timer ID. */ int nexttmid; int monomode; int cmptno; } gs_t; /******************************************************************************\ * \******************************************************************************/ static void displayfunc(void); static void reshapefunc(int w, int h); static void keyboardfunc(unsigned char key, int x, int y); static void specialfunc(int key, int x, int y); static void timerfunc(int value); static void usage(void); static void nextimage(void); static void previmage(void); static void nextcmpt(void); static void prevcmpt(void); static int loadimage(void); static void unloadimage(void); static int jas_image_render2(jas_image_t *image, int cmptno, float vtlx, float vtly, float vsx, float vsy, int vw, int vh, GLshort *vdata); static int jas_image_render(jas_image_t *image, float vtlx, float vtly, float vsx, float vsy, int vw, int vh, GLshort *vdata); static void dumpstate(void); static int pixmap_resize(pixmap_t *p, int w, int h); static void pixmap_clear(pixmap_t *p); static void cmdinfo(void); static void cleanupandexit(int); static void init(void); static void zoom(float sx, float sy); static void pan(float dx, float dy); static void panzoom(float dx, float dy, float sx, float sy); static void render(void); /******************************************************************************\ * \******************************************************************************/ jas_opt_t opts[] = { {'V', "version", 0}, {'v', "v", 0}, {'h', "help", 0}, {'w', "wait", JAS_OPT_HASARG}, {'l', "loop", 0}, {'t', "title", JAS_OPT_HASARG}, {-1, 0, 0} }; char *cmdname = 0; cmdopts_t cmdopts; gs_t gs; jas_stream_t *streamin = 0; /******************************************************************************\ * \******************************************************************************/ int main(int argc, char **argv) { int c; init(); /* Determine the base name of this command. */ if ((cmdname = strrchr(argv[0], '/'))) { ++cmdname; } else { cmdname = argv[0]; } /* Initialize the JasPer library. */ if (jas_init()) { abort(); } glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE); glutCreateWindow(cmdname); glutReshapeFunc(reshapefunc); glutDisplayFunc(displayfunc); glutSpecialFunc(specialfunc); glutKeyboardFunc(keyboardfunc); cmdopts.numfiles = 0; cmdopts.filenames = 0; cmdopts.title = 0; cmdopts.tmout = 0; cmdopts.loop = 0; cmdopts.verbose = 0; while ((c = jas_getopt(argc, argv, opts)) != EOF) { switch (c) { case 'w': cmdopts.tmout = atof(jas_optarg) * 1000; break; case 'l': cmdopts.loop = 1; break; case 't': cmdopts.title = jas_optarg; break; case 'v': cmdopts.verbose = 1; break; case 'V': printf("%s\n", JAS_VERSION); fprintf(stderr, "libjasper %s\n", jas_getversion()); cleanupandexit(EXIT_SUCCESS); break; default: case 'h': usage(); break; } } if (jas_optind < argc) { /* The images are to be read from one or more explicitly named files. */ cmdopts.numfiles = argc - jas_optind; cmdopts.filenames = &argv[jas_optind]; } else { /* The images are to be read from standard input. */ static char *null = 0; cmdopts.filenames = &null; cmdopts.numfiles = 1; } streamin = jas_stream_fdopen(0, "rb"); /* Load the next image. */ nextimage(); /* Start the GLUT main event handler loop. */ glutMainLoop(); return EXIT_SUCCESS; } /******************************************************************************\ * \******************************************************************************/ static void cmdinfo() { fprintf(stderr, "JasPer Image Viewer (Version %s).\n", JAS_VERSION); fprintf(stderr, "Copyright (c) 2002-2003 Michael David Adams.\n" "All rights reserved.\n"); fprintf(stderr, "%s\n", JAS_NOTES); } static char *helpinfo[] = { "The following options are supported:\n", " --help Print this help information and exit.\n", " --version Print version information and exit.\n", " --loop Loop indefinitely through images.\n", " --wait N Advance to next image after N seconds.\n", 0 }; static void usage() { char *s; int i; cmdinfo(); fprintf(stderr, "usage: %s [options] [file1 file2 ...]\n", cmdname); for (i = 0, s = helpinfo[i]; s; ++i, s = helpinfo[i]) { fprintf(stderr, "%s", s); } cleanupandexit(EXIT_FAILURE); } /******************************************************************************\ * GLUT Callback Functions \******************************************************************************/ /* Display callback function. */ static void displayfunc() { float w; float h; int regbotleftx; int regbotlefty; int regtoprightx; int regtoprighty; int regtoprightwidth; int regtoprightheight; int regwidth; int regheight; float x; float y; float xx; float yy; if (cmdopts.verbose) { fprintf(stderr, "displayfunc()\n"); } regbotleftx = max(ceil(gs.botleftx), 0); regbotlefty = max(ceil(gs.botlefty), 0); regtoprightx = min(gs.vp.width, floor(gs.toprightx)); regtoprighty = min(gs.vp.height, floor(gs.toprighty)); regwidth = regtoprightx - regbotleftx; regheight = regtoprighty - regbotlefty; w = gs.toprightx - gs.botleftx; h = gs.toprighty - gs.botlefty; x = (regbotleftx - gs.botleftx) / w; y = (regbotlefty - gs.botlefty) / h; xx = (regtoprightx - gs.botleftx) / w; yy = (regtoprighty - gs.botlefty) / h; assert(regwidth > 0); assert(regheight > 0); assert(abs(((double) regheight / regwidth) - ((double) gs.viewportheight / gs.viewportwidth)) < 1e-5); glClear(GL_COLOR_BUFFER_BIT); glPixelStorei(GL_UNPACK_ALIGNMENT, sizeof(GLshort)); glPixelStorei(GL_UNPACK_ROW_LENGTH, gs.vp.width); glPixelStorei(GL_UNPACK_SKIP_PIXELS, regbotleftx); glPixelStorei(GL_UNPACK_SKIP_ROWS, regbotlefty); glRasterPos2f(x * gs.viewportwidth, y * gs.viewportheight); glPixelZoom((xx - x) * ((double) gs.viewportwidth) / regwidth, (yy - y) * ((double) gs.viewportheight) / regheight); glDrawPixels(regwidth, regheight, GL_RGBA, GL_UNSIGNED_SHORT, gs.vp.data); glFlush(); glutSwapBuffers(); } /* Reshape callback function. */ static void reshapefunc(int w, int h) { if (cmdopts.verbose) { fprintf(stderr, "reshapefunc(%d, %d)\n", w, h); dumpstate(); } glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, w, 0, h); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0, 0, 0); glRasterPos2i(0, 0); zoom((double) gs.viewportwidth / w, (double) gs.viewportheight / h); gs.viewportwidth = w; gs.viewportheight = h; } /* Keyboard callback function. */ static void keyboardfunc(unsigned char key, int x, int y) { if (cmdopts.verbose) { fprintf(stderr, "keyboardfunc(%d, %d, %d)\n", key, x, y); } switch (key) { case ' ': nextimage(); break; case '\b': previmage(); break; case '>': zoom(BIGZOOMAMOUNT, BIGZOOMAMOUNT); glutPostRedisplay(); break; case '.': zoom(SMALLZOOMAMOUNT, SMALLZOOMAMOUNT); glutPostRedisplay(); break; case '<': zoom(1.0 / BIGZOOMAMOUNT, 1.0 / BIGZOOMAMOUNT); glutPostRedisplay(); break; case ',': zoom(1.0 / SMALLZOOMAMOUNT, 1.0 / SMALLZOOMAMOUNT); glutPostRedisplay(); break; case 'c': nextcmpt(); break; case 'C': prevcmpt(); break; case 'h': fprintf(stderr, "h help\n"); fprintf(stderr, "> zoom in (large)\n"); fprintf(stderr, ", zoom in (small)\n"); fprintf(stderr, "< zoom out (large)\n"); fprintf(stderr, ". zoom out (small)\n"); fprintf(stderr, "down arrow pan down\n"); fprintf(stderr, "up arrow pan up\n"); fprintf(stderr, "left arrow pan left\n"); fprintf(stderr, "right arrow pan right\n"); fprintf(stderr, "space next image\n"); fprintf(stderr, "backspace previous image\n"); fprintf(stderr, "q quit\n"); break; case 'q': cleanupandexit(EXIT_SUCCESS); break; } } /* Special keyboard callback function. */ static void specialfunc(int key, int x, int y) { if (cmdopts.verbose) { fprintf(stderr, "specialfunc(%d, %d, %d)\n", key, x, y); } switch (key) { case GLUT_KEY_UP: { float panamount; panamount = (glutGetModifiers() & GLUT_ACTIVE_SHIFT) ? BIGPANAMOUNT : SMALLPANAMOUNT; pan(0.0, panamount * (gs.toprighty - gs.botlefty)); glutPostRedisplay(); } break; case GLUT_KEY_DOWN: { float panamount; panamount = (glutGetModifiers() & GLUT_ACTIVE_SHIFT) ? BIGPANAMOUNT : SMALLPANAMOUNT; pan(0.0, -panamount * (gs.toprighty - gs.botlefty)); glutPostRedisplay(); } break; case GLUT_KEY_LEFT: { float panamount; panamount = (glutGetModifiers() & GLUT_ACTIVE_SHIFT) ? BIGPANAMOUNT : SMALLPANAMOUNT; pan(-panamount * (gs.toprightx - gs.botleftx), 0.0); glutPostRedisplay(); } break; case GLUT_KEY_RIGHT: { float panamount; panamount = (glutGetModifiers() & GLUT_ACTIVE_SHIFT) ? BIGPANAMOUNT : SMALLPANAMOUNT; pan(panamount * (gs.toprightx - gs.botleftx), 0.0); glutPostRedisplay(); } break; default: break; } } /* Timer callback function. */ static void timerfunc(int value) { if (cmdopts.verbose) { fprintf(stderr, "timerfunc(%d)\n", value); } if (value == gs.activetmid) { nextimage(); } } /******************************************************************************\ * \******************************************************************************/ static void zoom(float sx, float sy) { panzoom(0, 0, sx, sy); } static void pan(float dx, float dy) { panzoom(dx, dy, 1.0, 1.0); } static void panzoom(float dx, float dy, float sx, float sy) { float w; float h; float cx; float cy; int reginh; int reginv; reginh = (gs.botleftx >= 0 && gs.toprightx <= gs.vp.width); reginv = (gs.botlefty >= 0 && gs.toprighty <= gs.vp.height); if (cmdopts.verbose) { fprintf(stderr, "start of panzoom\n"); dumpstate(); fprintf(stderr, "reginh=%d reginv=%d\n", reginh, reginv); } if (dx || dy) { gs.botleftx += dx; gs.botlefty += dy; gs.toprightx += dx; gs.toprighty += dy; } if (sx != 1.0 || sy != 1.0) { cx = (gs.botleftx + gs.toprightx) / 2.0; cy = (gs.botlefty + gs.toprighty) / 2.0; w = gs.toprightx - gs.botleftx; h = gs.toprighty - gs.botlefty; gs.botleftx = cx - 0.5 * w / sx; gs.botlefty = cy - 0.5 * h / sy; gs.toprightx = cx + 0.5 * w / sx; gs.toprighty = cy + 0.5 * h / sy; } if (reginh) { if (gs.botleftx < 0) { dx = -gs.botleftx; gs.botleftx += dx; gs.toprightx += dx; } else if (gs.toprightx > gs.vp.width) { dx = gs.vp.width - gs.toprightx; gs.botleftx += dx; gs.toprightx += dx; } } if (gs.botleftx < 0 || gs.toprightx > gs.vp.width) { float w; w = gs.toprightx - gs.botleftx; gs.botleftx = 0.5 * gs.vp.width - 0.5 * w; gs.toprightx = 0.5 * gs.vp.width + 0.5 * w; } if (reginv) { if (gs.botlefty < 0) { dy = -gs.botlefty; gs.botlefty += dy; gs.toprighty += dy; } else if (gs.toprighty > gs.vp.height) { dy = gs.vp.height - gs.toprighty; gs.botlefty += dy; gs.toprighty += dy; } } if (gs.botlefty < 0 || gs.toprighty > gs.vp.height) { float h; h = gs.toprighty - gs.botlefty; gs.botlefty = 0.5 * gs.vp.height - 0.5 * h; gs.toprighty = 0.5 * gs.vp.height + 0.5 * h; } if (cmdopts.verbose) { fprintf(stderr, "end of panzoom\n"); dumpstate(); } } static void nextcmpt() { if (gs.monomode) { if (gs.cmptno == jas_image_numcmpts(gs.image) - 1) { if (gs.altimage) { gs.monomode = 0; } else { gs.cmptno = 0; } } else { ++gs.cmptno; } } else { gs.monomode = 1; gs.cmptno = 0; } render(); glutPostRedisplay(); } static void prevcmpt() { if (gs.monomode) { if (!gs.cmptno) { gs.monomode = 0; } else { --gs.cmptno; } } else { gs.monomode = 1; gs.cmptno = jas_image_numcmpts(gs.image) - 1; } render(); glutPostRedisplay(); } static void nextimage() { int n; unloadimage(); for (n = cmdopts.numfiles; n > 0; --n) { ++gs.filenum; if (gs.filenum >= cmdopts.numfiles) { if (cmdopts.loop) { gs.filenum = 0; } else { cleanupandexit(EXIT_SUCCESS); } } if (!loadimage()) { return; } fprintf(stderr, "cannot load image\n"); } cleanupandexit(EXIT_SUCCESS); } static void previmage() { int n; unloadimage(); for (n = cmdopts.numfiles; n > 0; --n) { --gs.filenum; if (gs.filenum < 0) { if (cmdopts.loop) { gs.filenum = cmdopts.numfiles - 1; } else { cleanupandexit(EXIT_SUCCESS); } } if (!loadimage()) { return; } } cleanupandexit(EXIT_SUCCESS); } static int loadimage() { int reshapeflag; jas_stream_t *in; int scrnwidth; int scrnheight; int vh; int vw; char *pathname; jas_cmprof_t *outprof; assert(!gs.image); assert(!gs.altimage); gs.image = 0; gs.altimage = 0; pathname = cmdopts.filenames[gs.filenum]; if (pathname && pathname[0] != '\0') { if (cmdopts.verbose) { fprintf(stderr, "opening file %s\n", pathname); } /* The input image is to be read from a file. */ if (!(in = jas_stream_fopen(pathname, "rb"))) { fprintf(stderr, "error: cannot open file %s\n", pathname); goto error; } } else { /* The input image is to be read from standard input. */ in = streamin; } if (cmdopts.verbose) { fprintf(stderr, "decoding image\n"); } /* Get the input image data. */ if (!(gs.image = jas_image_decode(in, -1, 0))) { fprintf(stderr, "error: cannot load image data\n"); goto error; } /* Close the input stream. */ if (in != streamin) { jas_stream_close(in); } if (cmdopts.verbose) { fprintf(stderr, "creating color profile\n"); } if (!(outprof = jas_cmprof_createfromclrspc(JAS_CLRSPC_SRGB))) goto error; if (!(gs.altimage = jas_image_chclrspc(gs.image, outprof, JAS_CMXFORM_INTENT_PER))) goto error; vw = jas_image_width(gs.image); vh = jas_image_height(gs.image); gs.botleftx = jas_image_tlx(gs.image); gs.botlefty = jas_image_tly(gs.image); gs.toprightx = jas_image_brx(gs.image); gs.toprighty = jas_image_bry(gs.image); if (gs.altimage) { gs.monomode = 0; } else { gs.monomode = 1; gs.cmptno = 0; } if (cmdopts.verbose) { fprintf(stderr, "num of components %d\n", jas_image_numcmpts(gs.image)); fprintf(stderr, "dimensions %d %d\n", jas_image_width(gs.image), jas_image_height(gs.image)); } gs.viewportwidth = vw; gs.viewportheight = vh; pixmap_resize(&gs.vp, vw, vh); if (cmdopts.verbose) { fprintf(stderr, "preparing image for viewing\n"); } render(); if (cmdopts.verbose) { fprintf(stderr, "done preparing image for viewing\n"); } if (vw != glutGet(GLUT_WINDOW_WIDTH) || vh != glutGet(GLUT_WINDOW_HEIGHT)) { glutReshapeWindow(vw, vh); } if (cmdopts.title) { glutSetWindowTitle(cmdopts.title); } else { glutSetWindowTitle((pathname && pathname[0] != '\0') ? pathname : "stdin"); } /* If we reshaped the window, GLUT will automatically invoke both the reshape and display callback (in this order). Therefore, we only need to explicitly force the display callback to be invoked if the window was not reshaped. */ glutPostRedisplay(); if (cmdopts.tmout != 0) { glutTimerFunc(cmdopts.tmout, timerfunc, gs.nexttmid); gs.activetmid = gs.nexttmid; ++gs.nexttmid; } return 0; error: unloadimage(); return -1; } static void unloadimage() { if (gs.image) { jas_image_destroy(gs.image); gs.image = 0; } if (gs.altimage) { jas_image_destroy(gs.altimage); gs.altimage = 0; } } /******************************************************************************\ * \******************************************************************************/ static void pixmap_clear(pixmap_t *p) { memset(p->data, 0, 4 * p->width * p->height * sizeof(GLshort)); } static int pixmap_resize(pixmap_t *p, int w, int h) { p->width = w; p->height = h; if (!(p->data = realloc(p->data, w * h * 4 * sizeof(GLshort)))) { return -1; } return 0; } static void dumpstate() { printf("blx=%f bly=%f trx=%f try=%f\n", gs.botleftx, gs.botlefty, gs.toprightx, gs.toprighty); } #define vctocc(i, co, cs, vo, vs) \ (((vo) + (i) * (vs) - (co)) / (cs)) static int jas_image_render(jas_image_t *image, float vtlx, float vtly, float vsx, float vsy, int vw, int vh, GLshort *vdata) { int i; int j; int k; int x; int y; int v[3]; GLshort *vdatap; int cmptlut[3]; int width; int height; int hs; int vs; int tlx; int tly; if ((cmptlut[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R))) < 0 || (cmptlut[1] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G))) < 0 || (cmptlut[2] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B))) < 0) goto error; width = jas_image_cmptwidth(image, cmptlut[0]); height = jas_image_cmptheight(image, cmptlut[0]); tlx = jas_image_cmpttlx(image, cmptlut[0]); tly = jas_image_cmpttly(image, cmptlut[0]); vs = jas_image_cmptvstep(image, cmptlut[0]); hs = jas_image_cmpthstep(image, cmptlut[0]); for (i = 1; i < 3; ++i) { if (jas_image_cmptwidth(image, cmptlut[i]) != width || jas_image_cmptheight(image, cmptlut[i]) != height) goto error; } for (i = 0; i < vh; ++i) { vdatap = &vdata[(vh - 1 - i) * (4 * vw)]; for (j = 0; j < vw; ++j) { x = vctocc(j, tlx, hs, vtlx, vsx); y = vctocc(i, tly, vs, vtly, vsy); if (x >= 0 && x < width && y >= 0 && y < height) { for (k = 0; k < 3; ++k) { v[k] = jas_image_readcmptsample(image, cmptlut[k], x, y); v[k] <<= 16 - jas_image_cmptprec(image, cmptlut[k]); if (v[k] < 0) { v[k] = 0; } else if (v[k] > 65535) { v[k] = 65535; } } } else { v[0] = 0; v[1] = 0; v[2] = 0; } *vdatap++ = v[0]; *vdatap++ = v[1]; *vdatap++ = v[2]; *vdatap++ = 0; } } return 0; error: return -1; } static int jas_image_render2(jas_image_t *image, int cmptno, float vtlx, float vtly, float vsx, float vsy, int vw, int vh, GLshort *vdata) { int i; int j; int x; int y; int v; GLshort *vdatap; if (cmptno < 0 || cmptno >= image->numcmpts_) { fprintf(stderr, "bad parameter\n"); goto error; } for (i = 0; i < vh; ++i) { vdatap = &vdata[(vh - 1 - i) * (4 * vw)]; for (j = 0; j < vw; ++j) { x = vctocc(j, jas_image_cmpttlx(image, cmptno), jas_image_cmpthstep(image, cmptno), vtlx, vsx); y = vctocc(i, jas_image_cmpttly(image, cmptno), jas_image_cmptvstep(image, cmptno), vtly, vsy); v = (x >= 0 && x < jas_image_cmptwidth(image, cmptno) && y >=0 && y < jas_image_cmptheight(image, cmptno)) ? jas_image_readcmptsample(image, cmptno, x, y) : 0; v <<= 16 - jas_image_cmptprec(image, cmptno); if (v < 0) { v = 0; } else if (v > 65535) { v = 65535; } *vdatap++ = v; *vdatap++ = v; *vdatap++ = v; *vdatap++ = 0; } } return 0; error: return -1; } static void render() { float vtlx; float vtly; vtlx = gs.botleftx; vtly = gs.toprighty; if (cmdopts.verbose) { // fprintf(stderr, "vtlx=%f, vtly=%f, vsx=%f, vsy=%f\n", // vtlx, vtly, gs.sx, gs.sy); } if (gs.monomode) { if (cmdopts.verbose) { fprintf(stderr, "component %d\n", gs.cmptno); } jas_image_render2(gs.image, gs.cmptno, 0.0, 0.0, 1.0, 1.0, gs.vp.width, gs.vp.height, gs.vp.data); } else { if (cmdopts.verbose) { fprintf(stderr, "color\n"); } jas_image_render(gs.altimage, 0.0, 0.0, 1.0, 1.0, gs.vp.width, gs.vp.height, gs.vp.data); } } #if 0 #define vctocc(i, co, cs, vo, vs) \ (((vo) + (i) * (vs) - (co)) / (cs)) static void drawview(jas_image_t *image, float vtlx, float vtly, float sx, float sy, pixmap_t *p) { int i; int j; int k; int red; int grn; int blu; int lum; GLshort *datap; int x; int y; int *cmptlut; int numcmpts; int v[4]; int u[4]; int color; cmptlut = gs.cmptlut; switch (jas_image_colorspace(gs.image)) { case JAS_IMAGE_CS_RGB: case JAS_IMAGE_CS_YCBCR: color = 1; numcmpts = 3; break; case JAS_IMAGE_CS_GRAY: default: numcmpts = 1; color = 0; break; } for (i = 0; i < p->height; ++i) { datap = &p->data[(p->height - 1 - i) * (4 * p->width)]; for (j = 0; j < p->width; ++j) { if (!gs.monomode && color) { for (k = 0; k < numcmpts; ++k) { x = vctocc(j, jas_image_cmpttlx(gs.image, cmptlut[k]), jas_image_cmpthstep(gs.image, cmptlut[k]), vtlx, sx); y = vctocc(i, jas_image_cmpttly(gs.image, cmptlut[k]), jas_image_cmptvstep(gs.image, cmptlut[k]), vtly, sy); v[k] = (x >= 0 && x < jas_image_cmptwidth(gs.image, cmptlut[k]) && y >=0 && y < jas_image_cmptheight(gs.image, cmptlut[k])) ? jas_matrix_get(gs.cmpts[cmptlut[k]], y, x) : 0; v[k] <<= 16 - jas_image_cmptprec(gs.image, cmptlut[k]); } switch (jas_image_colorspace(gs.image)) { case JAS_IMAGE_CS_RGB: break; case JAS_IMAGE_CS_YCBCR: u[0] = (1/1.772) * (v[0] + 1.402 * v[2]); u[1] = (1/1.772) * (v[0] - 0.34413 * v[1] - 0.71414 * v[2]); u[2] = (1/1.772) * (v[0] + 1.772 * v[1]); v[0] = u[0]; v[1] = u[1]; v[2] = u[2]; break; } } else { x = vctocc(j, jas_image_cmpttlx(gs.image, gs.cmptno), jas_image_cmpthstep(gs.image, gs.cmptno), vtlx, sx); y = vctocc(i, jas_image_cmpttly(gs.image, gs.cmptno), jas_image_cmptvstep(gs.image, gs.cmptno), vtly, sy); v[0] = (x >= 0 && x < jas_image_cmptwidth(gs.image, gs.cmptno) && y >=0 && y < jas_image_cmptheight(gs.image, gs.cmptno)) ? jas_matrix_get(gs.cmpts[gs.cmptno], y, x) : 0; v[0] <<= 16 - jas_image_cmptprec(gs.image, gs.cmptno); v[1] = v[0]; v[2] = v[0]; v[3] = 0; } for (k = 0; k < 3; ++k) { if (v[k] < 0) { v[k] = 0; } else if (v[k] > 65535) { v[k] = 65535; } } *datap++ = v[0]; *datap++ = v[1]; *datap++ = v[2]; *datap++ = 0; } } } #endif static void cleanupandexit(int status) { unloadimage(); exit(status); } static void init() { gs.filenum = -1; gs.image = 0; gs.altimage = 0; gs.nexttmid = 0; gs.vp.width = 0; gs.vp.height = 0; gs.vp.data = 0; gs.viewportwidth = -1; gs.viewportheight = -1; } jasper-1.900.1/src/appl/imginfo.c0000644000175000017500000001504410554235554015467 0ustar ernieernie/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Image Information Program * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include #include /******************************************************************************\ * \******************************************************************************/ typedef enum { OPT_HELP, OPT_VERSION, OPT_VERBOSE, OPT_INFILE } optid_t; /******************************************************************************\ * \******************************************************************************/ static void usage(void); static void cmdinfo(void); /******************************************************************************\ * \******************************************************************************/ static jas_opt_t opts[] = { {OPT_HELP, "help", 0}, {OPT_VERSION, "version", 0}, {OPT_VERBOSE, "verbose", 0}, {OPT_INFILE, "f", JAS_OPT_HASARG}, {-1, 0, 0} }; static char *cmdname = 0; /******************************************************************************\ * Main program. \******************************************************************************/ int main(int argc, char **argv) { int fmtid; int id; char *infile; jas_stream_t *instream; jas_image_t *image; int width; int height; int depth; int numcmpts; int verbose; char *fmtname; if (jas_init()) { abort(); } cmdname = argv[0]; infile = 0; verbose = 0; /* Parse the command line options. */ while ((id = jas_getopt(argc, argv, opts)) >= 0) { switch (id) { case OPT_VERBOSE: verbose = 1; break; case OPT_VERSION: printf("%s\n", JAS_VERSION); exit(EXIT_SUCCESS); break; case OPT_INFILE: infile = jas_optarg; break; case OPT_HELP: default: usage(); break; } } /* Open the image file. */ if (infile) { /* The image is to be read from a file. */ if (!(instream = jas_stream_fopen(infile, "rb"))) { fprintf(stderr, "cannot open input image file %s\n", infile); exit(EXIT_FAILURE); } } else { /* The image is to be read from standard input. */ if (!(instream = jas_stream_fdopen(0, "rb"))) { fprintf(stderr, "cannot open standard input\n"); exit(EXIT_FAILURE); } } if ((fmtid = jas_image_getfmt(instream)) < 0) { fprintf(stderr, "unknown image format\n"); } /* Decode the image. */ if (!(image = jas_image_decode(instream, fmtid, 0))) { fprintf(stderr, "cannot load image\n"); return EXIT_FAILURE; } /* Close the image file. */ jas_stream_close(instream); numcmpts = jas_image_numcmpts(image); width = jas_image_cmptwidth(image, 0); height = jas_image_cmptheight(image, 0); depth = jas_image_cmptprec(image, 0); if (!(fmtname = jas_image_fmttostr(fmtid))) { abort(); } printf("%s %d %d %d %d %ld\n", fmtname, numcmpts, width, height, depth, (long) jas_image_rawsize(image)); jas_image_destroy(image); jas_image_clearfmts(); return EXIT_SUCCESS; } /******************************************************************************\ * \******************************************************************************/ static void cmdinfo() { fprintf(stderr, "Image Information Utility (Version %s).\n", JAS_VERSION); fprintf(stderr, "Copyright (c) 2001 Michael David Adams.\n" "All rights reserved.\n" ); } static void usage() { cmdinfo(); fprintf(stderr, "usage:\n"); fprintf(stderr,"%s ", cmdname); fprintf(stderr, "[-f image_file]\n"); exit(EXIT_FAILURE); } jasper-1.900.1/src/appl/dummy2.c0000644000175000017500000000211110554235554015243 0ustar ernieernie#include #include #include #define FAILED 2 int main(int argc, char **argv) { char *refpath; FILE *reffile; char *othpath; FILE *othfile; int c; jas_seq2d_t *x; jas_seq2d_t *y; refpath = 0; othpath = 0; while ((c = getopt(argc, argv, "f:F:")) != EOF) { switch (c) { case 'f': refpath = optarg; break; case 'F': othpath = optarg; break; } } if (!refpath || !othpath) { fprintf(stderr, "usage: %s -f reffile -F othfile\n", argv[0]); exit(FAILED); } if (!(reffile = fopen(refpath, "r"))) { fprintf(stderr, "cannot open %s\n", refpath); exit(FAILED); } if (!(othfile = fopen(othpath, "r"))) { fprintf(stderr, "cannot open %s\n", othpath); exit(FAILED); } if (!(x = jas_seq2d_input(reffile))) { fprintf(stderr, "cannot input reference\n"); exit(FAILED); } if (!(y = jas_seq2d_input(othfile))) { fprintf(stderr, "cannot input other\n"); exit(FAILED); } if (!jas_matrix_cmp(x, y)) { fprintf(stderr, "equal\n"); exit(0); } else { fprintf(stderr, "not equal\n"); exit(1); } exit(FAILED); } jasper-1.900.1/src/appl/imginfo.10000644000175000017500000000077310554235554015410 0ustar ernieernie.TH imginfo 1 "20 June 2004" "Version 1.701.0" "JasPer Manual" .SH NAME imginfo \- Image information utility .SH SYNOPSIS .B imginfo .RI [ options ] .SH DESCRIPTION The .B imginfo command displays information about an image. Please use the \-\-help command line switch and the JasPer Software Reference Manual for more information. .SH SEE ALSO .IR jasper (1) .SH AUTHOR Michael D. Adams This manpage was initially written by Roland Stigge for the Debian Project. jasper-1.900.1/src/appl/tmrdemo.c0000644000175000017500000000162610554235554015507 0ustar ernieernie#include int main(int argc, char **argv) { int i; jas_tmr_t tmr; jas_tmr_t dummytmr; double t; int numiters; if (argc < 2) { fprintf(stderr, "bad usage :P\n"); exit(1); } numiters = atoi(argv[1]); jas_tmr_start(&tmr); for (i = numiters; i > 0; --i) { jas_tmr_start(&dummytmr); } jas_tmr_stop(&tmr); t = jas_tmr_get(&tmr); t /= numiters; printf("jas_tmr_start %.3f us\n", t * 1e6); jas_tmr_start(&tmr); for (i = numiters; i > 0; --i) { jas_tmr_stop(&dummytmr); } jas_tmr_stop(&tmr); t = jas_tmr_get(&tmr); t /= numiters; printf("jas_tmr_stop %.3f us\n", t * 1e6); t = 0; for (i = numiters; i > 0; --i) { jas_tmr_start(&tmr); jas_tmr_stop(&tmr); t += jas_tmr_get(&tmr); } t /= numiters; printf("zero time %.3f us\n", t * 1e6); jas_tmr_start(&tmr); sleep(1); jas_tmr_stop(&tmr); t = jas_tmr_get(&tmr); printf("time delay %.8f s\n", t); exit(0); } jasper-1.900.1/src/appl/dummy.c0000644000175000017500000000000010554235554015154 0ustar ernieerniejasper-1.900.1/src/appl/jasper.c0000644000175000017500000003645710554235554015336 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JasPer Transcoder Program * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include /******************************************************************************\ * \******************************************************************************/ #define OPTSMAX 4096 /******************************************************************************\ * Types. \******************************************************************************/ /* Encoder command line options. */ typedef struct { char *infile; /* The input image file. */ int infmt; /* The input image file format. */ char *inopts; char inoptsbuf[OPTSMAX + 1]; char *outfile; /* The output image file. */ int outfmt; char *outopts; char outoptsbuf[OPTSMAX + 1]; int verbose; /* Verbose mode. */ int debug; int version; int_fast32_t cmptno; int srgb; } cmdopts_t; /******************************************************************************\ * Local prototypes. \******************************************************************************/ cmdopts_t *cmdopts_parse(int argc, char **argv); void cmdopts_destroy(cmdopts_t *cmdopts); void cmdusage(void); void badusage(void); void cmdinfo(void); int addopt(char *optstr, int maxlen, char *s); /******************************************************************************\ * Global data. \******************************************************************************/ char *cmdname = ""; /******************************************************************************\ * Code. \******************************************************************************/ int main(int argc, char **argv) { jas_image_t *image; cmdopts_t *cmdopts; jas_stream_t *in; jas_stream_t *out; jas_tmr_t dectmr; jas_tmr_t enctmr; double dectime; double enctime; int_fast16_t numcmpts; int i; /* Determine the base name of this command. */ if ((cmdname = strrchr(argv[0], '/'))) { ++cmdname; } else { cmdname = argv[0]; } if (jas_init()) { abort(); } /* Parse the command line options. */ if (!(cmdopts = cmdopts_parse(argc, argv))) { fprintf(stderr, "error: cannot parse command line\n"); exit(EXIT_FAILURE); } if (cmdopts->version) { printf("%s\n", JAS_VERSION); fprintf(stderr, "libjasper %s\n", jas_getversion()); exit(EXIT_SUCCESS); } jas_setdbglevel(cmdopts->debug); if (cmdopts->verbose) { cmdinfo(); } /* Open the input image file. */ if (cmdopts->infile) { /* The input image is to be read from a file. */ if (!(in = jas_stream_fopen(cmdopts->infile, "rb"))) { fprintf(stderr, "error: cannot open input image file %s\n", cmdopts->infile); exit(EXIT_FAILURE); } } else { /* The input image is to be read from standard input. */ if (!(in = jas_stream_fdopen(0, "rb"))) { fprintf(stderr, "error: cannot open standard input\n"); exit(EXIT_FAILURE); } } /* Open the output image file. */ if (cmdopts->outfile) { /* The output image is to be written to a file. */ if (!(out = jas_stream_fopen(cmdopts->outfile, "w+b"))) { fprintf(stderr, "error: cannot open output image file %s\n", cmdopts->outfile); exit(EXIT_FAILURE); } } else { /* The output image is to be written to standard output. */ if (!(out = jas_stream_fdopen(1, "w+b"))) { fprintf(stderr, "error: cannot open standard output\n"); exit(EXIT_FAILURE); } } if (cmdopts->infmt < 0) { if ((cmdopts->infmt = jas_image_getfmt(in)) < 0) { fprintf(stderr, "error: input image has unknown format\n"); exit(EXIT_FAILURE); } } /* Get the input image data. */ jas_tmr_start(&dectmr); if (!(image = jas_image_decode(in, cmdopts->infmt, cmdopts->inopts))) { fprintf(stderr, "error: cannot load image data\n"); exit(EXIT_FAILURE); } jas_tmr_stop(&dectmr); dectime = jas_tmr_get(&dectmr); /* If requested, throw away all of the components except one. Why might this be desirable? It is a hack, really. None of the image formats other than the JPEG-2000 ones support images with two, four, five, or more components. This hack allows such images to be decoded with the non-JPEG-2000 decoders, one component at a time. */ numcmpts = jas_image_numcmpts(image); if (cmdopts->cmptno >= 0 && cmdopts->cmptno < numcmpts) { for (i = numcmpts - 1; i >= 0; --i) { if (i != cmdopts->cmptno) { jas_image_delcmpt(image, i); } } } if (cmdopts->srgb) { jas_image_t *newimage; jas_cmprof_t *outprof; jas_eprintf("forcing conversion to sRGB\n"); if (!(outprof = jas_cmprof_createfromclrspc(JAS_CLRSPC_SRGB))) { jas_eprintf("cannot create sRGB profile\n"); exit(EXIT_FAILURE); } if (!(newimage = jas_image_chclrspc(image, outprof, JAS_CMXFORM_INTENT_PER))) { jas_eprintf("cannot convert to sRGB\n"); exit(EXIT_FAILURE); } jas_image_destroy(image); jas_cmprof_destroy(outprof); image = newimage; } /* Generate the output image data. */ jas_tmr_start(&enctmr); if (jas_image_encode(image, out, cmdopts->outfmt, cmdopts->outopts)) { fprintf(stderr, "error: cannot encode image\n"); exit(EXIT_FAILURE); } jas_stream_flush(out); jas_tmr_stop(&enctmr); enctime = jas_tmr_get(&enctmr); if (cmdopts->verbose) { fprintf(stderr, "decoding time = %f\n", dectime); fprintf(stderr, "encoding time = %f\n", enctime); } /* If this fails, we don't care. */ (void) jas_stream_close(in); /* Close the output image stream. */ if (jas_stream_close(out)) { fprintf(stderr, "error: cannot close output image file\n"); exit(EXIT_FAILURE); } cmdopts_destroy(cmdopts); jas_image_destroy(image); jas_image_clearfmts(); /* Success at last! :-) */ return EXIT_SUCCESS; } cmdopts_t *cmdopts_parse(int argc, char **argv) { typedef enum { CMDOPT_HELP = 0, CMDOPT_VERBOSE, CMDOPT_INFILE, CMDOPT_INFMT, CMDOPT_INOPT, CMDOPT_OUTFILE, CMDOPT_OUTFMT, CMDOPT_OUTOPT, CMDOPT_VERSION, CMDOPT_DEBUG, CMDOPT_CMPTNO, CMDOPT_SRGB } cmdoptid_t; static jas_opt_t cmdoptions[] = { {CMDOPT_HELP, "help", 0}, {CMDOPT_VERBOSE, "verbose", 0}, {CMDOPT_INFILE, "input", JAS_OPT_HASARG}, {CMDOPT_INFILE, "f", JAS_OPT_HASARG}, {CMDOPT_INFMT, "input-format", JAS_OPT_HASARG}, {CMDOPT_INFMT, "t", JAS_OPT_HASARG}, {CMDOPT_INOPT, "input-option", JAS_OPT_HASARG}, {CMDOPT_INOPT, "o", JAS_OPT_HASARG}, {CMDOPT_OUTFILE, "output", JAS_OPT_HASARG}, {CMDOPT_OUTFILE, "F", JAS_OPT_HASARG}, {CMDOPT_OUTFMT, "output-format", JAS_OPT_HASARG}, {CMDOPT_OUTFMT, "T", JAS_OPT_HASARG}, {CMDOPT_OUTOPT, "output-option", JAS_OPT_HASARG}, {CMDOPT_OUTOPT, "O", JAS_OPT_HASARG}, {CMDOPT_VERSION, "version", 0}, {CMDOPT_DEBUG, "debug-level", JAS_OPT_HASARG}, {CMDOPT_CMPTNO, "cmptno", JAS_OPT_HASARG}, {CMDOPT_SRGB, "force-srgb", 0}, {CMDOPT_SRGB, "S", 0}, {-1, 0, 0} }; cmdopts_t *cmdopts; int c; if (!(cmdopts = malloc(sizeof(cmdopts_t)))) { fprintf(stderr, "error: insufficient memory\n"); exit(EXIT_FAILURE); } cmdopts->infile = 0; cmdopts->infmt = -1; cmdopts->inopts = 0; cmdopts->inoptsbuf[0] = '\0'; cmdopts->outfile = 0; cmdopts->outfmt = -1; cmdopts->outopts = 0; cmdopts->outoptsbuf[0] = '\0'; cmdopts->verbose = 0; cmdopts->version = 0; cmdopts->cmptno = -1; cmdopts->debug = 0; cmdopts->srgb = 0; while ((c = jas_getopt(argc, argv, cmdoptions)) != EOF) { switch (c) { case CMDOPT_HELP: cmdusage(); break; case CMDOPT_VERBOSE: cmdopts->verbose = 1; break; case CMDOPT_VERSION: cmdopts->version = 1; break; case CMDOPT_DEBUG: cmdopts->debug = atoi(jas_optarg); break; case CMDOPT_INFILE: cmdopts->infile = jas_optarg; break; case CMDOPT_INFMT: if ((cmdopts->infmt = jas_image_strtofmt(jas_optarg)) < 0) { fprintf(stderr, "warning: ignoring invalid input format %s\n", jas_optarg); cmdopts->infmt = -1; } break; case CMDOPT_INOPT: addopt(cmdopts->inoptsbuf, OPTSMAX, jas_optarg); cmdopts->inopts = cmdopts->inoptsbuf; break; case CMDOPT_OUTFILE: cmdopts->outfile = jas_optarg; break; case CMDOPT_OUTFMT: if ((cmdopts->outfmt = jas_image_strtofmt(jas_optarg)) < 0) { fprintf(stderr, "error: invalid output format %s\n", jas_optarg); badusage(); } break; case CMDOPT_OUTOPT: addopt(cmdopts->outoptsbuf, OPTSMAX, jas_optarg); cmdopts->outopts = cmdopts->outoptsbuf; break; case CMDOPT_CMPTNO: cmdopts->cmptno = atoi(jas_optarg); break; case CMDOPT_SRGB: cmdopts->srgb = 1; break; default: badusage(); break; } } while (jas_optind < argc) { fprintf(stderr, "warning: ignoring bogus command line argument %s\n", argv[jas_optind]); ++jas_optind; } if (cmdopts->version) { goto done; } if (cmdopts->outfmt < 0 && cmdopts->outfile) { if ((cmdopts->outfmt = jas_image_fmtfromname(cmdopts->outfile)) < 0) { fprintf(stderr, "error: cannot guess image format from output file name\n"); } } if (cmdopts->outfmt < 0) { fprintf(stderr, "error: no output format specified\n"); badusage(); } done: return cmdopts; } void cmdopts_destroy(cmdopts_t *cmdopts) { free(cmdopts); } int addopt(char *optstr, int maxlen, char *s) { int n; int m; n = strlen(optstr); m = n + strlen(s) + 1; if (m > maxlen) { return 1; } if (n > 0) { strcat(optstr, "\n"); } strcat(optstr, s); return 0; } void cmdinfo() { fprintf(stderr, "JasPer Transcoder (Version %s).\n", JAS_VERSION); fprintf(stderr, "%s\n", JAS_COPYRIGHT); fprintf(stderr, "%s\n", JAS_NOTES); } static char *helpinfo[] = { "The following options are supported:\n", " --help Print this help information and exit.\n", " --version Print version information and exit.\n", " --verbose Enable verbose mode.\n", " --debug-level $lev Set the debug level to $lev.\n", " --input $file Read the input image from the file named $file\n", " instead of standard input.\n", " --input-format $fmt Specify the format of the input image as $fmt.\n", " (See below for the list of supported formats.)\n", " --input-option $opt Provide the option $opt to the decoder.\n", " --output $file Write the output image to the file named $file\n", " instead of standard output.\n", " --output-format $fmt Specify the format of the output image as $fmt.\n", " (See below for the list of supported formats.)\n", " --output-option $opt Provide the option $opt to the encoder.\n", " --force-srgb Force conversion to the sRGB color space.\n", "Some of the above option names can be abbreviated as follows:\n", " --input = -f, --input-format = -t, --input-option = -o,\n", " --output = -F, --output-format = -T, --output-option = -O\n", 0 }; void cmdusage() { int fmtid; jas_image_fmtinfo_t *fmtinfo; char *s; int i; cmdinfo(); fprintf(stderr, "usage: %s [options]\n", cmdname); for (i = 0, s = helpinfo[i]; s; ++i, s = helpinfo[i]) { fprintf(stderr, "%s", s); } fprintf(stderr, "The following formats are supported:\n"); for (fmtid = 0;; ++fmtid) { if (!(fmtinfo = jas_image_lookupfmtbyid(fmtid))) { break; } fprintf(stderr, " %-5s %s\n", fmtinfo->name, fmtinfo->desc); } exit(EXIT_FAILURE); } void badusage() { fprintf(stderr, "For more information on how to use this command, type:\n"); fprintf(stderr, " %s --help\n", cmdname); exit(EXIT_FAILURE); } #if 0 jas_image_t *converttosrgb(jas_image_t *inimage) { jas_image_t *outimage; jas_cmpixmap_t inpixmap; jas_cmpixmap_t outpixmap; jas_cmcmptfmt_t incmptfmts[16]; jas_cmcmptfmt_t outcmptfmts[16]; outprof = jas_cmprof_createfromclrspc(JAS_CLRSPC_SRGB); assert(outprof); xform = jas_cmxform_create(jas_image_cmprof(inimage), outprof, 0, JAS_CMXFORM_FWD, JAS_CMXFORM_INTENT_PER, 0); assert(xform); inpixmap.numcmpts = jas_image_numcmpts(oldimage); outpixmap.numcmpts = 3; for (i = 0; i < inpixmap.numcmpts; ++i) { inpixmap.cmptfmts[i] = &incmptfmts[i]; } for (i = 0; i < outpixmap.numcmpts; ++i) outpixmap.cmptfmts[i] = &outcmptfmts[i]; if (jas_cmxform_apply(xform, &inpixmap, &outpixmap)) abort(); jas_xform_destroy(xform); jas_cmprof_destroy(outprof); return 0; } #endif jasper-1.900.1/src/appl/imgcmp.10000644000175000017500000000103210554235554015221 0ustar ernieernie.TH imgcmp 1 "20 June 2004" "Version 1.701.0" "JasPer Manual" .SH NAME imgcmp \- Image comparison utility .SH SYNOPSIS .B imgcmp .RI [ options ] .SH DESCRIPTION The .B imgcmp command compares two images of the same geometry with respect to a given metric. Please use the \-\-help command line switch and the JasPer Software Reference Manual for more information. .SH SEE ALSO .IR jasper (1) .SH AUTHOR Michael D. Adams This manpage was initially written by Roland Stigge for the Debian Project. jasper-1.900.1/src/appl/jiv.10000644000175000017500000000107210554235554014541 0ustar ernieernie.TH jiv 1 "20 June 2004" "Version 1.701.0" "JasPer Manual" .SH NAME jiv \- Image display utility .SH SYNOPSIS .B jiv .RI [ options ] .RI [ file ... ] .SH DESCRIPTION The .B jiv command displays a JPEG-2000 image on an X display. Use the arrow keys for scrolling and < and > for zooming. Please use the \-\-help command line switch and the JasPer Software Reference Manual for more information. .SH SEE ALSO .IR jasper (1) .SH AUTHOR Michael D. Adams This manpage was initially written by Roland Stigge for the Debian Project. jasper-1.900.1/src/appl/Makefile.am0000644000175000017500000000730010554235554015723 0ustar ernieernie# Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ if HAVE_OPENGL BIN_JIV = jiv EXTRA_JIV = else BIN_JIV = EXTRA_JIV = jiv endif bin_PROGRAMS = jasper $(BIN_JIV) imgcmp imginfo tmrdemo #bin_PROGRAMS = jasper $(BIN_JIV) imgcmp imginfo tmrdemo dummy dummy2 EXTRA_PROGRAMS = $(EXTRA_JIV) dummy dummy2 jasper_SOURCES = jasper.c imgcmp_SOURCES = imgcmp.c imginfo_SOURCES = imginfo.c dummy_SOURCES = dummy.c dummy2_SOURCES = dummy2.c tmrdemo_SOURCES = tmrdemo.c jiv_SOURCES = jiv.c man_MANS = imgcmp.1 imginfo.1 jasper.1 jiv.1 EXTRA_DIST = $(man_MANS) INCLUDES = -I$(top_srcdir)/src/libjasper/include MYLDFLAGS = ../libjasper/libjasper.la jasper_LDADD = $(MYLDFLAGS) imgcmp_LDADD = $(MYLDFLAGS) imginfo_LDADD = $(MYLDFLAGS) jiv_LDADD = $(MYLDFLAGS) $(OPENGL_LIBS) dummy_LDADD = $(MYLDFLAGS) dummy2_LDADD = $(MYLDFLAGS) tmrdemo_LDADD = $(MYLDFLAGS) jasper-1.900.1/src/appl/jasper.10000644000175000017500000000077110554235554015242 0ustar ernieernie.TH jasper 1 "20 June 2004" "Version 1.701.0" "JasPer Manual" .SH NAME jasper \- File format converter specialized in JPEG-2000 encoding .SH SYNOPSIS .B jasper .RI [ options ] .SH DESCRIPTION The .B jasper command converts to and from JPEG-2000 files. Please use the \-\-help command line switch and the JasPer Software Reference Manual for more information. .SH AUTHOR Michael D. Adams This manpage was initially written by Roland Stigge for the Debian Project. jasper-1.900.1/src/appl/imgcmp.c0000644000175000017500000003514410554235554015316 0ustar ernieernie/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Image Comparison Program * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include #include /******************************************************************************\ * \******************************************************************************/ typedef enum { OPT_HELP, OPT_VERSION, OPT_VERBOSE, OPT_ORIG, OPT_RECON, OPT_METRIC, OPT_MAXONLY, OPT_MINONLY, OPT_DIFFIMAGE } optid_t; typedef enum { metricid_none = 0, metricid_equal, metricid_psnr, metricid_mse, metricid_rmse, metricid_pae, metricid_mae } metricid_t; /******************************************************************************\ * \******************************************************************************/ double getdistortion(jas_matrix_t *orig, jas_matrix_t *recon, int depth, int metric); double pae(jas_matrix_t *x, jas_matrix_t *y); double msen(jas_matrix_t *x, jas_matrix_t *y, int n); double psnr(jas_matrix_t *x, jas_matrix_t *y, int depth); jas_image_t *makediffimage(jas_matrix_t *origdata, jas_matrix_t *recondata); void usage(void); void cmdinfo(void); /******************************************************************************\ * \******************************************************************************/ static jas_taginfo_t metrictab[] = { {metricid_mse, "mse"}, {metricid_pae, "pae"}, {metricid_rmse, "rmse"}, {metricid_psnr, "psnr"}, {metricid_mae, "mae"}, {metricid_equal, "equal"}, {-1, 0} }; static jas_opt_t opts[] = { {OPT_HELP, "help", 0}, {OPT_VERSION, "version", 0}, {OPT_VERBOSE, "verbose", 0}, {OPT_ORIG, "f", JAS_OPT_HASARG}, {OPT_RECON, "F", JAS_OPT_HASARG}, {OPT_METRIC, "m", JAS_OPT_HASARG}, {OPT_MAXONLY, "max", 0}, {OPT_MINONLY, "min", 0}, {OPT_DIFFIMAGE, "d", JAS_OPT_HASARG}, {-1, 0, 0} }; static char *cmdname = 0; /******************************************************************************\ * Main program. \******************************************************************************/ int main(int argc, char **argv) { char *origpath; char *reconpath; int verbose; char *metricname; int metric; int id; jas_image_t *origimage; jas_image_t *reconimage; jas_matrix_t *origdata; jas_matrix_t *recondata; jas_image_t *diffimage; jas_stream_t *diffstream; int width; int height; int depth; int numcomps; double d; double maxdist; double mindist; int compno; jas_stream_t *origstream; jas_stream_t *reconstream; char *diffpath; int maxonly; int minonly; int fmtid; verbose = 0; origpath = 0; reconpath = 0; metricname = 0; metric = metricid_none; diffpath = 0; maxonly = 0; minonly = 0; if (jas_init()) { abort(); } cmdname = argv[0]; /* Parse the command line options. */ while ((id = jas_getopt(argc, argv, opts)) >= 0) { switch (id) { case OPT_MAXONLY: maxonly = 1; break; case OPT_MINONLY: minonly = 1; break; case OPT_METRIC: metricname = jas_optarg; break; case OPT_ORIG: origpath = jas_optarg; break; case OPT_RECON: reconpath = jas_optarg; break; case OPT_VERBOSE: verbose = 1; break; case OPT_DIFFIMAGE: diffpath = jas_optarg; break; case OPT_VERSION: printf("%s\n", JAS_VERSION); exit(EXIT_SUCCESS); break; case OPT_HELP: default: usage(); break; } } if (verbose) { cmdinfo(); } /* Ensure that files are given for both the original and reconstructed images. */ if (!origpath || !reconpath) { usage(); } /* If a metric was specified, process it. */ if (metricname) { if ((metric = (jas_taginfo_nonull(jas_taginfos_lookup(metrictab, metricname))->id)) < 0) { usage(); } } /* Open the original image file. */ if (!(origstream = jas_stream_fopen(origpath, "rb"))) { fprintf(stderr, "cannot open %s\n", origpath); return EXIT_FAILURE; } /* Open the reconstructed image file. */ if (!(reconstream = jas_stream_fopen(reconpath, "rb"))) { fprintf(stderr, "cannot open %s\n", reconpath); return EXIT_FAILURE; } /* Decode the original image. */ if (!(origimage = jas_image_decode(origstream, -1, 0))) { fprintf(stderr, "cannot load original image\n"); return EXIT_FAILURE; } /* Decoder the reconstructed image. */ if (!(reconimage = jas_image_decode(reconstream, -1, 0))) { fprintf(stderr, "cannot load reconstructed image\n"); return EXIT_FAILURE; } /* Close the original image file. */ jas_stream_close(origstream); /* Close the reconstructed image file. */ jas_stream_close(reconstream); /* Ensure that both images have the same number of components. */ numcomps = jas_image_numcmpts(origimage); if (jas_image_numcmpts(reconimage) != numcomps) { fprintf(stderr, "number of components differ\n"); return EXIT_FAILURE; } /* Compute the difference for each component. */ maxdist = 0; mindist = FLT_MAX; for (compno = 0; compno < numcomps; ++compno) { width = jas_image_cmptwidth(origimage, compno); height = jas_image_cmptheight(origimage, compno); depth = jas_image_cmptprec(origimage, compno); if (jas_image_cmptwidth(reconimage, compno) != width || jas_image_cmptheight(reconimage, compno) != height) { fprintf(stderr, "image dimensions differ\n"); return EXIT_FAILURE; } if (jas_image_cmptprec(reconimage, compno) != depth) { fprintf(stderr, "precisions differ\n"); return EXIT_FAILURE; } if (!(origdata = jas_matrix_create(height, width))) { fprintf(stderr, "internal error\n"); return EXIT_FAILURE; } if (!(recondata = jas_matrix_create(height, width))) { fprintf(stderr, "internal error\n"); return EXIT_FAILURE; } if (jas_image_readcmpt(origimage, compno, 0, 0, width, height, origdata)) { fprintf(stderr, "cannot read component data\n"); return EXIT_FAILURE; } if (jas_image_readcmpt(reconimage, compno, 0, 0, width, height, recondata)) { fprintf(stderr, "cannot read component data\n"); return EXIT_FAILURE; } if (diffpath) { if (!(diffstream = jas_stream_fopen(diffpath, "rwb"))) { fprintf(stderr, "cannot open diff stream\n"); return EXIT_FAILURE; } if (!(diffimage = makediffimage(origdata, recondata))) { fprintf(stderr, "cannot make diff image\n"); return EXIT_FAILURE; } fmtid = jas_image_strtofmt("pnm"); if (jas_image_encode(diffimage, diffstream, fmtid, 0)) { fprintf(stderr, "cannot save\n"); return EXIT_FAILURE; } jas_stream_close(diffstream); jas_image_destroy(diffimage); } if (metric != metricid_none) { d = getdistortion(origdata, recondata, depth, metric); if (d > maxdist) { maxdist = d; } if (d < mindist) { mindist = d; } if (!maxonly && !minonly) { if (metric == metricid_pae || metric == metricid_equal) { printf("%ld\n", (long) ceil(d)); } else { printf("%f\n", d); } } } jas_matrix_destroy(origdata); jas_matrix_destroy(recondata); } if (metric != metricid_none && (maxonly || minonly)) { if (maxonly) { d = maxdist; } else if (minonly) { d = mindist; } else { abort(); } if (metric == metricid_pae || metric == metricid_equal) { printf("%ld\n", (long) ceil(d)); } else { printf("%f\n", d); } } jas_image_destroy(origimage); jas_image_destroy(reconimage); jas_image_clearfmts(); return EXIT_SUCCESS; } /******************************************************************************\ * Distortion metric computation functions. \******************************************************************************/ double getdistortion(jas_matrix_t *orig, jas_matrix_t *recon, int depth, int metric) { double d; switch (metric) { case metricid_psnr: default: d = psnr(orig, recon, depth); break; case metricid_mae: d = msen(orig, recon, 1); break; case metricid_mse: d = msen(orig, recon, 2); break; case metricid_rmse: d = sqrt(msen(orig, recon, 2)); break; case metricid_pae: d = pae(orig, recon); break; case metricid_equal: d = (pae(orig, recon) == 0) ? 0 : 1; break; } return d; } /* Compute peak absolute error. */ double pae(jas_matrix_t *x, jas_matrix_t *y) { double s; double d; int i; int j; s = 0.0; for (i = 0; i < jas_matrix_numrows(x); i++) { for (j = 0; j < jas_matrix_numcols(x); j++) { d = abs(jas_matrix_get(y, i, j) - jas_matrix_get(x, i, j)); if (d > s) { s = d; } } } return s; } /* Compute either mean-squared error or mean-absolute error. */ double msen(jas_matrix_t *x, jas_matrix_t *y, int n) { double s; double d; int i; int j; s = 0.0; for (i = 0; i < jas_matrix_numrows(x); i++) { for (j = 0; j < jas_matrix_numcols(x); j++) { d = jas_matrix_get(y, i, j) - jas_matrix_get(x, i, j); if (n == 1) { s += fabs(d); } else if (n == 2) { s += d * d; } else { abort(); } } } return s / ((double) jas_matrix_numrows(x) * jas_matrix_numcols(x)); } /* Compute peak signal-to-noise ratio. */ double psnr(jas_matrix_t *x, jas_matrix_t *y, int depth) { double m; double p; m = msen(x, y, 2); p = ((1 << depth) - 1); return 20.0 * log10(p / sqrt(m)); } /******************************************************************************\ * \******************************************************************************/ jas_image_t *makediffimage(jas_matrix_t *origdata, jas_matrix_t *recondata) { jas_image_t *diffimage; jas_matrix_t *diffdata[3]; int width; int height; int i; int j; int k; jas_image_cmptparm_t compparms[3]; jas_seqent_t a; jas_seqent_t b; width = jas_matrix_numcols(origdata); height = jas_matrix_numrows(origdata); for (i = 0; i < 3; ++i) { compparms[i].tlx = 0; compparms[i].tly = 0; compparms[i].hstep = 1; compparms[i].vstep = 1; compparms[i].width = width; compparms[i].height = height; compparms[i].prec = 8; compparms[i].sgnd = false; } if (!(diffimage = jas_image_create(3, compparms, JAS_CLRSPC_SRGB))) { abort(); } for (i = 0; i < 3; ++i) { if (!(diffdata[i] = jas_matrix_create(height, width))) { fprintf(stderr, "internal error\n"); return 0; } } for (j = 0; j < height; ++j) { for (k = 0; k < width; ++k) { a = jas_matrix_get(origdata, j, k); b = jas_matrix_get(recondata, j, k); if (a > b) { jas_matrix_set(diffdata[0], j, k, 255); jas_matrix_set(diffdata[1], j, k, 0); jas_matrix_set(diffdata[2], j, k, 0); } else if (a < b) { jas_matrix_set(diffdata[0], j, k, 0); jas_matrix_set(diffdata[1], j, k, 255); jas_matrix_set(diffdata[2], j, k, 0); } else { jas_matrix_set(diffdata[0], j, k, a); jas_matrix_set(diffdata[1], j, k, a); jas_matrix_set(diffdata[2], j, k, a); } } } for (i = 0; i < 3; ++i) { if (jas_image_writecmpt(diffimage, i, 0, 0, width, height, diffdata[i])) { return 0; } } return diffimage; } /******************************************************************************\ * \******************************************************************************/ void cmdinfo() { fprintf(stderr, "Image Comparison Utility (Version %s).\n", JAS_VERSION); fprintf(stderr, "Copyright (c) 2001 Michael David Adams.\n" "All rights reserved.\n" ); } void usage() { cmdinfo(); fprintf(stderr, "usage:\n"); fprintf(stderr,"%s ", cmdname); fprintf(stderr, "-f reference_image_file -F other_image_file [-m metric]\n" ); fprintf(stderr, "The metric argument may assume one of the following values:\n" " psnr .... peak signal to noise ratio\n" " mse ..... mean squared error\n" " rmse .... root mean squared error\n" " pae ..... peak absolute error\n" " mae ..... mean absolute error\n" " equal ... equality (boolean)\n" ); exit(EXIT_FAILURE); } jasper-1.900.1/src/README0000644000175000017500000000007610554235554013616 0ustar ernieernieThis directory hierarchy contains the source code for JasPer. jasper-1.900.1/src/libjasper/0000755000175000017500000000000010554237065014705 5ustar ernieerniejasper-1.900.1/src/libjasper/Makefile.in0000644000175000017500000005344410554237045016762 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = 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)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libjasper_la_DEPENDENCIES = base/libbase.la bmp/libbmp.la \ jp2/libjp2.la jpc/libjpc.la jpg/libjpg.la mif/libmif.la \ pgx/libpgx.la pnm/libpnm.la ras/libras.la am_libjasper_la_OBJECTS = dummy.lo libjasper_la_OBJECTS = $(am_libjasper_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libjasper_la_SOURCES) DIST_SOURCES = $(libjasper_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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 = \ include \ base \ bmp \ jp2 \ jpc \ jpg \ mif \ pgx \ pnm \ ras lib_LTLIBRARIES = libjasper.la libjasper_la_SOURCES = dummy.c libjasper_la_LIBADD = \ base/libbase.la \ bmp/libbmp.la \ jp2/libjp2.la \ jpc/libjpc.la \ jpg/libjpg.la \ mif/libmif.la \ pgx/libpgx.la \ pnm/libpnm.la \ ras/libras.la # -release $(LT_RELEASE) libjasper_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjasper.la: $(libjasper_la_OBJECTS) $(libjasper_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libjasper_la_LDFLAGS) $(libjasper_la_OBJECTS) $(libjasper_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@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 $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; 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-libLTLIBRARIES clean-libtool \ 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-libLTLIBRARIES 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-libLTLIBRARIES uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libLTLIBRARIES clean-libtool \ 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-libLTLIBRARIES 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 uninstall-libLTLIBRARIES # 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: jasper-1.900.1/src/libjasper/jpc/0000755000175000017500000000000010554237065015461 5ustar ernieerniejasper-1.900.1/src/libjasper/jpc/Makefile.in0000644000175000017500000004466710554237046017546 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ # AM_CFLAGS = -funroll-loops 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 = src/libjasper/jpc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libjpc_la_LIBADD = am_libjpc_la_OBJECTS = jpc_bs.lo jpc_cs.lo jpc_dec.lo jpc_enc.lo \ jpc_math.lo jpc_mct.lo jpc_mqcod.lo jpc_mqdec.lo jpc_mqenc.lo \ jpc_qmfb.lo jpc_tagtree.lo jpc_t1cod.lo jpc_t1dec.lo \ jpc_t1enc.lo jpc_tsfb.lo jpc_t2cod.lo jpc_t2dec.lo \ jpc_t2enc.lo jpc_util.lo libjpc_la_OBJECTS = $(am_libjpc_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libjpc_la_SOURCES) DIST_SOURCES = $(libjpc_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ noinst_LTLIBRARIES = libjpc.la libjpc_la_SOURCES = \ jpc_bs.h \ jpc_cod.h \ jpc_cs.h \ jpc_dec.h \ jpc_enc.h \ jpc_fix.h \ jpc_flt.h \ jpc_math.h \ jpc_mct.h \ jpc_mqcod.h \ jpc_mqdec.h \ jpc_mqenc.h \ jpc_qmfb.h \ jpc_tagtree.h \ jpc_t1cod.h \ jpc_t1dec.h \ jpc_t1enc.h \ jpc_tsfb.h \ jpc_t2cod.h \ jpc_t2dec.h \ jpc_t2enc.h \ jpc_util.h \ jpc_bs.c \ jpc_cs.c \ jpc_dec.c \ jpc_enc.c \ jpc_math.c \ jpc_mct.c \ jpc_mqcod.c \ jpc_mqdec.c \ jpc_mqenc.c \ jpc_qmfb.c \ jpc_tagtree.c \ jpc_t1cod.c \ jpc_t1dec.c \ jpc_t1enc.c \ jpc_tsfb.c \ jpc_t2cod.c \ jpc_t2dec.c \ jpc_t2enc.c \ jpc_util.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/jpc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/jpc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjpc.la: $(libjpc_la_OBJECTS) $(libjpc_la_DEPENDENCIES) $(LINK) $(libjpc_la_LDFLAGS) $(libjpc_la_OBJECTS) $(libjpc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_bs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_cs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_enc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_mct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_mqcod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_mqdec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_mqenc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_qmfb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_t1cod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_t1dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_t1enc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_t2cod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_t2dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_t2enc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_tagtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_tsfb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpc_util.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/jpc/jpc_t1dec.h0000644000175000017500000000726310554235553017476 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 1 Decoder * * $Id$ */ #ifndef JPC_T1DEC_H #define JPC_T1DEC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jpc_dec.h" #include "jpc_mqdec.h" #include "jpc_t1cod.h" /******************************************************************************\ * Functions. \******************************************************************************/ /* Decode all of the code blocks for a particular tile. */ int jpc_dec_decodecblks(jpc_dec_t *dec, jpc_dec_tile_t *tile); #endif jasper-1.900.1/src/libjasper/jpc/jpc_bs.c0000644000175000017500000003130210554235553017064 0ustar ernieernie/* * Copyright (c) 1999-2000, Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Bit Stream Class * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jasper/jas_debug.h" #include "jpc_bs.h" /******************************************************************************\ * Local function prototypes. \******************************************************************************/ static jpc_bitstream_t *jpc_bitstream_alloc(void); /******************************************************************************\ * Code for opening and closing bit streams. \******************************************************************************/ /* Open a bit stream from a stream. */ jpc_bitstream_t *jpc_bitstream_sopen(jas_stream_t *stream, char *mode) { jpc_bitstream_t *bitstream; /* Ensure that the open mode is valid. */ #if 1 /* This causes a string literal too long error (with c99 pedantic mode). */ assert(!strcmp(mode, "r") || !strcmp(mode, "w") || !strcmp(mode, "r+") || !strcmp(mode, "w+")); #endif if (!(bitstream = jpc_bitstream_alloc())) { return 0; } /* By default, do not close the underlying (character) stream, upon the close of the bit stream. */ bitstream->flags_ = JPC_BITSTREAM_NOCLOSE; bitstream->stream_ = stream; bitstream->openmode_ = (mode[0] == 'w') ? JPC_BITSTREAM_WRITE : JPC_BITSTREAM_READ; /* Mark the data buffer as empty. */ bitstream->cnt_ = (bitstream->openmode_ == JPC_BITSTREAM_READ) ? 0 : 8; bitstream->buf_ = 0; return bitstream; } /* Close a bit stream. */ int jpc_bitstream_close(jpc_bitstream_t *bitstream) { int ret = 0; /* Align to the next byte boundary while considering the effects of bit stuffing. */ if (jpc_bitstream_align(bitstream)) { ret = -1; } /* If necessary, close the underlying (character) stream. */ if (!(bitstream->flags_ & JPC_BITSTREAM_NOCLOSE) && bitstream->stream_) { if (jas_stream_close(bitstream->stream_)) { ret = -1; } bitstream->stream_ = 0; } jas_free(bitstream); return ret; } /* Allocate a new bit stream. */ static jpc_bitstream_t *jpc_bitstream_alloc() { jpc_bitstream_t *bitstream; /* Allocate memory for the new bit stream object. */ if (!(bitstream = jas_malloc(sizeof(jpc_bitstream_t)))) { return 0; } /* Initialize all of the data members. */ bitstream->stream_ = 0; bitstream->cnt_ = 0; bitstream->flags_ = 0; bitstream->openmode_ = 0; return bitstream; } /******************************************************************************\ * Code for reading/writing from/to bit streams. \******************************************************************************/ /* Get a bit from a bit stream. */ int jpc_bitstream_getbit_func(jpc_bitstream_t *bitstream) { int ret; JAS_DBGLOG(1000, ("jpc_bitstream_getbit_func(%p)\n", bitstream)); ret = jpc_bitstream_getbit_macro(bitstream); JAS_DBGLOG(1000, ("jpc_bitstream_getbit_func -> %d\n", ret)); return ret; } /* Put a bit to a bit stream. */ int jpc_bitstream_putbit_func(jpc_bitstream_t *bitstream, int b) { int ret; JAS_DBGLOG(1000, ("jpc_bitstream_putbit_func(%p, %d)\n", bitstream, b)); ret = jpc_bitstream_putbit_macro(bitstream, b); JAS_DBGLOG(1000, ("jpc_bitstream_putbit_func() -> %d\n", ret)); return ret; } /* Get one or more bits from a bit stream. */ long jpc_bitstream_getbits(jpc_bitstream_t *bitstream, int n) { long v; int u; /* We can reliably get at most 31 bits since ISO/IEC 9899 only guarantees that a long can represent values up to 2^31-1. */ assert(n >= 0 && n < 32); /* Get the number of bits requested from the specified bit stream. */ v = 0; while (--n >= 0) { if ((u = jpc_bitstream_getbit(bitstream)) < 0) { return -1; } v = (v << 1) | u; } return v; } /* Put one or more bits to a bit stream. */ int jpc_bitstream_putbits(jpc_bitstream_t *bitstream, int n, long v) { int m; /* We can reliably put at most 31 bits since ISO/IEC 9899 only guarantees that a long can represent values up to 2^31-1. */ assert(n >= 0 && n < 32); /* Ensure that only the bits to be output are nonzero. */ assert(!(v & (~JAS_ONES(n)))); /* Put the desired number of bits to the specified bit stream. */ m = n - 1; while (--n >= 0) { if (jpc_bitstream_putbit(bitstream, (v >> m) & 1) == EOF) { return EOF; } v <<= 1; } return 0; } /******************************************************************************\ * Code for buffer filling and flushing. \******************************************************************************/ /* Fill the buffer for a bit stream. */ int jpc_bitstream_fillbuf(jpc_bitstream_t *bitstream) { int c; /* Note: The count has already been decremented by the caller. */ assert(bitstream->openmode_ & JPC_BITSTREAM_READ); assert(bitstream->cnt_ <= 0); if (bitstream->flags_ & JPC_BITSTREAM_ERR) { bitstream->cnt_ = 0; return -1; } if (bitstream->flags_ & JPC_BITSTREAM_EOF) { bitstream->buf_ = 0x7f; bitstream->cnt_ = 7; return 1; } bitstream->buf_ = (bitstream->buf_ << 8) & 0xffff; if ((c = jas_stream_getc((bitstream)->stream_)) == EOF) { bitstream->flags_ |= JPC_BITSTREAM_EOF; return 1; } bitstream->cnt_ = (bitstream->buf_ == 0xff00) ? 6 : 7; bitstream->buf_ |= c & ((1 << (bitstream->cnt_ + 1)) - 1); return (bitstream->buf_ >> bitstream->cnt_) & 1; } /******************************************************************************\ * Code related to flushing. \******************************************************************************/ /* Does the bit stream need to be aligned to a byte boundary (considering the effects of bit stuffing)? */ int jpc_bitstream_needalign(jpc_bitstream_t *bitstream) { if (bitstream->openmode_ & JPC_BITSTREAM_READ) { /* The bit stream is open for reading. */ /* If there are any bits buffered for reading, or the previous byte forced a stuffed bit, alignment is required. */ if ((bitstream->cnt_ < 8 && bitstream->cnt_ > 0) || ((bitstream->buf_ >> 8) & 0xff) == 0xff) { return 1; } } else if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) { /* The bit stream is open for writing. */ /* If there are any bits buffered for writing, or the previous byte forced a stuffed bit, alignment is required. */ if ((bitstream->cnt_ < 8 && bitstream->cnt_ >= 0) || ((bitstream->buf_ >> 8) & 0xff) == 0xff) { return 1; } } else { /* This should not happen. Famous last words, eh? :-) */ assert(0); return -1; } return 0; } /* How many additional bytes would be output if we align the bit stream? */ int jpc_bitstream_pending(jpc_bitstream_t *bitstream) { if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) { /* The bit stream is being used for writing. */ #if 1 /* XXX - Is this really correct? Check someday... */ if (bitstream->cnt_ < 8) { return 1; } #else if (bitstream->cnt_ < 8) { if (((bitstream->buf_ >> 8) & 0xff) == 0xff) { return 2; } return 1; } #endif return 0; } else { /* This operation should not be invoked on a bit stream that is being used for reading. */ return -1; } } /* Align the bit stream to a byte boundary. */ int jpc_bitstream_align(jpc_bitstream_t *bitstream) { int ret; if (bitstream->openmode_ & JPC_BITSTREAM_READ) { ret = jpc_bitstream_inalign(bitstream, 0, 0); } else if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) { ret = jpc_bitstream_outalign(bitstream, 0); } else { abort(); } return ret; } /* Align a bit stream in the input case. */ int jpc_bitstream_inalign(jpc_bitstream_t *bitstream, int fillmask, int filldata) { int n; int v; int u; int numfill; int m; numfill = 7; m = 0; v = 0; if (bitstream->cnt_ > 0) { n = bitstream->cnt_; } else if (!bitstream->cnt_) { n = ((bitstream->buf_ & 0xff) == 0xff) ? 7 : 0; } else { n = 0; } if (n > 0) { if ((u = jpc_bitstream_getbits(bitstream, n)) < 0) { return -1; } m += n; v = (v << n) | u; } if ((bitstream->buf_ & 0xff) == 0xff) { if ((u = jpc_bitstream_getbits(bitstream, 7)) < 0) { return -1; } v = (v << 7) | u; m += 7; } if (m > numfill) { v >>= m - numfill; } else { filldata >>= numfill - m; fillmask >>= numfill - m; } if (((~(v ^ filldata)) & fillmask) != fillmask) { /* The actual fill pattern does not match the expected one. */ return 1; } return 0; } /* Align a bit stream in the output case. */ int jpc_bitstream_outalign(jpc_bitstream_t *bitstream, int filldata) { int n; int v; /* Ensure that this bit stream is open for writing. */ assert(bitstream->openmode_ & JPC_BITSTREAM_WRITE); /* Ensure that the first bit of fill data is zero. */ /* Note: The first bit of fill data must be zero. If this were not the case, the fill data itself could cause further bit stuffing to be required (which would cause numerous complications). */ assert(!(filldata & (~0x3f))); if (!bitstream->cnt_) { if ((bitstream->buf_ & 0xff) == 0xff) { n = 7; v = filldata; } else { n = 0; v = 0; } } else if (bitstream->cnt_ > 0 && bitstream->cnt_ < 8) { n = bitstream->cnt_; v = filldata >> (7 - n); } else { n = 0; v = 0; return 0; } /* Write the appropriate fill data to the bit stream. */ if (n > 0) { if (jpc_bitstream_putbits(bitstream, n, v)) { return -1; } } if (bitstream->cnt_ < 8) { assert(bitstream->cnt_ >= 0 && bitstream->cnt_ < 8); assert((bitstream->buf_ & 0xff) != 0xff); /* Force the pending byte of output to be written to the underlying (character) stream. */ if (jas_stream_putc(bitstream->stream_, bitstream->buf_ & 0xff) == EOF) { return -1; } bitstream->cnt_ = 8; bitstream->buf_ = (bitstream->buf_ << 8) & 0xffff; } return 0; } jasper-1.900.1/src/libjasper/jpc/jpc_tsfb.c0000644000175000017500000002260610554235553017425 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2004 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tree-Structured Filter Bank (TSFB) Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_malloc.h" #include "jasper/jas_seq.h" #include "jpc_tsfb.h" #include "jpc_cod.h" #include "jpc_cs.h" #include "jpc_util.h" #include "jpc_math.h" void jpc_tsfb_getbands2(jpc_tsfb_t *tsfb, int locxstart, int locystart, int xstart, int ystart, int xend, int yend, jpc_tsfb_band_t **bands, int numlvls); /******************************************************************************\ * \******************************************************************************/ jpc_tsfb_t *jpc_cod_gettsfb(int qmfbid, int numlvls) { jpc_tsfb_t *tsfb; if (!(tsfb = malloc(sizeof(jpc_tsfb_t)))) return 0; if (numlvls > 0) { switch (qmfbid) { case JPC_COX_INS: tsfb->qmfb = &jpc_ns_qmfb2d; break; default: case JPC_COX_RFT: tsfb->qmfb = &jpc_ft_qmfb2d; break; } } else { tsfb->qmfb = 0; } tsfb->numlvls = numlvls; return tsfb; } void jpc_tsfb_destroy(jpc_tsfb_t *tsfb) { free(tsfb); } int jpc_tsfb_analyze(jpc_tsfb_t *tsfb, jas_seq2d_t *a) { return (tsfb->numlvls > 0) ? jpc_tsfb_analyze2(tsfb, jas_seq2d_getref(a, jas_seq2d_xstart(a), jas_seq2d_ystart(a)), jas_seq2d_xstart(a), jas_seq2d_ystart(a), jas_seq2d_width(a), jas_seq2d_height(a), jas_seq2d_rowstep(a), tsfb->numlvls - 1) : 0; } int jpc_tsfb_analyze2(jpc_tsfb_t *tsfb, int *a, int xstart, int ystart, int width, int height, int stride, int numlvls) { if (width > 0 && height > 0) { if ((*tsfb->qmfb->analyze)(a, xstart, ystart, width, height, stride)) return -1; if (numlvls > 0) { if (jpc_tsfb_analyze2(tsfb, a, JPC_CEILDIVPOW2(xstart, 1), JPC_CEILDIVPOW2(ystart, 1), JPC_CEILDIVPOW2( xstart + width, 1) - JPC_CEILDIVPOW2(xstart, 1), JPC_CEILDIVPOW2(ystart + height, 1) - JPC_CEILDIVPOW2(ystart, 1), stride, numlvls - 1)) { return -1; } } } return 0; } int jpc_tsfb_synthesize(jpc_tsfb_t *tsfb, jas_seq2d_t *a) { return (tsfb->numlvls > 0) ? jpc_tsfb_synthesize2(tsfb, jas_seq2d_getref(a, jas_seq2d_xstart(a), jas_seq2d_ystart(a)), jas_seq2d_xstart(a), jas_seq2d_ystart(a), jas_seq2d_width(a), jas_seq2d_height(a), jas_seq2d_rowstep(a), tsfb->numlvls - 1) : 0; } int jpc_tsfb_synthesize2(jpc_tsfb_t *tsfb, int *a, int xstart, int ystart, int width, int height, int stride, int numlvls) { if (numlvls > 0) { if (jpc_tsfb_synthesize2(tsfb, a, JPC_CEILDIVPOW2(xstart, 1), JPC_CEILDIVPOW2(ystart, 1), JPC_CEILDIVPOW2(xstart + width, 1) - JPC_CEILDIVPOW2(xstart, 1), JPC_CEILDIVPOW2(ystart + height, 1) - JPC_CEILDIVPOW2(ystart, 1), stride, numlvls - 1)) { return -1; } } if (width > 0 && height > 0) { if ((*tsfb->qmfb->synthesize)(a, xstart, ystart, width, height, stride)) { return -1; } } return 0; } int jpc_tsfb_getbands(jpc_tsfb_t *tsfb, uint_fast32_t xstart, uint_fast32_t ystart, uint_fast32_t xend, uint_fast32_t yend, jpc_tsfb_band_t *bands) { jpc_tsfb_band_t *band; band = bands; if (tsfb->numlvls > 0) { jpc_tsfb_getbands2(tsfb, xstart, ystart, xstart, ystart, xend, yend, &band, tsfb->numlvls); } else { band->xstart = xstart; band->ystart = ystart; band->xend = xend; band->yend = yend; band->locxstart = xstart; band->locystart = ystart; band->locxend = band->locxstart + band->xend - band->xstart; band->locyend = band->locystart + band->yend - band->ystart; band->orient = JPC_TSFB_LL; band->synenergywt = JPC_FIX_ONE; ++band; } return band - bands; } void jpc_tsfb_getbands2(jpc_tsfb_t *tsfb, int locxstart, int locystart, int xstart, int ystart, int xend, int yend, jpc_tsfb_band_t **bands, int numlvls) { int newxstart; int newystart; int newxend; int newyend; jpc_tsfb_band_t *band; newxstart = JPC_CEILDIVPOW2(xstart, 1); newystart = JPC_CEILDIVPOW2(ystart, 1); newxend = JPC_CEILDIVPOW2(xend, 1); newyend = JPC_CEILDIVPOW2(yend, 1); if (numlvls > 0) { jpc_tsfb_getbands2(tsfb, locxstart, locystart, newxstart, newystart, newxend, newyend, bands, numlvls - 1); band = *bands; band->xstart = JPC_FLOORDIVPOW2(xstart, 1); band->ystart = newystart; band->xend = JPC_FLOORDIVPOW2(xend, 1); band->yend = newyend; band->locxstart = locxstart + newxend - newxstart; band->locystart = locystart; band->locxend = band->locxstart + band->xend - band->xstart; band->locyend = band->locystart + band->yend - band->ystart; band->orient = JPC_TSFB_HL; band->synenergywt = jpc_dbltofix(tsfb->qmfb->hpenergywts[ tsfb->numlvls - numlvls] * tsfb->qmfb->lpenergywts[ tsfb->numlvls - numlvls]); ++(*bands); band = *bands; band->xstart = newxstart; band->ystart = JPC_FLOORDIVPOW2(ystart, 1); band->xend = newxend; band->yend = JPC_FLOORDIVPOW2(yend, 1); band->locxstart = locxstart; band->locystart = locystart + newyend - newystart; band->locxend = band->locxstart + band->xend - band->xstart; band->locyend = band->locystart + band->yend - band->ystart; band->orient = JPC_TSFB_LH; band->synenergywt = jpc_dbltofix(tsfb->qmfb->lpenergywts[ tsfb->numlvls - numlvls] * tsfb->qmfb->hpenergywts[ tsfb->numlvls - numlvls]); ++(*bands); band = *bands; band->xstart = JPC_FLOORDIVPOW2(xstart, 1); band->ystart = JPC_FLOORDIVPOW2(ystart, 1); band->xend = JPC_FLOORDIVPOW2(xend, 1); band->yend = JPC_FLOORDIVPOW2(yend, 1); band->locxstart = locxstart + newxend - newxstart; band->locystart = locystart + newyend - newystart; band->locxend = band->locxstart + band->xend - band->xstart; band->locyend = band->locystart + band->yend - band->ystart; band->orient = JPC_TSFB_HH; band->synenergywt = jpc_dbltofix(tsfb->qmfb->hpenergywts[ tsfb->numlvls - numlvls] * tsfb->qmfb->hpenergywts[ tsfb->numlvls - numlvls]); ++(*bands); } else { band = *bands; band->xstart = xstart; band->ystart = ystart; band->xend = xend; band->yend = yend; band->locxstart = locxstart; band->locystart = locystart; band->locxend = band->locxstart + band->xend - band->xstart; band->locyend = band->locystart + band->yend - band->ystart; band->orient = JPC_TSFB_LL; band->synenergywt = jpc_dbltofix(tsfb->qmfb->lpenergywts[ tsfb->numlvls - numlvls - 1] * tsfb->qmfb->lpenergywts[ tsfb->numlvls - numlvls - 1]); ++(*bands); } } jasper-1.900.1/src/libjasper/jpc/jpc_t2dec.h0000644000175000017500000000755010554235553017476 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 2 Decoder * * $Id$ */ #ifndef JPC_T2DEC_H #define JPC_T2DEC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_fix.h" #include "jasper/jas_stream.h" #include "jpc_bs.h" #include "jpc_dec.h" #include "jpc_mqdec.h" /******************************************************************************\ * Functions. \******************************************************************************/ /* Decode the packets for a tile-part. */ int jpc_dec_decodepkts(jpc_dec_t *dec, jas_stream_t *pkthdrstream, jas_stream_t *in); /* Create a packet iterator for the decoder. */ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile); #endif jasper-1.900.1/src/libjasper/jpc/jpc_mqenc.c0000644000175000017500000002574710554235553017603 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * MQ Arithmetic Encoder * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_stream.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jasper/jas_debug.h" #include "jpc_mqenc.h" /******************************************************************************\ * Macros \******************************************************************************/ #if defined(DEBUG) #define JPC_MQENC_CALL(n, x) \ ((jas_getdbglevel() >= (n)) ? ((void)(x)) : ((void)0)) #else #define JPC_MQENC_CALL(n, x) #endif #define jpc_mqenc_codemps9(areg, creg, ctreg, curctx, enc) \ { \ jpc_mqstate_t *state = *(curctx); \ (areg) -= state->qeval; \ if (!((areg) & 0x8000)) { \ if ((areg) < state->qeval) { \ (areg) = state->qeval; \ } else { \ (creg) += state->qeval; \ } \ *(curctx) = state->nmps; \ jpc_mqenc_renorme((areg), (creg), (ctreg), (enc)); \ } else { \ (creg) += state->qeval; \ } \ } #define jpc_mqenc_codelps2(areg, creg, ctreg, curctx, enc) \ { \ jpc_mqstate_t *state = *(curctx); \ (areg) -= state->qeval; \ if ((areg) < state->qeval) { \ (creg) += state->qeval; \ } else { \ (areg) = state->qeval; \ } \ *(curctx) = state->nlps; \ jpc_mqenc_renorme((areg), (creg), (ctreg), (enc)); \ } #define jpc_mqenc_renorme(areg, creg, ctreg, enc) \ { \ do { \ (areg) <<= 1; \ (creg) <<= 1; \ if (!--(ctreg)) { \ jpc_mqenc_byteout((areg), (creg), (ctreg), (enc)); \ } \ } while (!((areg) & 0x8000)); \ } #define jpc_mqenc_byteout(areg, creg, ctreg, enc) \ { \ if ((enc)->outbuf != 0xff) { \ if ((creg) & 0x8000000) { \ if (++((enc)->outbuf) == 0xff) { \ (creg) &= 0x7ffffff; \ jpc_mqenc_byteout2(enc); \ enc->outbuf = ((creg) >> 20) & 0xff; \ (creg) &= 0xfffff; \ (ctreg) = 7; \ } else { \ jpc_mqenc_byteout2(enc); \ enc->outbuf = ((creg) >> 19) & 0xff; \ (creg) &= 0x7ffff; \ (ctreg) = 8; \ } \ } else { \ jpc_mqenc_byteout2(enc); \ (enc)->outbuf = ((creg) >> 19) & 0xff; \ (creg) &= 0x7ffff; \ (ctreg) = 8; \ } \ } else { \ jpc_mqenc_byteout2(enc); \ (enc)->outbuf = ((creg) >> 20) & 0xff; \ (creg) &= 0xfffff; \ (ctreg) = 7; \ } \ } #define jpc_mqenc_byteout2(enc) \ { \ if (enc->outbuf >= 0) { \ if (jas_stream_putc(enc->out, (unsigned char)enc->outbuf) == EOF) { \ enc->err |= 1; \ } \ } \ enc->lastbyte = enc->outbuf; \ } /******************************************************************************\ * Local function protoypes. \******************************************************************************/ static void jpc_mqenc_setbits(jpc_mqenc_t *mqenc); /******************************************************************************\ * Code for creation and destruction of encoder. \******************************************************************************/ /* Create a MQ encoder. */ jpc_mqenc_t *jpc_mqenc_create(int maxctxs, jas_stream_t *out) { jpc_mqenc_t *mqenc; /* Allocate memory for the MQ encoder. */ if (!(mqenc = jas_malloc(sizeof(jpc_mqenc_t)))) { goto error; } mqenc->out = out; mqenc->maxctxs = maxctxs; /* Allocate memory for the per-context state information. */ if (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) { goto error; } /* Set the current context to the first one. */ mqenc->curctx = mqenc->ctxs; jpc_mqenc_init(mqenc); /* Initialize the per-context state information to something sane. */ jpc_mqenc_setctxs(mqenc, 0, 0); return mqenc; error: if (mqenc) { jpc_mqenc_destroy(mqenc); } return 0; } /* Destroy a MQ encoder. */ void jpc_mqenc_destroy(jpc_mqenc_t *mqenc) { if (mqenc->ctxs) { jas_free(mqenc->ctxs); } jas_free(mqenc); } /******************************************************************************\ * State initialization code. \******************************************************************************/ /* Initialize the coding state of a MQ encoder. */ void jpc_mqenc_init(jpc_mqenc_t *mqenc) { mqenc->areg = 0x8000; mqenc->outbuf = -1; mqenc->creg = 0; mqenc->ctreg = 12; mqenc->lastbyte = -1; mqenc->err = 0; } /* Initialize one or more contexts. */ void jpc_mqenc_setctxs(jpc_mqenc_t *mqenc, int numctxs, jpc_mqctx_t *ctxs) { jpc_mqstate_t **ctx; int n; ctx = mqenc->ctxs; n = JAS_MIN(mqenc->maxctxs, numctxs); while (--n >= 0) { *ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps]; ++ctx; ++ctxs; } n = mqenc->maxctxs - numctxs; while (--n >= 0) { *ctx = &jpc_mqstates[0]; ++ctx; } } /* Get the coding state for a MQ encoder. */ void jpc_mqenc_getstate(jpc_mqenc_t *mqenc, jpc_mqencstate_t *state) { state->areg = mqenc->areg; state->creg = mqenc->creg; state->ctreg = mqenc->ctreg; state->lastbyte = mqenc->lastbyte; } /******************************************************************************\ * Code for coding symbols. \******************************************************************************/ /* Encode a bit. */ int jpc_mqenc_putbit_func(jpc_mqenc_t *mqenc, int bit) { const jpc_mqstate_t *state; JAS_DBGLOG(100, ("jpc_mqenc_putbit(%p, %d)\n", mqenc, bit)); JPC_MQENC_CALL(100, jpc_mqenc_dump(mqenc, stderr)); state = *(mqenc->curctx); if (state->mps == bit) { /* Apply the CODEMPS algorithm as defined in the standard. */ mqenc->areg -= state->qeval; if (!(mqenc->areg & 0x8000)) { jpc_mqenc_codemps2(mqenc); } else { mqenc->creg += state->qeval; } } else { /* Apply the CODELPS algorithm as defined in the standard. */ jpc_mqenc_codelps2(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc->curctx, mqenc); } return jpc_mqenc_error(mqenc) ? (-1) : 0; } int jpc_mqenc_codemps2(jpc_mqenc_t *mqenc) { /* Note: This function only performs part of the work associated with the CODEMPS algorithm from the standard. Some of the work is also performed by the caller. */ jpc_mqstate_t *state = *(mqenc->curctx); if (mqenc->areg < state->qeval) { mqenc->areg = state->qeval; } else { mqenc->creg += state->qeval; } *mqenc->curctx = state->nmps; jpc_mqenc_renorme(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc); return jpc_mqenc_error(mqenc) ? (-1) : 0; } int jpc_mqenc_codelps(jpc_mqenc_t *mqenc) { jpc_mqenc_codelps2(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc->curctx, mqenc); return jpc_mqenc_error(mqenc) ? (-1) : 0; } /******************************************************************************\ * Miscellaneous code. \******************************************************************************/ /* Terminate the code word. */ int jpc_mqenc_flush(jpc_mqenc_t *mqenc, int termmode) { int_fast16_t k; switch (termmode) { case JPC_MQENC_PTERM: k = 11 - mqenc->ctreg + 1; while (k > 0) { mqenc->creg <<= mqenc->ctreg; mqenc->ctreg = 0; jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc); k -= mqenc->ctreg; } if (mqenc->outbuf != 0xff) { jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc); } break; case JPC_MQENC_DEFTERM: jpc_mqenc_setbits(mqenc); mqenc->creg <<= mqenc->ctreg; jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc); mqenc->creg <<= mqenc->ctreg; jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc); if (mqenc->outbuf != 0xff) { jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc); } break; default: abort(); break; } return 0; } static void jpc_mqenc_setbits(jpc_mqenc_t *mqenc) { uint_fast32_t tmp = mqenc->creg + mqenc->areg; mqenc->creg |= 0xffff; if (mqenc->creg >= tmp) { mqenc->creg -= 0x8000; } } /* Dump a MQ encoder to a stream for debugging. */ int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out) { fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n", mqenc->areg, mqenc->creg, mqenc->ctreg); fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n", *mqenc->curctx - jpc_mqstates, (*mqenc->curctx)->mps, (*mqenc->curctx)->qeval); return 0; } jasper-1.900.1/src/libjasper/jpc/jpc_math.h0000644000175000017500000001023510554235553017420 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JPC_MATH_H #define JPC_MATH_H /******************************************************************************\ * Includes \******************************************************************************/ #include /******************************************************************************\ * Macros \******************************************************************************/ /* Compute the floor of the quotient of two integers. */ #define JPC_FLOORDIV(x, y) ((x) / (y)) /* Compute the ceiling of the quotient of two integers. */ #define JPC_CEILDIV(x, y) (((x) + (y) - 1) / (y)) /* Compute the floor of (x / 2^y). */ #define JPC_FLOORDIVPOW2(x, y) ((x) >> (y)) /* Compute the ceiling of (x / 2^y). */ #define JPC_CEILDIVPOW2(x, y) (((x) + (1 << (y)) - 1) >> (y)) /******************************************************************************\ * Functions. \******************************************************************************/ /* Calculate the bit position of the first leading one in a nonnegative integer. */ int jpc_firstone(int x); /* Calculate the integer quantity floor(log2(x)), where x is a positive integer. */ int jpc_floorlog2(int x); #endif jasper-1.900.1/src/libjasper/jpc/jpc_mqcod.c0000644000175000017500000002054510554235553017572 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * MQ Arithmetic Coder * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_malloc.h" #include "jpc_mqcod.h" /******************************************************************************\ * Data. \******************************************************************************/ /* MQ coder per-state information. */ jpc_mqstate_t jpc_mqstates[47 * 2] = { {0x5601, 0, &jpc_mqstates[ 2], &jpc_mqstates[ 3]}, {0x5601, 1, &jpc_mqstates[ 3], &jpc_mqstates[ 2]}, {0x3401, 0, &jpc_mqstates[ 4], &jpc_mqstates[12]}, {0x3401, 1, &jpc_mqstates[ 5], &jpc_mqstates[13]}, {0x1801, 0, &jpc_mqstates[ 6], &jpc_mqstates[18]}, {0x1801, 1, &jpc_mqstates[ 7], &jpc_mqstates[19]}, {0x0ac1, 0, &jpc_mqstates[ 8], &jpc_mqstates[24]}, {0x0ac1, 1, &jpc_mqstates[ 9], &jpc_mqstates[25]}, {0x0521, 0, &jpc_mqstates[10], &jpc_mqstates[58]}, {0x0521, 1, &jpc_mqstates[11], &jpc_mqstates[59]}, {0x0221, 0, &jpc_mqstates[76], &jpc_mqstates[66]}, {0x0221, 1, &jpc_mqstates[77], &jpc_mqstates[67]}, {0x5601, 0, &jpc_mqstates[14], &jpc_mqstates[13]}, {0x5601, 1, &jpc_mqstates[15], &jpc_mqstates[12]}, {0x5401, 0, &jpc_mqstates[16], &jpc_mqstates[28]}, {0x5401, 1, &jpc_mqstates[17], &jpc_mqstates[29]}, {0x4801, 0, &jpc_mqstates[18], &jpc_mqstates[28]}, {0x4801, 1, &jpc_mqstates[19], &jpc_mqstates[29]}, {0x3801, 0, &jpc_mqstates[20], &jpc_mqstates[28]}, {0x3801, 1, &jpc_mqstates[21], &jpc_mqstates[29]}, {0x3001, 0, &jpc_mqstates[22], &jpc_mqstates[34]}, {0x3001, 1, &jpc_mqstates[23], &jpc_mqstates[35]}, {0x2401, 0, &jpc_mqstates[24], &jpc_mqstates[36]}, {0x2401, 1, &jpc_mqstates[25], &jpc_mqstates[37]}, {0x1c01, 0, &jpc_mqstates[26], &jpc_mqstates[40]}, {0x1c01, 1, &jpc_mqstates[27], &jpc_mqstates[41]}, {0x1601, 0, &jpc_mqstates[58], &jpc_mqstates[42]}, {0x1601, 1, &jpc_mqstates[59], &jpc_mqstates[43]}, {0x5601, 0, &jpc_mqstates[30], &jpc_mqstates[29]}, {0x5601, 1, &jpc_mqstates[31], &jpc_mqstates[28]}, {0x5401, 0, &jpc_mqstates[32], &jpc_mqstates[28]}, {0x5401, 1, &jpc_mqstates[33], &jpc_mqstates[29]}, {0x5101, 0, &jpc_mqstates[34], &jpc_mqstates[30]}, {0x5101, 1, &jpc_mqstates[35], &jpc_mqstates[31]}, {0x4801, 0, &jpc_mqstates[36], &jpc_mqstates[32]}, {0x4801, 1, &jpc_mqstates[37], &jpc_mqstates[33]}, {0x3801, 0, &jpc_mqstates[38], &jpc_mqstates[34]}, {0x3801, 1, &jpc_mqstates[39], &jpc_mqstates[35]}, {0x3401, 0, &jpc_mqstates[40], &jpc_mqstates[36]}, {0x3401, 1, &jpc_mqstates[41], &jpc_mqstates[37]}, {0x3001, 0, &jpc_mqstates[42], &jpc_mqstates[38]}, {0x3001, 1, &jpc_mqstates[43], &jpc_mqstates[39]}, {0x2801, 0, &jpc_mqstates[44], &jpc_mqstates[38]}, {0x2801, 1, &jpc_mqstates[45], &jpc_mqstates[39]}, {0x2401, 0, &jpc_mqstates[46], &jpc_mqstates[40]}, {0x2401, 1, &jpc_mqstates[47], &jpc_mqstates[41]}, {0x2201, 0, &jpc_mqstates[48], &jpc_mqstates[42]}, {0x2201, 1, &jpc_mqstates[49], &jpc_mqstates[43]}, {0x1c01, 0, &jpc_mqstates[50], &jpc_mqstates[44]}, {0x1c01, 1, &jpc_mqstates[51], &jpc_mqstates[45]}, {0x1801, 0, &jpc_mqstates[52], &jpc_mqstates[46]}, {0x1801, 1, &jpc_mqstates[53], &jpc_mqstates[47]}, {0x1601, 0, &jpc_mqstates[54], &jpc_mqstates[48]}, {0x1601, 1, &jpc_mqstates[55], &jpc_mqstates[49]}, {0x1401, 0, &jpc_mqstates[56], &jpc_mqstates[50]}, {0x1401, 1, &jpc_mqstates[57], &jpc_mqstates[51]}, {0x1201, 0, &jpc_mqstates[58], &jpc_mqstates[52]}, {0x1201, 1, &jpc_mqstates[59], &jpc_mqstates[53]}, {0x1101, 0, &jpc_mqstates[60], &jpc_mqstates[54]}, {0x1101, 1, &jpc_mqstates[61], &jpc_mqstates[55]}, {0x0ac1, 0, &jpc_mqstates[62], &jpc_mqstates[56]}, {0x0ac1, 1, &jpc_mqstates[63], &jpc_mqstates[57]}, {0x09c1, 0, &jpc_mqstates[64], &jpc_mqstates[58]}, {0x09c1, 1, &jpc_mqstates[65], &jpc_mqstates[59]}, {0x08a1, 0, &jpc_mqstates[66], &jpc_mqstates[60]}, {0x08a1, 1, &jpc_mqstates[67], &jpc_mqstates[61]}, {0x0521, 0, &jpc_mqstates[68], &jpc_mqstates[62]}, {0x0521, 1, &jpc_mqstates[69], &jpc_mqstates[63]}, {0x0441, 0, &jpc_mqstates[70], &jpc_mqstates[64]}, {0x0441, 1, &jpc_mqstates[71], &jpc_mqstates[65]}, {0x02a1, 0, &jpc_mqstates[72], &jpc_mqstates[66]}, {0x02a1, 1, &jpc_mqstates[73], &jpc_mqstates[67]}, {0x0221, 0, &jpc_mqstates[74], &jpc_mqstates[68]}, {0x0221, 1, &jpc_mqstates[75], &jpc_mqstates[69]}, {0x0141, 0, &jpc_mqstates[76], &jpc_mqstates[70]}, {0x0141, 1, &jpc_mqstates[77], &jpc_mqstates[71]}, {0x0111, 0, &jpc_mqstates[78], &jpc_mqstates[72]}, {0x0111, 1, &jpc_mqstates[79], &jpc_mqstates[73]}, {0x0085, 0, &jpc_mqstates[80], &jpc_mqstates[74]}, {0x0085, 1, &jpc_mqstates[81], &jpc_mqstates[75]}, {0x0049, 0, &jpc_mqstates[82], &jpc_mqstates[76]}, {0x0049, 1, &jpc_mqstates[83], &jpc_mqstates[77]}, {0x0025, 0, &jpc_mqstates[84], &jpc_mqstates[78]}, {0x0025, 1, &jpc_mqstates[85], &jpc_mqstates[79]}, {0x0015, 0, &jpc_mqstates[86], &jpc_mqstates[80]}, {0x0015, 1, &jpc_mqstates[87], &jpc_mqstates[81]}, {0x0009, 0, &jpc_mqstates[88], &jpc_mqstates[82]}, {0x0009, 1, &jpc_mqstates[89], &jpc_mqstates[83]}, {0x0005, 0, &jpc_mqstates[90], &jpc_mqstates[84]}, {0x0005, 1, &jpc_mqstates[91], &jpc_mqstates[85]}, {0x0001, 0, &jpc_mqstates[90], &jpc_mqstates[86]}, {0x0001, 1, &jpc_mqstates[91], &jpc_mqstates[87]}, {0x5601, 0, &jpc_mqstates[92], &jpc_mqstates[92]}, {0x5601, 1, &jpc_mqstates[93], &jpc_mqstates[93]}, }; jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c0000644000175000017500000021010610554235553017406 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Quadrature Mirror-Image Filter Bank (QMFB) Library * * $Id$ */ /******************************************************************************\ * \******************************************************************************/ #undef WT_LENONE /* This is not needed due to normalization. */ #define WT_DOSCALE /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_fix.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jpc_qmfb.h" #include "jpc_tsfb.h" #include "jpc_math.h" /******************************************************************************\ * \******************************************************************************/ #define QMFB_SPLITBUFSIZE 4096 #define QMFB_JOINBUFSIZE 4096 int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height, int stride); int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height, int stride); int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height, int stride); int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width, int height, int stride); void jpc_ft_fwdlift_row(jpc_fix_t *a, int numcols, int parity); void jpc_ft_fwdlift_col(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_ft_fwdlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_ft_fwdlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity); void jpc_ft_invlift_row(jpc_fix_t *a, int numcols, int parity); void jpc_ft_invlift_col(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_ft_invlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_ft_invlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity); void jpc_ns_fwdlift_row(jpc_fix_t *a, int numcols, int parity); void jpc_ns_fwdlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_ns_fwdlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity); void jpc_ns_invlift_row(jpc_fix_t *a, int numcols, int parity); void jpc_ns_invlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_ns_invlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity); void jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity); void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_qmfb_split_colgrp(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_qmfb_split_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity); void jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity); void jpc_qmfb_join_col(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride, int parity); void jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity); double jpc_ft_lpenergywts[32] = { 1.2247448713915889, 1.6583123951776999, 2.3184046238739260, 3.2691742076555053, 4.6199296531440819, 6.5323713152269596, 9.2377452606141937, 13.0639951297449581, 18.4752262333915667, 26.1278968190610392, 36.9504194305524791, 52.2557819580462777, 73.9008347315741645, 104.5115624560829133, 147.8016689469569656, 209.0231247296646018, 295.6033378293900000, 418.0462494347059419, 591.2066756503630813, 836.0924988714708661, /* approximations */ 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661, 836.0924988714708661 }; double jpc_ft_hpenergywts[32] = { 0.8477912478906585, 0.9601432184835760, 1.2593401049756179, 1.7444107171191079, 2.4538713036750726, 3.4656517695088755, 4.8995276398597856, 6.9283970402160842, 9.7980274940131444, 13.8564306871112652, 19.5959265076535587, 27.7128159494245487, 39.1918369552045860, 55.4256262207444053, 78.3836719028959124, 110.8512517317256822, 156.7673435548526868, 221.7025033739244293, 313.5346870787551552, 443.4050067351659550, /* approximations */ 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550, 443.4050067351659550 }; double jpc_ns_lpenergywts[32] = { 1.4021081679297411, 2.0303718560817923, 2.9011625562785555, 4.1152851751758002, 5.8245108637728071, 8.2387599345725171, 11.6519546479210838, 16.4785606470644375, 23.3042776444606794, 32.9572515613740435, 46.6086013487782793, 65.9145194076860861, 93.2172084551803977, 131.8290408510004283, 186.4344176300625691, 263.6580819564562148, 372.8688353500955373, 527.3161639447193920, 745.7376707114038936, 1054.6323278917823245, /* approximations follow */ 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245, 1054.6323278917823245 }; double jpc_ns_hpenergywts[32] = { 1.4425227650161456, 1.9669426082455688, 2.8839248082788891, 4.1475208393432981, 5.8946497530677817, 8.3471789178590949, 11.8086046551047463, 16.7012780415647804, 23.6196657032246620, 33.4034255108592362, 47.2396388881632632, 66.8069597416714061, 94.4793162154500692, 133.6139330736999113, 188.9586372358249378, 267.2278678461869390, 377.9172750722391356, 534.4557359047058753, 755.8345502191498326, 1068.9114718353569060, /* approximations follow */ 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060, 1068.9114718353569060 }; jpc_qmfb2d_t jpc_ft_qmfb2d = { jpc_ft_analyze, jpc_ft_synthesize, jpc_ft_lpenergywts, jpc_ft_hpenergywts }; jpc_qmfb2d_t jpc_ns_qmfb2d = { jpc_ns_analyze, jpc_ns_synthesize, jpc_ns_lpenergywts, jpc_ns_hpenergywts }; /******************************************************************************\ * generic \******************************************************************************/ void jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity) { int bufsize = JPC_CEILDIVPOW2(numcols, 1); #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; #else jpc_fix_t splitbuf[bufsize]; #endif jpc_fix_t *buf = splitbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; register int m; int hstartcol; #if !defined(HAVE_VLA) /* Get a buffer. */ if (bufsize > QMFB_SPLITBUFSIZE) { if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide in this case. */ abort(); } } #endif if (numcols >= 2) { hstartcol = (numcols + 1 - parity) >> 1; m = (parity) ? hstartcol : (numcols - hstartcol); /* Save the samples destined for the highpass channel. */ n = m; dstptr = buf; srcptr = &a[1 - parity]; while (n-- > 0) { *dstptr = *srcptr; ++dstptr; srcptr += 2; } /* Copy the appropriate samples into the lowpass channel. */ dstptr = &a[1 - parity]; srcptr = &a[2 - parity]; n = numcols - m - (!parity); while (n-- > 0) { *dstptr = *srcptr; ++dstptr; srcptr += 2; } /* Copy the saved samples into the highpass channel. */ dstptr = &a[hstartcol]; srcptr = buf; n = m; while (n-- > 0) { *dstptr = *srcptr; ++dstptr; ++srcptr; } } #if !defined(HAVE_VLA) /* If the split buffer was allocated on the heap, free this memory. */ if (buf != splitbuf) { jas_free(buf); } #endif } void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; #else jpc_fix_t splitbuf[bufsize]; #endif jpc_fix_t *buf = splitbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; register int m; int hstartcol; #if !defined(HAVE_VLA) /* Get a buffer. */ if (bufsize > QMFB_SPLITBUFSIZE) { if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide in this case. */ abort(); } } #endif if (numrows >= 2) { hstartcol = (numrows + 1 - parity) >> 1; m = (parity) ? hstartcol : (numrows - hstartcol); /* Save the samples destined for the highpass channel. */ n = m; dstptr = buf; srcptr = &a[(1 - parity) * stride]; while (n-- > 0) { *dstptr = *srcptr; ++dstptr; srcptr += stride << 1; } /* Copy the appropriate samples into the lowpass channel. */ dstptr = &a[(1 - parity) * stride]; srcptr = &a[(2 - parity) * stride]; n = numrows - m - (!parity); while (n-- > 0) { *dstptr = *srcptr; dstptr += stride; srcptr += stride << 1; } /* Copy the saved samples into the highpass channel. */ dstptr = &a[hstartcol * stride]; srcptr = buf; n = m; while (n-- > 0) { *dstptr = *srcptr; dstptr += stride; ++srcptr; } } #if !defined(HAVE_VLA) /* If the split buffer was allocated on the heap, free this memory. */ if (buf != splitbuf) { jas_free(buf); } #endif } void jpc_qmfb_split_colgrp(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; #else jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE]; #endif jpc_fix_t *buf = splitbuf; jpc_fix_t *srcptr; jpc_fix_t *dstptr; register jpc_fix_t *srcptr2; register jpc_fix_t *dstptr2; register int n; register int i; int m; int hstartcol; #if !defined(HAVE_VLA) /* Get a buffer. */ if (bufsize > QMFB_SPLITBUFSIZE) { if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide in this case. */ abort(); } } #endif if (numrows >= 2) { hstartcol = (numrows + 1 - parity) >> 1; m = (parity) ? hstartcol : (numrows - hstartcol); /* Save the samples destined for the highpass channel. */ n = m; dstptr = buf; srcptr = &a[(1 - parity) * stride]; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += JPC_QMFB_COLGRPSIZE; srcptr += stride << 1; } /* Copy the appropriate samples into the lowpass channel. */ dstptr = &a[(1 - parity) * stride]; srcptr = &a[(2 - parity) * stride]; n = numrows - m - (!parity); while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += stride; srcptr += stride << 1; } /* Copy the saved samples into the highpass channel. */ dstptr = &a[hstartcol * stride]; srcptr = buf; n = m; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += stride; srcptr += JPC_QMFB_COLGRPSIZE; } } #if !defined(HAVE_VLA) /* If the split buffer was allocated on the heap, free this memory. */ if (buf != splitbuf) { jas_free(buf); } #endif } void jpc_qmfb_split_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; #else jpc_fix_t splitbuf[bufsize * numcols]; #endif jpc_fix_t *buf = splitbuf; jpc_fix_t *srcptr; jpc_fix_t *dstptr; register jpc_fix_t *srcptr2; register jpc_fix_t *dstptr2; register int n; register int i; int m; int hstartcol; #if !defined(HAVE_VLA) /* Get a buffer. */ if (bufsize > QMFB_SPLITBUFSIZE) { if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide in this case. */ abort(); } } #endif if (numrows >= 2) { hstartcol = (numrows + 1 - parity) >> 1; m = (parity) ? hstartcol : (numrows - hstartcol); /* Save the samples destined for the highpass channel. */ n = m; dstptr = buf; srcptr = &a[(1 - parity) * stride]; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < numcols; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += numcols; srcptr += stride << 1; } /* Copy the appropriate samples into the lowpass channel. */ dstptr = &a[(1 - parity) * stride]; srcptr = &a[(2 - parity) * stride]; n = numrows - m - (!parity); while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < numcols; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += stride; srcptr += stride << 1; } /* Copy the saved samples into the highpass channel. */ dstptr = &a[hstartcol * stride]; srcptr = buf; n = m; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < numcols; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += stride; srcptr += numcols; } } #if !defined(HAVE_VLA) /* If the split buffer was allocated on the heap, free this memory. */ if (buf != splitbuf) { jas_free(buf); } #endif } void jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity) { int bufsize = JPC_CEILDIVPOW2(numcols, 1); #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; #else jpc_fix_t joinbuf[bufsize]; #endif jpc_fix_t *buf = joinbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; int hstartcol; #if !defined(HAVE_VLA) /* Allocate memory for the join buffer from the heap. */ if (bufsize > QMFB_JOINBUFSIZE) { if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide. */ abort(); } } #endif hstartcol = (numcols + 1 - parity) >> 1; /* Save the samples from the lowpass channel. */ n = hstartcol; srcptr = &a[0]; dstptr = buf; while (n-- > 0) { *dstptr = *srcptr; ++srcptr; ++dstptr; } /* Copy the samples from the highpass channel into place. */ srcptr = &a[hstartcol]; dstptr = &a[1 - parity]; n = numcols - hstartcol; while (n-- > 0) { *dstptr = *srcptr; dstptr += 2; ++srcptr; } /* Copy the samples from the lowpass channel into place. */ srcptr = buf; dstptr = &a[parity]; n = hstartcol; while (n-- > 0) { *dstptr = *srcptr; dstptr += 2; ++srcptr; } #if !defined(HAVE_VLA) /* If the join buffer was allocated on the heap, free this memory. */ if (buf != joinbuf) { jas_free(buf); } #endif } void jpc_qmfb_join_col(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; #else jpc_fix_t joinbuf[bufsize]; #endif jpc_fix_t *buf = joinbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; int hstartcol; #if !defined(HAVE_VLA) /* Allocate memory for the join buffer from the heap. */ if (bufsize > QMFB_JOINBUFSIZE) { if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide. */ abort(); } } #endif hstartcol = (numrows + 1 - parity) >> 1; /* Save the samples from the lowpass channel. */ n = hstartcol; srcptr = &a[0]; dstptr = buf; while (n-- > 0) { *dstptr = *srcptr; srcptr += stride; ++dstptr; } /* Copy the samples from the highpass channel into place. */ srcptr = &a[hstartcol * stride]; dstptr = &a[(1 - parity) * stride]; n = numrows - hstartcol; while (n-- > 0) { *dstptr = *srcptr; dstptr += 2 * stride; srcptr += stride; } /* Copy the samples from the lowpass channel into place. */ srcptr = buf; dstptr = &a[parity * stride]; n = hstartcol; while (n-- > 0) { *dstptr = *srcptr; dstptr += 2 * stride; ++srcptr; } #if !defined(HAVE_VLA) /* If the join buffer was allocated on the heap, free this memory. */ if (buf != joinbuf) { jas_free(buf); } #endif } void jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; #else jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE]; #endif jpc_fix_t *buf = joinbuf; jpc_fix_t *srcptr; jpc_fix_t *dstptr; register jpc_fix_t *srcptr2; register jpc_fix_t *dstptr2; register int n; register int i; int hstartcol; #if !defined(HAVE_VLA) /* Allocate memory for the join buffer from the heap. */ if (bufsize > QMFB_JOINBUFSIZE) { if (!(buf = jas_malloc(bufsize * JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide. */ abort(); } } #endif hstartcol = (numrows + 1 - parity) >> 1; /* Save the samples from the lowpass channel. */ n = hstartcol; srcptr = &a[0]; dstptr = buf; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } srcptr += stride; dstptr += JPC_QMFB_COLGRPSIZE; } /* Copy the samples from the highpass channel into place. */ srcptr = &a[hstartcol * stride]; dstptr = &a[(1 - parity) * stride]; n = numrows - hstartcol; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += 2 * stride; srcptr += stride; } /* Copy the samples from the lowpass channel into place. */ srcptr = buf; dstptr = &a[parity * stride]; n = hstartcol; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += 2 * stride; srcptr += JPC_QMFB_COLGRPSIZE; } #if !defined(HAVE_VLA) /* If the join buffer was allocated on the heap, free this memory. */ if (buf != joinbuf) { jas_free(buf); } #endif } void jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; #else jpc_fix_t joinbuf[bufsize * numcols]; #endif jpc_fix_t *buf = joinbuf; jpc_fix_t *srcptr; jpc_fix_t *dstptr; register jpc_fix_t *srcptr2; register jpc_fix_t *dstptr2; register int n; register int i; int hstartcol; #if !defined(HAVE_VLA) /* Allocate memory for the join buffer from the heap. */ if (bufsize > QMFB_JOINBUFSIZE) { if (!(buf = jas_malloc(bufsize * numcols * sizeof(jpc_fix_t)))) { /* We have no choice but to commit suicide. */ abort(); } } #endif hstartcol = (numrows + 1 - parity) >> 1; /* Save the samples from the lowpass channel. */ n = hstartcol; srcptr = &a[0]; dstptr = buf; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < numcols; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } srcptr += stride; dstptr += numcols; } /* Copy the samples from the highpass channel into place. */ srcptr = &a[hstartcol * stride]; dstptr = &a[(1 - parity) * stride]; n = numrows - hstartcol; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < numcols; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += 2 * stride; srcptr += stride; } /* Copy the samples from the lowpass channel into place. */ srcptr = buf; dstptr = &a[parity * stride]; n = hstartcol; while (n-- > 0) { dstptr2 = dstptr; srcptr2 = srcptr; for (i = 0; i < numcols; ++i) { *dstptr2 = *srcptr2; ++dstptr2; ++srcptr2; } dstptr += 2 * stride; srcptr += numcols; } #if !defined(HAVE_VLA) /* If the join buffer was allocated on the heap, free this memory. */ if (buf != joinbuf) { jas_free(buf); } #endif } /******************************************************************************\ * 5/3 transform \******************************************************************************/ void jpc_ft_fwdlift_row(jpc_fix_t *a, int numcols, int parity) { register jpc_fix_t *lptr; register jpc_fix_t *hptr; register int n; int llen; llen = (numcols + 1 - parity) >> 1; if (numcols > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (parity) { hptr[0] -= lptr[0]; ++hptr; } n = numcols - llen - parity - (parity == (numcols & 1)); while (n-- > 0) { hptr[0] -= (lptr[0] + lptr[1]) >> 1; ++hptr; ++lptr; } if (parity == (numcols & 1)) { hptr[0] -= lptr[0]; } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (!parity) { lptr[0] += (hptr[0] + 1) >> 1; ++lptr; } n = llen - (!parity) - (parity != (numcols & 1)); while (n-- > 0) { lptr[0] += (hptr[0] + hptr[1] + 2) >> 2; ++lptr; ++hptr; } if (parity != (numcols & 1)) { lptr[0] += (hptr[0] + 1) >> 1; } } else { if (parity) { lptr = &a[0]; lptr[0] <<= 1; } } } void jpc_ft_fwdlift_col(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; #if 0 register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int i; #endif register int n; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { hptr[0] -= lptr[0]; hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { hptr[0] -= (lptr[0] + lptr[stride]) >> 1; hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { hptr[0] -= lptr[0]; } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr[0] += (hptr[0] + 1) >> 1; lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr[0] += (hptr[0] + hptr[stride] + 2) >> 2; lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr[0] += (hptr[0] + 1) >> 1; } } else { if (parity) { lptr = &a[0]; lptr[0] <<= 1; } } } void jpc_ft_fwdlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] -= lptr2[0]; ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] -= (lptr2[0] + lptr2[stride]) >> 1; ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] -= lptr2[0]; ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] += (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] += (hptr2[0] + hptr2[stride] + 2) >> 2; ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] += (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } } } else { if (parity) { lptr2 = &a[0]; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] <<= 1; ++lptr2; } } } } void jpc_ft_fwdlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] -= lptr2[0]; ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] -= (lptr2[0] + lptr2[stride]) >> 1; ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] -= lptr2[0]; ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { lptr2[0] += (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { lptr2[0] += (hptr2[0] + hptr2[stride] + 2) >> 2; ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { lptr2[0] += (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } } } else { if (parity) { lptr2 = &a[0]; for (i = 0; i < numcols; ++i) { lptr2[0] <<= 1; ++lptr2; } } } } void jpc_ft_invlift_row(jpc_fix_t *a, int numcols, int parity) { register jpc_fix_t *lptr; register jpc_fix_t *hptr; register int n; int llen; llen = (numcols + 1 - parity) >> 1; if (numcols > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (!parity) { lptr[0] -= (hptr[0] + 1) >> 1; ++lptr; } n = llen - (!parity) - (parity != (numcols & 1)); while (n-- > 0) { lptr[0] -= (hptr[0] + hptr[1] + 2) >> 2; ++lptr; ++hptr; } if (parity != (numcols & 1)) { lptr[0] -= (hptr[0] + 1) >> 1; } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (parity) { hptr[0] += lptr[0]; ++hptr; } n = numcols - llen - parity - (parity == (numcols & 1)); while (n-- > 0) { hptr[0] += (lptr[0] + lptr[1]) >> 1; ++hptr; ++lptr; } if (parity == (numcols & 1)) { hptr[0] += lptr[0]; } } else { if (parity) { lptr = &a[0]; lptr[0] >>= 1; } } } void jpc_ft_invlift_col(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; #if 0 register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int i; #endif register int n; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr[0] -= (hptr[0] + 1) >> 1; lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr[0] -= (hptr[0] + hptr[stride] + 2) >> 2; lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr[0] -= (hptr[0] + 1) >> 1; } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { hptr[0] += lptr[0]; hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { hptr[0] += (lptr[0] + lptr[stride]) >> 1; hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { hptr[0] += lptr[0]; } } else { if (parity) { lptr = &a[0]; lptr[0] >>= 1; } } } void jpc_ft_invlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] -= (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] -= (hptr2[0] + hptr2[stride] + 2) >> 2; ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] -= (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] += lptr2[0]; ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] += (lptr2[0] + lptr2[stride]) >> 1; ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] += lptr2[0]; ++lptr2; ++hptr2; } } } else { if (parity) { lptr2 = &a[0]; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] >>= 1; ++lptr2; } } } } void jpc_ft_invlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { lptr2[0] -= (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { lptr2[0] -= (hptr2[0] + hptr2[stride] + 2) >> 2; ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { lptr2[0] -= (hptr2[0] + 1) >> 1; ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] += lptr2[0]; ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] += (lptr2[0] + lptr2[stride]) >> 1; ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] += lptr2[0]; ++lptr2; ++hptr2; } } } else { if (parity) { lptr2 = &a[0]; for (i = 0; i < numcols; ++i) { lptr2[0] >>= 1; ++lptr2; } } } } int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height, int stride) { int numrows = height; int numcols = width; int rowparity = ystart & 1; int colparity = xstart & 1; int i; jpc_fix_t *startptr; int maxcols; maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE; startptr = &a[0]; for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) { jpc_qmfb_split_colgrp(startptr, numrows, stride, rowparity); jpc_ft_fwdlift_colgrp(startptr, numrows, stride, rowparity); startptr += JPC_QMFB_COLGRPSIZE; } if (maxcols < numcols) { jpc_qmfb_split_colres(startptr, numrows, numcols - maxcols, stride, rowparity); jpc_ft_fwdlift_colres(startptr, numrows, numcols - maxcols, stride, rowparity); } startptr = &a[0]; for (i = 0; i < numrows; ++i) { jpc_qmfb_split_row(startptr, numcols, colparity); jpc_ft_fwdlift_row(startptr, numcols, colparity); startptr += stride; } return 0; } int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height, int stride) { int numrows = height; int numcols = width; int rowparity = ystart & 1; int colparity = xstart & 1; int maxcols; jpc_fix_t *startptr; int i; startptr = &a[0]; for (i = 0; i < numrows; ++i) { jpc_ft_invlift_row(startptr, numcols, colparity); jpc_qmfb_join_row(startptr, numcols, colparity); startptr += stride; } maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE; startptr = &a[0]; for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) { jpc_ft_invlift_colgrp(startptr, numrows, stride, rowparity); jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity); startptr += JPC_QMFB_COLGRPSIZE; } if (maxcols < numcols) { jpc_ft_invlift_colres(startptr, numrows, numcols - maxcols, stride, rowparity); jpc_qmfb_join_colres(startptr, numrows, numcols - maxcols, stride, rowparity); } return 0; } /******************************************************************************\ * 9/7 transform \******************************************************************************/ #define ALPHA (-1.586134342059924) #define BETA (-0.052980118572961) #define GAMMA (0.882911075530934) #define DELTA (0.443506852043971) #define LGAIN (1.0 / 1.23017410558578) #define HGAIN (1.0 / 1.62578613134411) void jpc_ns_fwdlift_row(jpc_fix_t *a, int numcols, int parity) { register jpc_fix_t *lptr; register jpc_fix_t *hptr; register int n; int llen; llen = (numcols + 1 - parity) >> 1; if (numcols > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (parity) { jpc_fix_pluseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr[0])); ++hptr; } n = numcols - llen - parity - (parity == (numcols & 1)); while (n-- > 0) { jpc_fix_pluseq(hptr[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr[0], lptr[1]))); ++hptr; ++lptr; } if (parity == (numcols & 1)) { jpc_fix_pluseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr[0])); } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (!parity) { jpc_fix_pluseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr[0])); ++lptr; } n = llen - (!parity) - (parity != (numcols & 1)); while (n-- > 0) { jpc_fix_pluseq(lptr[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr[0], hptr[1]))); ++lptr; ++hptr; } if (parity != (numcols & 1)) { jpc_fix_pluseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr[0])); } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (parity) { jpc_fix_pluseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr[0])); ++hptr; } n = numcols - llen - parity - (parity == (numcols & 1)); while (n-- > 0) { jpc_fix_pluseq(hptr[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr[0], lptr[1]))); ++hptr; ++lptr; } if (parity == (numcols & 1)) { jpc_fix_pluseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr[0])); } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (!parity) { jpc_fix_pluseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr[0])); ++lptr; } n = llen - (!parity) - (parity != (numcols & 1)); while (n-- > 0) { jpc_fix_pluseq(lptr[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr[0], hptr[1]))); ++lptr; ++hptr; } if (parity != (numcols & 1)) { jpc_fix_pluseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr[0])); } /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr[0] = jpc_fix_mul(lptr[0], jpc_dbltofix(LGAIN)); ++lptr; } hptr = &a[llen]; n = numcols - llen; while (n-- > 0) { hptr[0] = jpc_fix_mul(hptr[0], jpc_dbltofix(HGAIN)); ++hptr; } #endif } else { #if defined(WT_LENONE) if (parity) { lptr = &a[0]; lptr[0] <<= 1; } #endif } } void jpc_ns_fwdlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++lptr2; ++hptr2; } } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr2 = lptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] = jpc_fix_mul(lptr2[0], jpc_dbltofix(LGAIN)); ++lptr2; } lptr += stride; } hptr = &a[llen * stride]; n = numrows - llen; while (n-- > 0) { hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] = jpc_fix_mul(hptr2[0], jpc_dbltofix(HGAIN)); ++hptr2; } hptr += stride; } #endif } else { #if defined(WT_LENONE) if (parity) { lptr2 = &a[0]; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] <<= 1; ++lptr2; } } #endif } } void jpc_ns_fwdlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++lptr2; ++hptr2; } } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr2 = lptr; for (i = 0; i < numcols; ++i) { lptr2[0] = jpc_fix_mul(lptr2[0], jpc_dbltofix(LGAIN)); ++lptr2; } lptr += stride; } hptr = &a[llen * stride]; n = numrows - llen; while (n-- > 0) { hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] = jpc_fix_mul(hptr2[0], jpc_dbltofix(HGAIN)); ++hptr2; } hptr += stride; } #endif } else { #if defined(WT_LENONE) if (parity) { lptr2 = &a[0]; for (i = 0; i < numcols; ++i) { lptr2[0] <<= 1; ++lptr2; } } #endif } } void jpc_ns_fwdlift_col(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++hptr2; ++lptr2; hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++lptr2; ++hptr2; } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++hptr2; ++lptr2; hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++lptr2; ++hptr2; } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_pluseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr2 = lptr; lptr2[0] = jpc_fix_mul(lptr2[0], jpc_dbltofix(LGAIN)); ++lptr2; lptr += stride; } hptr = &a[llen * stride]; n = numrows - llen; while (n-- > 0) { hptr2 = hptr; hptr2[0] = jpc_fix_mul(hptr2[0], jpc_dbltofix(HGAIN)); ++hptr2; hptr += stride; } #endif } else { #if defined(WT_LENONE) if (parity) { lptr2 = &a[0]; lptr2[0] <<= 1; ++lptr2; } #endif } } void jpc_ns_invlift_row(jpc_fix_t *a, int numcols, int parity) { register jpc_fix_t *lptr; register jpc_fix_t *hptr; register int n; int llen; llen = (numcols + 1 - parity) >> 1; if (numcols > 1) { /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr[0] = jpc_fix_mul(lptr[0], jpc_dbltofix(1.0 / LGAIN)); ++lptr; } hptr = &a[llen]; n = numcols - llen; while (n-- > 0) { hptr[0] = jpc_fix_mul(hptr[0], jpc_dbltofix(1.0 / HGAIN)); ++hptr; } #endif /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (!parity) { jpc_fix_minuseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr[0])); ++lptr; } n = llen - (!parity) - (parity != (numcols & 1)); while (n-- > 0) { jpc_fix_minuseq(lptr[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr[0], hptr[1]))); ++lptr; ++hptr; } if (parity != (numcols & 1)) { jpc_fix_minuseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr[0])); } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (parity) { jpc_fix_minuseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr[0])); ++hptr; } n = numcols - llen - parity - (parity == (numcols & 1)); while (n-- > 0) { jpc_fix_minuseq(hptr[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr[0], lptr[1]))); ++hptr; ++lptr; } if (parity == (numcols & 1)) { jpc_fix_minuseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr[0])); } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (!parity) { jpc_fix_minuseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr[0])); ++lptr; } n = llen - (!parity) - (parity != (numcols & 1)); while (n-- > 0) { jpc_fix_minuseq(lptr[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr[0], hptr[1]))); ++lptr; ++hptr; } if (parity != (numcols & 1)) { jpc_fix_minuseq(lptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr[0])); } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (parity) { jpc_fix_minuseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr[0])); ++hptr; } n = numcols - llen - parity - (parity == (numcols & 1)); while (n-- > 0) { jpc_fix_minuseq(hptr[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr[0], lptr[1]))); ++hptr; ++lptr; } if (parity == (numcols & 1)) { jpc_fix_minuseq(hptr[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr[0])); } } else { #if defined(WT_LENONE) if (parity) { lptr = &a[0]; lptr[0] >>= 1; } #endif } } void jpc_ns_invlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr2 = lptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] = jpc_fix_mul(lptr2[0], jpc_dbltofix(1.0 / LGAIN)); ++lptr2; } lptr += stride; } hptr = &a[llen * stride]; n = numrows - llen; while (n-- > 0) { hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { hptr2[0] = jpc_fix_mul(hptr2[0], jpc_dbltofix(1.0 / HGAIN)); ++hptr2; } hptr += stride; } #endif /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++lptr2; ++hptr2; } } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++lptr2; ++hptr2; } } } else { #if defined(WT_LENONE) if (parity) { lptr2 = &a[0]; for (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) { lptr2[0] >>= 1; ++lptr2; } } #endif } } void jpc_ns_invlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr2 = lptr; for (i = 0; i < numcols; ++i) { lptr2[0] = jpc_fix_mul(lptr2[0], jpc_dbltofix(1.0 / LGAIN)); ++lptr2; } lptr += stride; } hptr = &a[llen * stride]; n = numrows - llen; while (n-- > 0) { hptr2 = hptr; for (i = 0; i < numcols; ++i) { hptr2[0] = jpc_fix_mul(hptr2[0], jpc_dbltofix(1.0 / HGAIN)); ++hptr2; } hptr += stride; } #endif /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++lptr2; ++hptr2; } } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; } lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++hptr2; ++lptr2; } hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; } hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; for (i = 0; i < numcols; ++i) { jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++lptr2; ++hptr2; } } } else { #if defined(WT_LENONE) if (parity) { lptr2 = &a[0]; for (i = 0; i < numcols; ++i) { lptr2[0] >>= 1; ++lptr2; } } #endif } } void jpc_ns_invlift_col(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the scaling step. */ #if defined(WT_DOSCALE) lptr = &a[0]; n = llen; while (n-- > 0) { lptr2 = lptr; lptr2[0] = jpc_fix_mul(lptr2[0], jpc_dbltofix(1.0 / LGAIN)); ++lptr2; lptr += stride; } hptr = &a[llen * stride]; n = numrows - llen; while (n-- > 0) { hptr2 = hptr; hptr2[0] = jpc_fix_mul(hptr2[0], jpc_dbltofix(1.0 / HGAIN)); ++hptr2; hptr += stride; } #endif /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(DELTA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * DELTA), hptr2[0])); ++lptr2; ++hptr2; } /* Apply the second lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++hptr2; ++lptr2; hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(GAMMA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * GAMMA), lptr2[0])); ++lptr2; ++hptr2; } /* Apply the third lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (!parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; lptr += stride; } n = llen - (!parity) - (parity != (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(BETA), jpc_fix_add(hptr2[0], hptr2[stride]))); ++lptr2; ++hptr2; lptr += stride; hptr += stride; } if (parity != (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(lptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * BETA), hptr2[0])); ++lptr2; ++hptr2; } /* Apply the fourth lifting step. */ lptr = &a[0]; hptr = &a[llen * stride]; if (parity) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++hptr2; ++lptr2; hptr += stride; } n = numrows - llen - parity - (parity == (numrows & 1)); while (n-- > 0) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(ALPHA), jpc_fix_add(lptr2[0], lptr2[stride]))); ++lptr2; ++hptr2; hptr += stride; lptr += stride; } if (parity == (numrows & 1)) { lptr2 = lptr; hptr2 = hptr; jpc_fix_minuseq(hptr2[0], jpc_fix_mul(jpc_dbltofix(2.0 * ALPHA), lptr2[0])); ++lptr2; ++hptr2; } } else { #if defined(WT_LENONE) if (parity) { lptr2 = &a[0]; lptr2[0] >>= 1; ++lptr2; } #endif } } int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height, int stride) { int numrows = height; int numcols = width; int rowparity = ystart & 1; int colparity = xstart & 1; int i; jpc_fix_t *startptr; int maxcols; maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE; startptr = &a[0]; for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) { jpc_qmfb_split_colgrp(startptr, numrows, stride, rowparity); jpc_ns_fwdlift_colgrp(startptr, numrows, stride, rowparity); startptr += JPC_QMFB_COLGRPSIZE; } if (maxcols < numcols) { jpc_qmfb_split_colres(startptr, numrows, numcols - maxcols, stride, rowparity); jpc_ns_fwdlift_colres(startptr, numrows, numcols - maxcols, stride, rowparity); } startptr = &a[0]; for (i = 0; i < numrows; ++i) { jpc_qmfb_split_row(startptr, numcols, colparity); jpc_ns_fwdlift_row(startptr, numcols, colparity); startptr += stride; } return 0; } int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width, int height, int stride) { int numrows = height; int numcols = width; int rowparity = ystart & 1; int colparity = xstart & 1; int maxcols; jpc_fix_t *startptr; int i; startptr = &a[0]; for (i = 0; i < numrows; ++i) { jpc_ns_invlift_row(startptr, numcols, colparity); jpc_qmfb_join_row(startptr, numcols, colparity); startptr += stride; } maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE; startptr = &a[0]; for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) { jpc_ns_invlift_colgrp(startptr, numrows, stride, rowparity); jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity); startptr += JPC_QMFB_COLGRPSIZE; } if (maxcols < numcols) { jpc_ns_invlift_colres(startptr, numrows, numcols - maxcols, stride, rowparity); jpc_qmfb_join_colres(startptr, numrows, numcols - maxcols, stride, rowparity); } return 0; } jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.c0000644000175000017500000004535510554235553017510 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier-2 Coding Library * * $Id$ */ #include "jasper/jas_math.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jpc_cs.h" #include "jpc_t2cod.h" #include "jpc_math.h" static int jpc_pi_nextlrcp(jpc_pi_t *pi); static int jpc_pi_nextrlcp(jpc_pi_t *pi); static int jpc_pi_nextrpcl(jpc_pi_t *pi); static int jpc_pi_nextpcrl(jpc_pi_t *pi); static int jpc_pi_nextcprl(jpc_pi_t *pi); int jpc_pi_next(jpc_pi_t *pi) { jpc_pchg_t *pchg; int ret; for (;;) { pi->valid = false; if (!pi->pchg) { ++pi->pchgno; pi->compno = 0; pi->rlvlno = 0; pi->prcno = 0; pi->lyrno = 0; pi->prgvolfirst = true; if (pi->pchgno < jpc_pchglist_numpchgs(pi->pchglist)) { pi->pchg = jpc_pchglist_get(pi->pchglist, pi->pchgno); } else if (pi->pchgno == jpc_pchglist_numpchgs(pi->pchglist)) { pi->pchg = &pi->defaultpchg; } else { return 1; } } pchg = pi->pchg; switch (pchg->prgord) { case JPC_COD_LRCPPRG: ret = jpc_pi_nextlrcp(pi); break; case JPC_COD_RLCPPRG: ret = jpc_pi_nextrlcp(pi); break; case JPC_COD_RPCLPRG: ret = jpc_pi_nextrpcl(pi); break; case JPC_COD_PCRLPRG: ret = jpc_pi_nextpcrl(pi); break; case JPC_COD_CPRLPRG: ret = jpc_pi_nextcprl(pi); break; default: ret = -1; break; } if (!ret) { pi->valid = true; ++pi->pktno; return 0; } pi->pchg = 0; } } static int jpc_pi_nextlrcp(register jpc_pi_t *pi) { jpc_pchg_t *pchg; int *prclyrno; pchg = pi->pchg; if (!pi->prgvolfirst) { prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; goto skip; } else { pi->prgvolfirst = false; } for (pi->lyrno = 0; pi->lyrno < pi->numlyrs && pi->lyrno < JAS_CAST(int, pchg->lyrnoend); ++pi->lyrno) { for (pi->rlvlno = pchg->rlvlnostart; pi->rlvlno < pi->maxrlvls && pi->rlvlno < pchg->rlvlnoend; ++pi->rlvlno) { for (pi->compno = pchg->compnostart, pi->picomp = &pi->picomps[pi->compno]; pi->compno < pi->numcomps && pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno, ++pi->picomp) { if (pi->rlvlno >= pi->picomp->numrlvls) { continue; } pi->pirlvl = &pi->picomp->pirlvls[pi->rlvlno]; for (pi->prcno = 0, prclyrno = pi->pirlvl->prclyrnos; pi->prcno < pi->pirlvl->numprcs; ++pi->prcno, ++prclyrno) { if (pi->lyrno >= *prclyrno) { *prclyrno = pi->lyrno; ++(*prclyrno); return 0; } skip: ; } } } } return 1; } static int jpc_pi_nextrlcp(register jpc_pi_t *pi) { jpc_pchg_t *pchg; int *prclyrno; pchg = pi->pchg; if (!pi->prgvolfirst) { assert(pi->prcno < pi->pirlvl->numprcs); prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; goto skip; } else { pi->prgvolfirst = 0; } for (pi->rlvlno = pchg->rlvlnostart; pi->rlvlno < pi->maxrlvls && pi->rlvlno < pchg->rlvlnoend; ++pi->rlvlno) { for (pi->lyrno = 0; pi->lyrno < pi->numlyrs && pi->lyrno < JAS_CAST(int, pchg->lyrnoend); ++pi->lyrno) { for (pi->compno = pchg->compnostart, pi->picomp = &pi->picomps[pi->compno]; pi->compno < pi->numcomps && pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno, ++pi->picomp) { if (pi->rlvlno >= pi->picomp->numrlvls) { continue; } pi->pirlvl = &pi->picomp->pirlvls[pi->rlvlno]; for (pi->prcno = 0, prclyrno = pi->pirlvl->prclyrnos; pi->prcno < pi->pirlvl->numprcs; ++pi->prcno, ++prclyrno) { if (pi->lyrno >= *prclyrno) { *prclyrno = pi->lyrno; ++(*prclyrno); return 0; } skip: ; } } } } return 1; } static int jpc_pi_nextrpcl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; uint_fast32_t trx0; uint_fast32_t try0; pchg = pi->pchg; if (!pi->prgvolfirst) { goto skip; } else { pi->xstep = 0; pi->ystep = 0; for (compno = 0, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++picomp) { for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl) { xstep = picomp->hsamp * (1 << (pirlvl->prcwidthexpn + picomp->numrlvls - rlvlno - 1)); ystep = picomp->vsamp * (1 << (pirlvl->prcheightexpn + picomp->numrlvls - rlvlno - 1)); pi->xstep = (!pi->xstep) ? xstep : JAS_MIN(pi->xstep, xstep); pi->ystep = (!pi->ystep) ? ystep : JAS_MIN(pi->ystep, ystep); } } pi->prgvolfirst = 0; } for (pi->rlvlno = pchg->rlvlnostart; pi->rlvlno < pchg->rlvlnoend && pi->rlvlno < pi->maxrlvls; ++pi->rlvlno) { for (pi->y = pi->ystart; pi->y < pi->yend; pi->y += pi->ystep - (pi->y % pi->ystep)) { for (pi->x = pi->xstart; pi->x < pi->xend; pi->x += pi->xstep - (pi->x % pi->xstep)) { for (pi->compno = pchg->compnostart, pi->picomp = &pi->picomps[pi->compno]; pi->compno < JAS_CAST(int, pchg->compnoend) && pi->compno < pi->numcomps; ++pi->compno, ++pi->picomp) { if (pi->rlvlno >= pi->picomp->numrlvls) { continue; } pi->pirlvl = &pi->picomp->pirlvls[pi->rlvlno]; if (pi->pirlvl->numprcs == 0) { continue; } r = pi->picomp->numrlvls - 1 - pi->rlvlno; rpx = r + pi->pirlvl->prcwidthexpn; rpy = r + pi->pirlvl->prcheightexpn; trx0 = JPC_CEILDIV(pi->xstart, pi->picomp->hsamp << r); try0 = JPC_CEILDIV(pi->ystart, pi->picomp->vsamp << r); if (((pi->x == pi->xstart && ((trx0 << r) % (1 << rpx))) || !(pi->x % (1 << rpx))) && ((pi->y == pi->ystart && ((try0 << r) % (1 << rpy))) || !(pi->y % (1 << rpy)))) { prchind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->x, pi->picomp->hsamp << r), pi->pirlvl->prcwidthexpn) - JPC_FLOORDIVPOW2(trx0, pi->pirlvl->prcwidthexpn); prcvind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->y, pi->picomp->vsamp << r), pi->pirlvl->prcheightexpn) - JPC_FLOORDIVPOW2(try0, pi->pirlvl->prcheightexpn); pi->prcno = prcvind * pi->pirlvl->numhprcs + prchind; assert(pi->prcno < pi->pirlvl->numprcs); for (pi->lyrno = 0; pi->lyrno < pi->numlyrs && pi->lyrno < JAS_CAST(int, pchg->lyrnoend); ++pi->lyrno) { prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; if (pi->lyrno >= *prclyrno) { ++(*prclyrno); return 0; } skip: ; } } } } } } return 1; } static int jpc_pi_nextpcrl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = pi->pchg; if (!pi->prgvolfirst) { goto skip; } else { pi->xstep = 0; pi->ystep = 0; for (compno = 0, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++picomp) { for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl) { xstep = picomp->hsamp * (1 << (pirlvl->prcwidthexpn + picomp->numrlvls - rlvlno - 1)); ystep = picomp->vsamp * (1 << (pirlvl->prcheightexpn + picomp->numrlvls - rlvlno - 1)); pi->xstep = (!pi->xstep) ? xstep : JAS_MIN(pi->xstep, xstep); pi->ystep = (!pi->ystep) ? ystep : JAS_MIN(pi->ystep, ystep); } } pi->prgvolfirst = 0; } for (pi->y = pi->ystart; pi->y < pi->yend; pi->y += pi->ystep - (pi->y % pi->ystep)) { for (pi->x = pi->xstart; pi->x < pi->xend; pi->x += pi->xstep - (pi->x % pi->xstep)) { for (pi->compno = pchg->compnostart, pi->picomp = &pi->picomps[pi->compno]; pi->compno < pi->numcomps && pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno, ++pi->picomp) { for (pi->rlvlno = pchg->rlvlnostart, pi->pirlvl = &pi->picomp->pirlvls[pi->rlvlno]; pi->rlvlno < pi->picomp->numrlvls && pi->rlvlno < pchg->rlvlnoend; ++pi->rlvlno, ++pi->pirlvl) { if (pi->pirlvl->numprcs == 0) { continue; } r = pi->picomp->numrlvls - 1 - pi->rlvlno; trx0 = JPC_CEILDIV(pi->xstart, pi->picomp->hsamp << r); try0 = JPC_CEILDIV(pi->ystart, pi->picomp->vsamp << r); rpx = r + pi->pirlvl->prcwidthexpn; rpy = r + pi->pirlvl->prcheightexpn; if (((pi->x == pi->xstart && ((trx0 << r) % (1 << rpx))) || !(pi->x % (pi->picomp->hsamp << rpx))) && ((pi->y == pi->ystart && ((try0 << r) % (1 << rpy))) || !(pi->y % (pi->picomp->vsamp << rpy)))) { prchind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->x, pi->picomp->hsamp << r), pi->pirlvl->prcwidthexpn) - JPC_FLOORDIVPOW2(trx0, pi->pirlvl->prcwidthexpn); prcvind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->y, pi->picomp->vsamp << r), pi->pirlvl->prcheightexpn) - JPC_FLOORDIVPOW2(try0, pi->pirlvl->prcheightexpn); pi->prcno = prcvind * pi->pirlvl->numhprcs + prchind; assert(pi->prcno < pi->pirlvl->numprcs); for (pi->lyrno = 0; pi->lyrno < pi->numlyrs && pi->lyrno < JAS_CAST(int, pchg->lyrnoend); ++pi->lyrno) { prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; if (pi->lyrno >= *prclyrno) { ++(*prclyrno); return 0; } skip: ; } } } } } } return 1; } static int jpc_pi_nextcprl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = pi->pchg; if (!pi->prgvolfirst) { goto skip; } else { pi->prgvolfirst = 0; } for (pi->compno = pchg->compnostart, pi->picomp = &pi->picomps[pi->compno]; pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno, ++pi->picomp) { pirlvl = pi->picomp->pirlvls; pi->xstep = pi->picomp->hsamp * (1 << (pirlvl->prcwidthexpn + pi->picomp->numrlvls - 1)); pi->ystep = pi->picomp->vsamp * (1 << (pirlvl->prcheightexpn + pi->picomp->numrlvls - 1)); for (rlvlno = 1, pirlvl = &pi->picomp->pirlvls[1]; rlvlno < pi->picomp->numrlvls; ++rlvlno, ++pirlvl) { pi->xstep = JAS_MIN(pi->xstep, pi->picomp->hsamp * (1 << (pirlvl->prcwidthexpn + pi->picomp->numrlvls - rlvlno - 1))); pi->ystep = JAS_MIN(pi->ystep, pi->picomp->vsamp * (1 << (pirlvl->prcheightexpn + pi->picomp->numrlvls - rlvlno - 1))); } for (pi->y = pi->ystart; pi->y < pi->yend; pi->y += pi->ystep - (pi->y % pi->ystep)) { for (pi->x = pi->xstart; pi->x < pi->xend; pi->x += pi->xstep - (pi->x % pi->xstep)) { for (pi->rlvlno = pchg->rlvlnostart, pi->pirlvl = &pi->picomp->pirlvls[pi->rlvlno]; pi->rlvlno < pi->picomp->numrlvls && pi->rlvlno < pchg->rlvlnoend; ++pi->rlvlno, ++pi->pirlvl) { if (pi->pirlvl->numprcs == 0) { continue; } r = pi->picomp->numrlvls - 1 - pi->rlvlno; trx0 = JPC_CEILDIV(pi->xstart, pi->picomp->hsamp << r); try0 = JPC_CEILDIV(pi->ystart, pi->picomp->vsamp << r); rpx = r + pi->pirlvl->prcwidthexpn; rpy = r + pi->pirlvl->prcheightexpn; if (((pi->x == pi->xstart && ((trx0 << r) % (1 << rpx))) || !(pi->x % (pi->picomp->hsamp << rpx))) && ((pi->y == pi->ystart && ((try0 << r) % (1 << rpy))) || !(pi->y % (pi->picomp->vsamp << rpy)))) { prchind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->x, pi->picomp->hsamp << r), pi->pirlvl->prcwidthexpn) - JPC_FLOORDIVPOW2(trx0, pi->pirlvl->prcwidthexpn); prcvind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->y, pi->picomp->vsamp << r), pi->pirlvl->prcheightexpn) - JPC_FLOORDIVPOW2(try0, pi->pirlvl->prcheightexpn); pi->prcno = prcvind * pi->pirlvl->numhprcs + prchind; assert(pi->prcno < pi->pirlvl->numprcs); for (pi->lyrno = 0; pi->lyrno < pi->numlyrs && pi->lyrno < JAS_CAST(int, pchg->lyrnoend); ++pi->lyrno) { prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; if (pi->lyrno >= *prclyrno) { ++(*prclyrno); return 0; } skip: ; } } } } } } return 1; } static void pirlvl_destroy(jpc_pirlvl_t *rlvl) { if (rlvl->prclyrnos) { jas_free(rlvl->prclyrnos); } } static void jpc_picomp_destroy(jpc_picomp_t *picomp) { int rlvlno; jpc_pirlvl_t *pirlvl; if (picomp->pirlvls) { for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl) { pirlvl_destroy(pirlvl); } jas_free(picomp->pirlvls); } } void jpc_pi_destroy(jpc_pi_t *pi) { jpc_picomp_t *picomp; int compno; if (pi->picomps) { for (compno = 0, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++picomp) { jpc_picomp_destroy(picomp); } jas_free(pi->picomps); } if (pi->pchglist) { jpc_pchglist_destroy(pi->pchglist); } jas_free(pi); } jpc_pi_t *jpc_pi_create0() { jpc_pi_t *pi; if (!(pi = jas_malloc(sizeof(jpc_pi_t)))) { return 0; } pi->picomps = 0; pi->pchgno = 0; if (!(pi->pchglist = jpc_pchglist_create())) { jas_free(pi); return 0; } return pi; } int jpc_pi_addpchg(jpc_pi_t *pi, jpc_pocpchg_t *pchg) { return jpc_pchglist_insert(pi->pchglist, -1, pchg); } jpc_pchglist_t *jpc_pchglist_create() { jpc_pchglist_t *pchglist; if (!(pchglist = jas_malloc(sizeof(jpc_pchglist_t)))) { return 0; } pchglist->numpchgs = 0; pchglist->maxpchgs = 0; pchglist->pchgs = 0; return pchglist; } int jpc_pchglist_insert(jpc_pchglist_t *pchglist, int pchgno, jpc_pchg_t *pchg) { int i; int newmaxpchgs; jpc_pchg_t **newpchgs; if (pchgno < 0) { pchgno = pchglist->numpchgs; } if (pchglist->numpchgs >= pchglist->maxpchgs) { newmaxpchgs = pchglist->maxpchgs + 128; if (!(newpchgs = jas_realloc(pchglist->pchgs, newmaxpchgs * sizeof(jpc_pchg_t *)))) { return -1; } pchglist->maxpchgs = newmaxpchgs; pchglist->pchgs = newpchgs; } for (i = pchglist->numpchgs; i > pchgno; --i) { pchglist->pchgs[i] = pchglist->pchgs[i - 1]; } pchglist->pchgs[pchgno] = pchg; ++pchglist->numpchgs; return 0; } jpc_pchg_t *jpc_pchglist_remove(jpc_pchglist_t *pchglist, int pchgno) { int i; jpc_pchg_t *pchg; assert(pchgno < pchglist->numpchgs); pchg = pchglist->pchgs[pchgno]; for (i = pchgno + 1; i < pchglist->numpchgs; ++i) { pchglist->pchgs[i - 1] = pchglist->pchgs[i]; } --pchglist->numpchgs; return pchg; } jpc_pchg_t *jpc_pchg_copy(jpc_pchg_t *pchg) { jpc_pchg_t *newpchg; if (!(newpchg = jas_malloc(sizeof(jpc_pchg_t)))) { return 0; } *newpchg = *pchg; return newpchg; } jpc_pchglist_t *jpc_pchglist_copy(jpc_pchglist_t *pchglist) { jpc_pchglist_t *newpchglist; jpc_pchg_t *newpchg; int pchgno; if (!(newpchglist = jpc_pchglist_create())) { return 0; } for (pchgno = 0; pchgno < pchglist->numpchgs; ++pchgno) { if (!(newpchg = jpc_pchg_copy(pchglist->pchgs[pchgno])) || jpc_pchglist_insert(newpchglist, -1, newpchg)) { jpc_pchglist_destroy(newpchglist); return 0; } } return newpchglist; } void jpc_pchglist_destroy(jpc_pchglist_t *pchglist) { int pchgno; if (pchglist->pchgs) { for (pchgno = 0; pchgno < pchglist->numpchgs; ++pchgno) { jpc_pchg_destroy(pchglist->pchgs[pchgno]); } jas_free(pchglist->pchgs); } jas_free(pchglist); } void jpc_pchg_destroy(jpc_pchg_t *pchg) { jas_free(pchg); } jpc_pchg_t *jpc_pchglist_get(jpc_pchglist_t *pchglist, int pchgno) { return pchglist->pchgs[pchgno]; } int jpc_pchglist_numpchgs(jpc_pchglist_t *pchglist) { return pchglist->numpchgs; } int jpc_pi_init(jpc_pi_t *pi) { int compno; int rlvlno; int prcno; jpc_picomp_t *picomp; jpc_pirlvl_t *pirlvl; int *prclyrno; pi->prgvolfirst = 0; pi->valid = 0; pi->pktno = -1; pi->pchgno = -1; pi->pchg = 0; for (compno = 0, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++picomp) { for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl) { for (prcno = 0, prclyrno = pirlvl->prclyrnos; prcno < pirlvl->numprcs; ++prcno, ++prclyrno) { *prclyrno = 0; } } } return 0; } jasper-1.900.1/src/libjasper/jpc/jpc_cs.c0000644000175000017500000013215610554235553017076 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JPEG-2000 Code Stream Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_malloc.h" #include "jasper/jas_debug.h" #include "jpc_cs.h" /******************************************************************************\ * Types. \******************************************************************************/ /* Marker segment table entry. */ typedef struct { int id; char *name; jpc_msops_t ops; } jpc_mstabent_t; /******************************************************************************\ * Local prototypes. \******************************************************************************/ static jpc_mstabent_t *jpc_mstab_lookup(int id); static int jpc_poc_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_poc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_poc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static void jpc_poc_destroyparms(jpc_ms_t *ms); static int jpc_unk_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_sot_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_cod_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_coc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_qcd_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_qcc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_rgn_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_sop_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_ppm_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_ppt_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_crg_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_com_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); static int jpc_sot_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_siz_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_cod_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_coc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_qcd_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_qcc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_rgn_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_unk_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_sop_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_ppm_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_ppt_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_crg_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_com_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); static int jpc_sot_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_siz_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_cod_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_coc_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_qcd_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_qcc_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_rgn_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_unk_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_sop_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_ppm_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_ppt_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_crg_dumpparms(jpc_ms_t *ms, FILE *out); static int jpc_com_dumpparms(jpc_ms_t *ms, FILE *out); static void jpc_siz_destroyparms(jpc_ms_t *ms); static void jpc_qcd_destroyparms(jpc_ms_t *ms); static void jpc_qcc_destroyparms(jpc_ms_t *ms); static void jpc_cod_destroyparms(jpc_ms_t *ms); static void jpc_coc_destroyparms(jpc_ms_t *ms); static void jpc_unk_destroyparms(jpc_ms_t *ms); static void jpc_ppm_destroyparms(jpc_ms_t *ms); static void jpc_ppt_destroyparms(jpc_ms_t *ms); static void jpc_crg_destroyparms(jpc_ms_t *ms); static void jpc_com_destroyparms(jpc_ms_t *ms); static void jpc_qcx_destroycompparms(jpc_qcxcp_t *compparms); static int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate, jas_stream_t *in, uint_fast16_t len); static int jpc_qcx_putcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate, jas_stream_t *out); static void jpc_cox_destroycompparms(jpc_coxcp_t *compparms); static int jpc_cox_getcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in, int prtflag, jpc_coxcp_t *compparms); static int jpc_cox_putcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out, int prtflag, jpc_coxcp_t *compparms); /******************************************************************************\ * Global data. \******************************************************************************/ static jpc_mstabent_t jpc_mstab[] = { {JPC_MS_SOC, "SOC", {0, 0, 0, 0}}, {JPC_MS_SOT, "SOT", {0, jpc_sot_getparms, jpc_sot_putparms, jpc_sot_dumpparms}}, {JPC_MS_SOD, "SOD", {0, 0, 0, 0}}, {JPC_MS_EOC, "EOC", {0, 0, 0, 0}}, {JPC_MS_SIZ, "SIZ", {jpc_siz_destroyparms, jpc_siz_getparms, jpc_siz_putparms, jpc_siz_dumpparms}}, {JPC_MS_COD, "COD", {jpc_cod_destroyparms, jpc_cod_getparms, jpc_cod_putparms, jpc_cod_dumpparms}}, {JPC_MS_COC, "COC", {jpc_coc_destroyparms, jpc_coc_getparms, jpc_coc_putparms, jpc_coc_dumpparms}}, {JPC_MS_RGN, "RGN", {0, jpc_rgn_getparms, jpc_rgn_putparms, jpc_rgn_dumpparms}}, {JPC_MS_QCD, "QCD", {jpc_qcd_destroyparms, jpc_qcd_getparms, jpc_qcd_putparms, jpc_qcd_dumpparms}}, {JPC_MS_QCC, "QCC", {jpc_qcc_destroyparms, jpc_qcc_getparms, jpc_qcc_putparms, jpc_qcc_dumpparms}}, {JPC_MS_POC, "POC", {jpc_poc_destroyparms, jpc_poc_getparms, jpc_poc_putparms, jpc_poc_dumpparms}}, {JPC_MS_TLM, "TLM", {0, jpc_unk_getparms, jpc_unk_putparms, 0}}, {JPC_MS_PLM, "PLM", {0, jpc_unk_getparms, jpc_unk_putparms, 0}}, {JPC_MS_PPM, "PPM", {jpc_ppm_destroyparms, jpc_ppm_getparms, jpc_ppm_putparms, jpc_ppm_dumpparms}}, {JPC_MS_PPT, "PPT", {jpc_ppt_destroyparms, jpc_ppt_getparms, jpc_ppt_putparms, jpc_ppt_dumpparms}}, {JPC_MS_SOP, "SOP", {0, jpc_sop_getparms, jpc_sop_putparms, jpc_sop_dumpparms}}, {JPC_MS_EPH, "EPH", {0, 0, 0, 0}}, {JPC_MS_CRG, "CRG", {0, jpc_crg_getparms, jpc_crg_putparms, jpc_crg_dumpparms}}, {JPC_MS_COM, "COM", {jpc_com_destroyparms, jpc_com_getparms, jpc_com_putparms, jpc_com_dumpparms}}, {-1, "UNKNOWN", {jpc_unk_destroyparms, jpc_unk_getparms, jpc_unk_putparms, jpc_unk_dumpparms}} }; /******************************************************************************\ * Code stream manipulation functions. \******************************************************************************/ /* Create a code stream state object. */ jpc_cstate_t *jpc_cstate_create() { jpc_cstate_t *cstate; if (!(cstate = jas_malloc(sizeof(jpc_cstate_t)))) { return 0; } cstate->numcomps = 0; return cstate; } /* Destroy a code stream state object. */ void jpc_cstate_destroy(jpc_cstate_t *cstate) { jas_free(cstate); } /* Read a marker segment from a stream. */ jpc_ms_t *jpc_getms(jas_stream_t *in, jpc_cstate_t *cstate) { jpc_ms_t *ms; jpc_mstabent_t *mstabent; jas_stream_t *tmpstream; if (!(ms = jpc_ms_create(0))) { return 0; } /* Get the marker type. */ if (jpc_getuint16(in, &ms->id) || ms->id < JPC_MS_MIN || ms->id > JPC_MS_MAX) { jpc_ms_destroy(ms); return 0; } mstabent = jpc_mstab_lookup(ms->id); ms->ops = &mstabent->ops; /* Get the marker segment length and parameters if present. */ /* Note: It is tacitly assumed that a marker segment cannot have parameters unless it has a length field. That is, there cannot be a parameters field without a length field and vice versa. */ if (JPC_MS_HASPARMS(ms->id)) { /* Get the length of the marker segment. */ if (jpc_getuint16(in, &ms->len) || ms->len < 3) { jpc_ms_destroy(ms); return 0; } /* Calculate the length of the marker segment parameters. */ ms->len -= 2; /* Create and prepare a temporary memory stream from which to read the marker segment parameters. */ /* Note: This approach provides a simple way of ensuring that we never read beyond the end of the marker segment (even if the marker segment length is errantly set too small). */ if (!(tmpstream = jas_stream_memopen(0, 0))) { jpc_ms_destroy(ms); return 0; } if (jas_stream_copy(tmpstream, in, ms->len) || jas_stream_seek(tmpstream, 0, SEEK_SET) < 0) { jas_stream_close(tmpstream); jpc_ms_destroy(ms); return 0; } /* Get the marker segment parameters. */ if ((*ms->ops->getparms)(ms, cstate, tmpstream)) { ms->ops = 0; jpc_ms_destroy(ms); jas_stream_close(tmpstream); return 0; } if (jas_getdbglevel() > 0) { jpc_ms_dump(ms, stderr); } if (JAS_CAST(ulong, jas_stream_tell(tmpstream)) != ms->len) { jas_eprintf("warning: trailing garbage in marker segment (%ld bytes)\n", ms->len - jas_stream_tell(tmpstream)); } /* Close the temporary stream. */ jas_stream_close(tmpstream); } else { /* There are no marker segment parameters. */ ms->len = 0; if (jas_getdbglevel() > 0) { jpc_ms_dump(ms, stderr); } } /* Update the code stream state information based on the type of marker segment read. */ /* Note: This is a bit of a hack, but I'm not going to define another type of virtual function for this one special case. */ if (ms->id == JPC_MS_SIZ) { cstate->numcomps = ms->parms.siz.numcomps; } return ms; } /* Write a marker segment to a stream. */ int jpc_putms(jas_stream_t *out, jpc_cstate_t *cstate, jpc_ms_t *ms) { jas_stream_t *tmpstream; int len; /* Output the marker segment type. */ if (jpc_putuint16(out, ms->id)) { return -1; } /* Output the marker segment length and parameters if necessary. */ if (ms->ops->putparms) { /* Create a temporary stream in which to buffer the parameter data. */ if (!(tmpstream = jas_stream_memopen(0, 0))) { return -1; } if ((*ms->ops->putparms)(ms, cstate, tmpstream)) { jas_stream_close(tmpstream); return -1; } /* Get the number of bytes of parameter data written. */ if ((len = jas_stream_tell(tmpstream)) < 0) { jas_stream_close(tmpstream); return -1; } ms->len = len; /* Write the marker segment length and parameter data to the output stream. */ if (jas_stream_seek(tmpstream, 0, SEEK_SET) < 0 || jpc_putuint16(out, ms->len + 2) || jas_stream_copy(out, tmpstream, ms->len) < 0) { jas_stream_close(tmpstream); return -1; } /* Close the temporary stream. */ jas_stream_close(tmpstream); } /* This is a bit of a hack, but I'm not going to define another type of virtual function for this one special case. */ if (ms->id == JPC_MS_SIZ) { cstate->numcomps = ms->parms.siz.numcomps; } if (jas_getdbglevel() > 0) { jpc_ms_dump(ms, stderr); } return 0; } /******************************************************************************\ * Marker segment operations. \******************************************************************************/ /* Create a marker segment of the specified type. */ jpc_ms_t *jpc_ms_create(int type) { jpc_ms_t *ms; jpc_mstabent_t *mstabent; if (!(ms = jas_malloc(sizeof(jpc_ms_t)))) { return 0; } ms->id = type; ms->len = 0; mstabent = jpc_mstab_lookup(ms->id); ms->ops = &mstabent->ops; memset(&ms->parms, 0, sizeof(jpc_msparms_t)); return ms; } /* Destroy a marker segment. */ void jpc_ms_destroy(jpc_ms_t *ms) { if (ms->ops && ms->ops->destroyparms) { (*ms->ops->destroyparms)(ms); } jas_free(ms); } /* Dump a marker segment to a stream for debugging. */ void jpc_ms_dump(jpc_ms_t *ms, FILE *out) { jpc_mstabent_t *mstabent; mstabent = jpc_mstab_lookup(ms->id); fprintf(out, "type = 0x%04x (%s);", ms->id, mstabent->name); if (JPC_MS_HASPARMS(ms->id)) { fprintf(out, " len = %d;", ms->len + 2); if (ms->ops->dumpparms) { (*ms->ops->dumpparms)(ms, out); } else { fprintf(out, "\n"); } } else { fprintf(out, "\n"); } } /******************************************************************************\ * SOT marker segment operations. \******************************************************************************/ static int jpc_sot_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_sot_t *sot = &ms->parms.sot; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (jpc_getuint16(in, &sot->tileno) || jpc_getuint32(in, &sot->len) || jpc_getuint8(in, &sot->partno) || jpc_getuint8(in, &sot->numparts)) { return -1; } if (jas_stream_eof(in)) { return -1; } return 0; } static int jpc_sot_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_sot_t *sot = &ms->parms.sot; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (jpc_putuint16(out, sot->tileno) || jpc_putuint32(out, sot->len) || jpc_putuint8(out, sot->partno) || jpc_putuint8(out, sot->numparts)) { return -1; } return 0; } static int jpc_sot_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_sot_t *sot = &ms->parms.sot; fprintf(out, "tileno = %d; len = %d; partno = %d; numparts = %d\n", sot->tileno, sot->len, sot->partno, sot->numparts); return 0; } /******************************************************************************\ * SIZ marker segment operations. \******************************************************************************/ static void jpc_siz_destroyparms(jpc_ms_t *ms) { jpc_siz_t *siz = &ms->parms.siz; if (siz->comps) { jas_free(siz->comps); } } static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_siz_t *siz = &ms->parms.siz; unsigned int i; uint_fast8_t tmp; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (jpc_getuint16(in, &siz->caps) || jpc_getuint32(in, &siz->width) || jpc_getuint32(in, &siz->height) || jpc_getuint32(in, &siz->xoff) || jpc_getuint32(in, &siz->yoff) || jpc_getuint32(in, &siz->tilewidth) || jpc_getuint32(in, &siz->tileheight) || jpc_getuint32(in, &siz->tilexoff) || jpc_getuint32(in, &siz->tileyoff) || jpc_getuint16(in, &siz->numcomps)) { return -1; } if (!siz->width || !siz->height || !siz->tilewidth || !siz->tileheight || !siz->numcomps) { return -1; } if (!(siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)))) { return -1; } for (i = 0; i < siz->numcomps; ++i) { if (jpc_getuint8(in, &tmp) || jpc_getuint8(in, &siz->comps[i].hsamp) || jpc_getuint8(in, &siz->comps[i].vsamp)) { jas_free(siz->comps); return -1; } siz->comps[i].sgnd = (tmp >> 7) & 1; siz->comps[i].prec = (tmp & 0x7f) + 1; } if (jas_stream_eof(in)) { jas_free(siz->comps); return -1; } return 0; } static int jpc_siz_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_siz_t *siz = &ms->parms.siz; unsigned int i; /* Eliminate compiler warning about unused variables. */ cstate = 0; assert(siz->width && siz->height && siz->tilewidth && siz->tileheight && siz->numcomps); if (jpc_putuint16(out, siz->caps) || jpc_putuint32(out, siz->width) || jpc_putuint32(out, siz->height) || jpc_putuint32(out, siz->xoff) || jpc_putuint32(out, siz->yoff) || jpc_putuint32(out, siz->tilewidth) || jpc_putuint32(out, siz->tileheight) || jpc_putuint32(out, siz->tilexoff) || jpc_putuint32(out, siz->tileyoff) || jpc_putuint16(out, siz->numcomps)) { return -1; } for (i = 0; i < siz->numcomps; ++i) { if (jpc_putuint8(out, ((siz->comps[i].sgnd & 1) << 7) | ((siz->comps[i].prec - 1) & 0x7f)) || jpc_putuint8(out, siz->comps[i].hsamp) || jpc_putuint8(out, siz->comps[i].vsamp)) { return -1; } } return 0; } static int jpc_siz_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_siz_t *siz = &ms->parms.siz; unsigned int i; fprintf(out, "caps = 0x%02x;\n", siz->caps); fprintf(out, "width = %d; height = %d; xoff = %d; yoff = %d;\n", siz->width, siz->height, siz->xoff, siz->yoff); fprintf(out, "tilewidth = %d; tileheight = %d; tilexoff = %d; " "tileyoff = %d;\n", siz->tilewidth, siz->tileheight, siz->tilexoff, siz->tileyoff); for (i = 0; i < siz->numcomps; ++i) { fprintf(out, "prec[%d] = %d; sgnd[%d] = %d; hsamp[%d] = %d; " "vsamp[%d] = %d\n", i, siz->comps[i].prec, i, siz->comps[i].sgnd, i, siz->comps[i].hsamp, i, siz->comps[i].vsamp); } return 0; } /******************************************************************************\ * COD marker segment operations. \******************************************************************************/ static void jpc_cod_destroyparms(jpc_ms_t *ms) { jpc_cod_t *cod = &ms->parms.cod; jpc_cox_destroycompparms(&cod->compparms); } static int jpc_cod_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_cod_t *cod = &ms->parms.cod; if (jpc_getuint8(in, &cod->csty)) { return -1; } if (jpc_getuint8(in, &cod->prg) || jpc_getuint16(in, &cod->numlyrs) || jpc_getuint8(in, &cod->mctrans)) { return -1; } if (jpc_cox_getcompparms(ms, cstate, in, (cod->csty & JPC_COX_PRT) != 0, &cod->compparms)) { return -1; } if (jas_stream_eof(in)) { jpc_cod_destroyparms(ms); return -1; } return 0; } static int jpc_cod_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_cod_t *cod = &ms->parms.cod; assert(cod->numlyrs > 0 && cod->compparms.numdlvls <= 32); assert(cod->compparms.numdlvls == cod->compparms.numrlvls - 1); if (jpc_putuint8(out, cod->compparms.csty) || jpc_putuint8(out, cod->prg) || jpc_putuint16(out, cod->numlyrs) || jpc_putuint8(out, cod->mctrans)) { return -1; } if (jpc_cox_putcompparms(ms, cstate, out, (cod->csty & JPC_COX_PRT) != 0, &cod->compparms)) { return -1; } return 0; } static int jpc_cod_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_cod_t *cod = &ms->parms.cod; int i; fprintf(out, "csty = 0x%02x;\n", cod->compparms.csty); fprintf(out, "numdlvls = %d; qmfbid = %d; mctrans = %d\n", cod->compparms.numdlvls, cod->compparms.qmfbid, cod->mctrans); fprintf(out, "prg = %d; numlyrs = %d;\n", cod->prg, cod->numlyrs); fprintf(out, "cblkwidthval = %d; cblkheightval = %d; " "cblksty = 0x%02x;\n", cod->compparms.cblkwidthval, cod->compparms.cblkheightval, cod->compparms.cblksty); if (cod->csty & JPC_COX_PRT) { for (i = 0; i < cod->compparms.numrlvls; ++i) { jas_eprintf("prcwidth[%d] = %d, prcheight[%d] = %d\n", i, cod->compparms.rlvls[i].parwidthval, i, cod->compparms.rlvls[i].parheightval); } } return 0; } /******************************************************************************\ * COC marker segment operations. \******************************************************************************/ static void jpc_coc_destroyparms(jpc_ms_t *ms) { jpc_coc_t *coc = &ms->parms.coc; jpc_cox_destroycompparms(&coc->compparms); } static int jpc_coc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_coc_t *coc = &ms->parms.coc; uint_fast8_t tmp; if (cstate->numcomps <= 256) { if (jpc_getuint8(in, &tmp)) { return -1; } coc->compno = tmp; } else { if (jpc_getuint16(in, &coc->compno)) { return -1; } } if (jpc_getuint8(in, &coc->compparms.csty)) { return -1; } if (jpc_cox_getcompparms(ms, cstate, in, (coc->compparms.csty & JPC_COX_PRT) != 0, &coc->compparms)) { return -1; } if (jas_stream_eof(in)) { return -1; } return 0; } static int jpc_coc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_coc_t *coc = &ms->parms.coc; assert(coc->compparms.numdlvls <= 32); if (cstate->numcomps <= 256) { if (jpc_putuint8(out, coc->compno)) { return -1; } } else { if (jpc_putuint16(out, coc->compno)) { return -1; } } if (jpc_putuint8(out, coc->compparms.csty)) { return -1; } if (jpc_cox_putcompparms(ms, cstate, out, (coc->compparms.csty & JPC_COX_PRT) != 0, &coc->compparms)) { return -1; } return 0; } static int jpc_coc_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_coc_t *coc = &ms->parms.coc; fprintf(out, "compno = %d; csty = 0x%02x; numdlvls = %d;\n", coc->compno, coc->compparms.csty, coc->compparms.numdlvls); fprintf(out, "cblkwidthval = %d; cblkheightval = %d; " "cblksty = 0x%02x; qmfbid = %d;\n", coc->compparms.cblkwidthval, coc->compparms.cblkheightval, coc->compparms.cblksty, coc->compparms.qmfbid); return 0; } /******************************************************************************\ * COD/COC marker segment operation helper functions. \******************************************************************************/ static void jpc_cox_destroycompparms(jpc_coxcp_t *compparms) { /* Eliminate compiler warning about unused variables. */ compparms = 0; } static int jpc_cox_getcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in, int prtflag, jpc_coxcp_t *compparms) { uint_fast8_t tmp; int i; /* Eliminate compiler warning about unused variables. */ ms = 0; cstate = 0; if (jpc_getuint8(in, &compparms->numdlvls) || jpc_getuint8(in, &compparms->cblkwidthval) || jpc_getuint8(in, &compparms->cblkheightval) || jpc_getuint8(in, &compparms->cblksty) || jpc_getuint8(in, &compparms->qmfbid)) { return -1; } compparms->numrlvls = compparms->numdlvls + 1; if (prtflag) { for (i = 0; i < compparms->numrlvls; ++i) { if (jpc_getuint8(in, &tmp)) { jpc_cox_destroycompparms(compparms); return -1; } compparms->rlvls[i].parwidthval = tmp & 0xf; compparms->rlvls[i].parheightval = (tmp >> 4) & 0xf; } /* Sigh. This bit should be in the same field in both COC and COD mrk segs. */ compparms->csty |= JPC_COX_PRT; } else { } if (jas_stream_eof(in)) { jpc_cox_destroycompparms(compparms); return -1; } return 0; } static int jpc_cox_putcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out, int prtflag, jpc_coxcp_t *compparms) { int i; assert(compparms->numdlvls <= 32); /* Eliminate compiler warning about unused variables. */ ms = 0; cstate = 0; if (jpc_putuint8(out, compparms->numdlvls) || jpc_putuint8(out, compparms->cblkwidthval) || jpc_putuint8(out, compparms->cblkheightval) || jpc_putuint8(out, compparms->cblksty) || jpc_putuint8(out, compparms->qmfbid)) { return -1; } if (prtflag) { for (i = 0; i < compparms->numrlvls; ++i) { if (jpc_putuint8(out, ((compparms->rlvls[i].parheightval & 0xf) << 4) | (compparms->rlvls[i].parwidthval & 0xf))) { return -1; } } } return 0; } /******************************************************************************\ * RGN marker segment operations. \******************************************************************************/ static int jpc_rgn_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_rgn_t *rgn = &ms->parms.rgn; uint_fast8_t tmp; if (cstate->numcomps <= 256) { if (jpc_getuint8(in, &tmp)) { return -1; } rgn->compno = tmp; } else { if (jpc_getuint16(in, &rgn->compno)) { return -1; } } if (jpc_getuint8(in, &rgn->roisty) || jpc_getuint8(in, &rgn->roishift)) { return -1; } return 0; } static int jpc_rgn_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_rgn_t *rgn = &ms->parms.rgn; if (cstate->numcomps <= 256) { if (jpc_putuint8(out, rgn->compno)) { return -1; } } else { if (jpc_putuint16(out, rgn->compno)) { return -1; } } if (jpc_putuint8(out, rgn->roisty) || jpc_putuint8(out, rgn->roishift)) { return -1; } return 0; } static int jpc_rgn_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_rgn_t *rgn = &ms->parms.rgn; fprintf(out, "compno = %d; roisty = %d; roishift = %d\n", rgn->compno, rgn->roisty, rgn->roishift); return 0; } /******************************************************************************\ * QCD marker segment operations. \******************************************************************************/ static void jpc_qcd_destroyparms(jpc_ms_t *ms) { jpc_qcd_t *qcd = &ms->parms.qcd; jpc_qcx_destroycompparms(&qcd->compparms); } static int jpc_qcd_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_qcxcp_t *compparms = &ms->parms.qcd.compparms; return jpc_qcx_getcompparms(compparms, cstate, in, ms->len); } static int jpc_qcd_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_qcxcp_t *compparms = &ms->parms.qcd.compparms; return jpc_qcx_putcompparms(compparms, cstate, out); } static int jpc_qcd_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_qcd_t *qcd = &ms->parms.qcd; int i; fprintf(out, "qntsty = %d; numguard = %d; numstepsizes = %d\n", (int) qcd->compparms.qntsty, qcd->compparms.numguard, qcd->compparms.numstepsizes); for (i = 0; i < qcd->compparms.numstepsizes; ++i) { fprintf(out, "expn[%d] = 0x%04x; mant[%d] = 0x%04x;\n", i, (unsigned) JPC_QCX_GETEXPN(qcd->compparms.stepsizes[i]), i, (unsigned) JPC_QCX_GETMANT(qcd->compparms.stepsizes[i])); } return 0; } /******************************************************************************\ * QCC marker segment operations. \******************************************************************************/ static void jpc_qcc_destroyparms(jpc_ms_t *ms) { jpc_qcc_t *qcc = &ms->parms.qcc; jpc_qcx_destroycompparms(&qcc->compparms); } static int jpc_qcc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_qcc_t *qcc = &ms->parms.qcc; uint_fast8_t tmp; int len; len = ms->len; if (cstate->numcomps <= 256) { jpc_getuint8(in, &tmp); qcc->compno = tmp; --len; } else { jpc_getuint16(in, &qcc->compno); len -= 2; } if (jpc_qcx_getcompparms(&qcc->compparms, cstate, in, len)) { return -1; } if (jas_stream_eof(in)) { jpc_qcc_destroyparms(ms); return -1; } return 0; } static int jpc_qcc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_qcc_t *qcc = &ms->parms.qcc; if (cstate->numcomps <= 256) { jpc_putuint8(out, qcc->compno); } else { jpc_putuint16(out, qcc->compno); } if (jpc_qcx_putcompparms(&qcc->compparms, cstate, out)) { return -1; } return 0; } static int jpc_qcc_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_qcc_t *qcc = &ms->parms.qcc; int i; fprintf(out, "compno = %d; qntsty = %d; numguard = %d; " "numstepsizes = %d\n", qcc->compno, qcc->compparms.qntsty, qcc->compparms.numguard, qcc->compparms.numstepsizes); for (i = 0; i < qcc->compparms.numstepsizes; ++i) { fprintf(out, "expn[%d] = 0x%04x; mant[%d] = 0x%04x;\n", i, (unsigned) JPC_QCX_GETEXPN(qcc->compparms.stepsizes[i]), i, (unsigned) JPC_QCX_GETMANT(qcc->compparms.stepsizes[i])); } return 0; } /******************************************************************************\ * QCD/QCC marker segment helper functions. \******************************************************************************/ static void jpc_qcx_destroycompparms(jpc_qcxcp_t *compparms) { if (compparms->stepsizes) { jas_free(compparms->stepsizes); } } static int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate, jas_stream_t *in, uint_fast16_t len) { uint_fast8_t tmp; int n; int i; /* Eliminate compiler warning about unused variables. */ cstate = 0; n = 0; jpc_getuint8(in, &tmp); ++n; compparms->qntsty = tmp & 0x1f; compparms->numguard = (tmp >> 5) & 7; switch (compparms->qntsty) { case JPC_QCX_SIQNT: compparms->numstepsizes = 1; break; case JPC_QCX_NOQNT: compparms->numstepsizes = (len - n); break; case JPC_QCX_SEQNT: /* XXX - this is a hack */ compparms->numstepsizes = (len - n) / 2; break; } if (compparms->numstepsizes > 0) { compparms->stepsizes = jas_malloc(compparms->numstepsizes * sizeof(uint_fast16_t)); assert(compparms->stepsizes); for (i = 0; i < compparms->numstepsizes; ++i) { if (compparms->qntsty == JPC_QCX_NOQNT) { jpc_getuint8(in, &tmp); compparms->stepsizes[i] = JPC_QCX_EXPN(tmp >> 3); } else { jpc_getuint16(in, &compparms->stepsizes[i]); } } } else { compparms->stepsizes = 0; } if (jas_stream_error(in) || jas_stream_eof(in)) { jpc_qcx_destroycompparms(compparms); return -1; } return 0; } static int jpc_qcx_putcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate, jas_stream_t *out) { int i; /* Eliminate compiler warning about unused variables. */ cstate = 0; jpc_putuint8(out, ((compparms->numguard & 7) << 5) | compparms->qntsty); for (i = 0; i < compparms->numstepsizes; ++i) { if (compparms->qntsty == JPC_QCX_NOQNT) { jpc_putuint8(out, JPC_QCX_GETEXPN( compparms->stepsizes[i]) << 3); } else { jpc_putuint16(out, compparms->stepsizes[i]); } } return 0; } /******************************************************************************\ * SOP marker segment operations. \******************************************************************************/ static int jpc_sop_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_sop_t *sop = &ms->parms.sop; /* Eliminate compiler warning about unused variable. */ cstate = 0; if (jpc_getuint16(in, &sop->seqno)) { return -1; } return 0; } static int jpc_sop_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_sop_t *sop = &ms->parms.sop; /* Eliminate compiler warning about unused variable. */ cstate = 0; if (jpc_putuint16(out, sop->seqno)) { return -1; } return 0; } static int jpc_sop_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_sop_t *sop = &ms->parms.sop; fprintf(out, "seqno = %d;\n", sop->seqno); return 0; } /******************************************************************************\ * PPM marker segment operations. \******************************************************************************/ static void jpc_ppm_destroyparms(jpc_ms_t *ms) { jpc_ppm_t *ppm = &ms->parms.ppm; if (ppm->data) { jas_free(ppm->data); } } static int jpc_ppm_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_ppm_t *ppm = &ms->parms.ppm; /* Eliminate compiler warning about unused variables. */ cstate = 0; ppm->data = 0; if (ms->len < 1) { goto error; } if (jpc_getuint8(in, &ppm->ind)) { goto error; } ppm->len = ms->len - 1; if (ppm->len > 0) { if (!(ppm->data = jas_malloc(ppm->len * sizeof(unsigned char)))) { goto error; } if (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) { goto error; } } else { ppm->data = 0; } return 0; error: jpc_ppm_destroyparms(ms); return -1; } static int jpc_ppm_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_ppm_t *ppm = &ms->parms.ppm; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (JAS_CAST(uint, jas_stream_write(out, (char *) ppm->data, ppm->len)) != ppm->len) { return -1; } return 0; } static int jpc_ppm_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_ppm_t *ppm = &ms->parms.ppm; fprintf(out, "ind=%d; len = %d;\n", ppm->ind, ppm->len); if (ppm->len > 0) { fprintf(out, "data =\n"); jas_memdump(out, ppm->data, ppm->len); } return 0; } /******************************************************************************\ * PPT marker segment operations. \******************************************************************************/ static void jpc_ppt_destroyparms(jpc_ms_t *ms) { jpc_ppt_t *ppt = &ms->parms.ppt; if (ppt->data) { jas_free(ppt->data); } } static int jpc_ppt_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_ppt_t *ppt = &ms->parms.ppt; /* Eliminate compiler warning about unused variables. */ cstate = 0; ppt->data = 0; if (ms->len < 1) { goto error; } if (jpc_getuint8(in, &ppt->ind)) { goto error; } ppt->len = ms->len - 1; if (ppt->len > 0) { if (!(ppt->data = jas_malloc(ppt->len * sizeof(unsigned char)))) { goto error; } if (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) { goto error; } } else { ppt->data = 0; } return 0; error: jpc_ppt_destroyparms(ms); return -1; } static int jpc_ppt_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_ppt_t *ppt = &ms->parms.ppt; /* Eliminate compiler warning about unused variable. */ cstate = 0; if (jpc_putuint8(out, ppt->ind)) { return -1; } if (jas_stream_write(out, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) { return -1; } return 0; } static int jpc_ppt_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_ppt_t *ppt = &ms->parms.ppt; fprintf(out, "ind=%d; len = %d;\n", ppt->ind, ppt->len); if (ppt->len > 0) { fprintf(out, "data =\n"); jas_memdump(out, ppt->data, ppt->len); } return 0; } /******************************************************************************\ * POC marker segment operations. \******************************************************************************/ static void jpc_poc_destroyparms(jpc_ms_t *ms) { jpc_poc_t *poc = &ms->parms.poc; if (poc->pchgs) { jas_free(poc->pchgs); } } static int jpc_poc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_poc_t *poc = &ms->parms.poc; jpc_pocpchg_t *pchg; int pchgno; uint_fast8_t tmp; poc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) : (ms->len / 7); if (!(poc->pchgs = jas_malloc(poc->numpchgs * sizeof(jpc_pocpchg_t)))) { goto error; } for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno, ++pchg) { if (jpc_getuint8(in, &pchg->rlvlnostart)) { goto error; } if (cstate->numcomps > 256) { if (jpc_getuint16(in, &pchg->compnostart)) { goto error; } } else { if (jpc_getuint8(in, &tmp)) { goto error; }; pchg->compnostart = tmp; } if (jpc_getuint16(in, &pchg->lyrnoend) || jpc_getuint8(in, &pchg->rlvlnoend)) { goto error; } if (cstate->numcomps > 256) { if (jpc_getuint16(in, &pchg->compnoend)) { goto error; } } else { if (jpc_getuint8(in, &tmp)) { goto error; } pchg->compnoend = tmp; } if (jpc_getuint8(in, &pchg->prgord)) { goto error; } if (pchg->rlvlnostart > pchg->rlvlnoend || pchg->compnostart > pchg->compnoend) { goto error; } } return 0; error: jpc_poc_destroyparms(ms); return -1; } static int jpc_poc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_poc_t *poc = &ms->parms.poc; jpc_pocpchg_t *pchg; int pchgno; for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno, ++pchg) { if (jpc_putuint8(out, pchg->rlvlnostart) || ((cstate->numcomps > 256) ? jpc_putuint16(out, pchg->compnostart) : jpc_putuint8(out, pchg->compnostart)) || jpc_putuint16(out, pchg->lyrnoend) || jpc_putuint8(out, pchg->rlvlnoend) || ((cstate->numcomps > 256) ? jpc_putuint16(out, pchg->compnoend) : jpc_putuint8(out, pchg->compnoend)) || jpc_putuint8(out, pchg->prgord)) { return -1; } } return 0; } static int jpc_poc_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_poc_t *poc = &ms->parms.poc; jpc_pocpchg_t *pchg; int pchgno; for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno, ++pchg) { fprintf(out, "po[%d] = %d; ", pchgno, pchg->prgord); fprintf(out, "cs[%d] = %d; ce[%d] = %d; ", pchgno, pchg->compnostart, pchgno, pchg->compnoend); fprintf(out, "rs[%d] = %d; re[%d] = %d; ", pchgno, pchg->rlvlnostart, pchgno, pchg->rlvlnoend); fprintf(out, "le[%d] = %d\n", pchgno, pchg->lyrnoend); } return 0; } /******************************************************************************\ * CRG marker segment operations. \******************************************************************************/ static void jpc_crg_destroyparms(jpc_ms_t *ms) { jpc_crg_t *crg = &ms->parms.crg; if (crg->comps) { jas_free(crg->comps); } } static int jpc_crg_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_crg_t *crg = &ms->parms.crg; jpc_crgcomp_t *comp; uint_fast16_t compno; crg->numcomps = cstate->numcomps; if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) { return -1; } for (compno = 0, comp = crg->comps; compno < cstate->numcomps; ++compno, ++comp) { if (jpc_getuint16(in, &comp->hoff) || jpc_getuint16(in, &comp->voff)) { jpc_crg_destroyparms(ms); return -1; } } return 0; } static int jpc_crg_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_crg_t *crg = &ms->parms.crg; int compno; jpc_crgcomp_t *comp; /* Eliminate compiler warning about unused variables. */ cstate = 0; for (compno = 0, comp = crg->comps; compno < crg->numcomps; ++compno, ++comp) { if (jpc_putuint16(out, comp->hoff) || jpc_putuint16(out, comp->voff)) { return -1; } } return 0; } static int jpc_crg_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_crg_t *crg = &ms->parms.crg; int compno; jpc_crgcomp_t *comp; for (compno = 0, comp = crg->comps; compno < crg->numcomps; ++compno, ++comp) { fprintf(out, "hoff[%d] = %d; voff[%d] = %d\n", compno, comp->hoff, compno, comp->voff); } return 0; } /******************************************************************************\ * Operations for COM marker segment. \******************************************************************************/ static void jpc_com_destroyparms(jpc_ms_t *ms) { jpc_com_t *com = &ms->parms.com; if (com->data) { jas_free(com->data); } } static int jpc_com_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_com_t *com = &ms->parms.com; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (jpc_getuint16(in, &com->regid)) { return -1; } com->len = ms->len - 2; if (com->len > 0) { if (!(com->data = jas_malloc(com->len))) { return -1; } if (jas_stream_read(in, com->data, com->len) != JAS_CAST(int, com->len)) { return -1; } } else { com->data = 0; } return 0; } static int jpc_com_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_com_t *com = &ms->parms.com; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (jpc_putuint16(out, com->regid)) { return -1; } if (jas_stream_write(out, com->data, com->len) != JAS_CAST(int, com->len)) { return -1; } return 0; } static int jpc_com_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_com_t *com = &ms->parms.com; unsigned int i; int printable; fprintf(out, "regid = %d;\n", com->regid); printable = 1; for (i = 0; i < com->len; ++i) { if (!isprint(com->data[i])) { printable = 0; break; } } if (printable) { fprintf(out, "data = "); fwrite(com->data, sizeof(char), com->len, out); fprintf(out, "\n"); } return 0; } /******************************************************************************\ * Operations for unknown types of marker segments. \******************************************************************************/ static void jpc_unk_destroyparms(jpc_ms_t *ms) { jpc_unk_t *unk = &ms->parms.unk; if (unk->data) { jas_free(unk->data); } } static int jpc_unk_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_unk_t *unk = &ms->parms.unk; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (ms->len > 0) { if (!(unk->data = jas_malloc(ms->len * sizeof(unsigned char)))) { return -1; } if (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) { jas_free(unk->data); return -1; } unk->len = ms->len; } else { unk->data = 0; unk->len = 0; } return 0; } static int jpc_unk_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { /* Eliminate compiler warning about unused variables. */ cstate = 0; ms = 0; out = 0; /* If this function is called, we are trying to write an unsupported type of marker segment. Return with an error indication. */ return -1; } static int jpc_unk_dumpparms(jpc_ms_t *ms, FILE *out) { unsigned int i; jpc_unk_t *unk = &ms->parms.unk; for (i = 0; i < unk->len; ++i) { fprintf(out, "%02x ", unk->data[i]); } return 0; } /******************************************************************************\ * Primitive I/O operations. \******************************************************************************/ int jpc_getuint8(jas_stream_t *in, uint_fast8_t *val) { int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } if (val) { *val = c; } return 0; } int jpc_putuint8(jas_stream_t *out, uint_fast8_t val) { if (jas_stream_putc(out, val & 0xff) == EOF) { return -1; } return 0; } int jpc_getuint16(jas_stream_t *in, uint_fast16_t *val) { uint_fast16_t v; int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if (val) { *val = v; } return 0; } int jpc_putuint16(jas_stream_t *out, uint_fast16_t val) { if (jas_stream_putc(out, (val >> 8) & 0xff) == EOF || jas_stream_putc(out, val & 0xff) == EOF) { return -1; } return 0; } int jpc_getuint32(jas_stream_t *in, uint_fast32_t *val) { uint_fast32_t v; int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if (val) { *val = v; } return 0; } int jpc_putuint32(jas_stream_t *out, uint_fast32_t val) { if (jas_stream_putc(out, (val >> 24) & 0xff) == EOF || jas_stream_putc(out, (val >> 16) & 0xff) == EOF || jas_stream_putc(out, (val >> 8) & 0xff) == EOF || jas_stream_putc(out, val & 0xff) == EOF) { return -1; } return 0; } /******************************************************************************\ * Miscellany \******************************************************************************/ static jpc_mstabent_t *jpc_mstab_lookup(int id) { jpc_mstabent_t *mstabent; for (mstabent = jpc_mstab;; ++mstabent) { if (mstabent->id == id || mstabent->id < 0) { return mstabent; } } assert(0); return 0; } int jpc_validate(jas_stream_t *in) { int n; int i; unsigned char buf[2]; assert(JAS_STREAM_MAXPUTBACK >= 2); if ((n = jas_stream_read(in, (char *) buf, 2)) < 0) { return -1; } for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } if (n < 2) { return -1; } if (buf[0] == (JPC_MS_SOC >> 8) && buf[1] == (JPC_MS_SOC & 0xff)) { return 0; } return -1; } int jpc_getdata(jas_stream_t *in, jas_stream_t *out, long len) { return jas_stream_copy(out, in, len); } int jpc_putdata(jas_stream_t *out, jas_stream_t *in, long len) { return jas_stream_copy(out, in, len); } jasper-1.900.1/src/libjasper/jpc/jpc_tsfb.h0000644000175000017500000001157410554235553017434 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2004 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tree-Structured Filter Bank (TSFB) Library * * $Id$ */ #ifndef JPC_TSFB_H #define JPC_TSFB_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_seq.h" #include "jpc_fix.h" #include "jpc_qmfb.h" /******************************************************************************\ * Constants. \******************************************************************************/ #define JPC_TSFB_MAXBANDS (JPC_TSFB_MAXDEPTH * 3 + 1) #define JPC_TSFB_MAXDEPTH 32 #define JPC_TSFB_RITIMODE JPC_QMFB1D_RITIMODE #define JPC_TSFB_LL 0 #define JPC_TSFB_LH 1 #define JPC_TSFB_HL 2 #define JPC_TSFB_HH 3 /******************************************************************************\ * Types. \******************************************************************************/ typedef struct { int xstart; int ystart; int xend; int yend; int orient; int locxstart; int locystart; int locxend; int locyend; jpc_fix_t synenergywt; } jpc_tsfb_band_t; typedef struct { int numlvls; jpc_qmfb2d_t *qmfb; } jpc_tsfb_t; /******************************************************************************\ * Functions. \******************************************************************************/ /* Create a TSFB. */ jpc_tsfb_t *jpc_cod_gettsfb(int qmfbid, int numlevels); /* Destroy a TSFB. */ void jpc_tsfb_destroy(jpc_tsfb_t *tsfb); /* Perform analysis. */ int jpc_tsfb_analyze(jpc_tsfb_t *tsfb, jas_seq2d_t *x); /* Perform synthesis. */ int jpc_tsfb_synthesize(jpc_tsfb_t *tsfb, jas_seq2d_t *x); /* Get band information for a TSFB. */ int jpc_tsfb_getbands(jpc_tsfb_t *tsfb, uint_fast32_t xstart, uint_fast32_t ystart, uint_fast32_t xend, uint_fast32_t yend, jpc_tsfb_band_t *bands); #endif jasper-1.900.1/src/libjasper/jpc/jpc_mqcod.h0000644000175000017500000001030010554235553017563 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * MQ Arithmetic Coder * * $Id$ */ #ifndef JPC_MQCOD_H #define JPC_MQCOD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" /******************************************************************************\ * Types. \******************************************************************************/ /* * MQ coder context information. */ typedef struct { /* The most probable symbol (MPS). */ int mps; /* The state index. */ int_fast16_t ind; } jpc_mqctx_t; /* * MQ coder state table entry. */ typedef struct jpc_mqstate_s { /* The Qe value. */ uint_fast16_t qeval; /* The MPS. */ int mps; /* The NMPS state. */ struct jpc_mqstate_s *nmps; /* The NLPS state. */ struct jpc_mqstate_s *nlps; } jpc_mqstate_t; /******************************************************************************\ * Data. \******************************************************************************/ /* The state table for the MQ coder. */ extern jpc_mqstate_t jpc_mqstates[]; #endif jasper-1.900.1/src/libjasper/jpc/jpc_mqdec.c0000644000175000017500000002241110554235553017552 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * MQ Arithmetic Decoder * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_types.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jasper/jas_debug.h" #include "jpc_mqdec.h" /******************************************************************************\ * Local macros. \******************************************************************************/ #if defined(DEBUG) #define MQDEC_CALL(n, x) \ ((jas_getdbglevel() >= (n)) ? ((void)(x)) : ((void)0)) #else #define MQDEC_CALL(n, x) #endif /******************************************************************************\ * Local function prototypes. \******************************************************************************/ static void jpc_mqdec_bytein(jpc_mqdec_t *mqdec); /******************************************************************************\ * Code for creation and destruction of a MQ decoder. \******************************************************************************/ /* Create a MQ decoder. */ jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in) { jpc_mqdec_t *mqdec; /* There must be at least one context. */ assert(maxctxs > 0); /* Allocate memory for the MQ decoder. */ if (!(mqdec = jas_malloc(sizeof(jpc_mqdec_t)))) { goto error; } mqdec->in = in; mqdec->maxctxs = maxctxs; /* Allocate memory for the per-context state information. */ if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) { goto error; } /* Set the current context to the first context. */ mqdec->curctx = mqdec->ctxs; /* If an input stream has been associated with the MQ decoder, initialize the decoder state from the stream. */ if (mqdec->in) { jpc_mqdec_init(mqdec); } /* Initialize the per-context state information. */ jpc_mqdec_setctxs(mqdec, 0, 0); return mqdec; error: /* Oops... Something has gone wrong. */ if (mqdec) { jpc_mqdec_destroy(mqdec); } return 0; } /* Destroy a MQ decoder. */ void jpc_mqdec_destroy(jpc_mqdec_t *mqdec) { if (mqdec->ctxs) { jas_free(mqdec->ctxs); } jas_free(mqdec); } /******************************************************************************\ * Code for initialization of a MQ decoder. \******************************************************************************/ /* Initialize the state of a MQ decoder. */ void jpc_mqdec_init(jpc_mqdec_t *mqdec) { int c; mqdec->eof = 0; mqdec->creg = 0; /* Get the next byte from the input stream. */ if ((c = jas_stream_getc(mqdec->in)) == EOF) { /* We have encountered an I/O error or EOF. */ c = 0xff; mqdec->eof = 1; } mqdec->inbuffer = c; mqdec->creg += mqdec->inbuffer << 16; jpc_mqdec_bytein(mqdec); mqdec->creg <<= 7; mqdec->ctreg -= 7; mqdec->areg = 0x8000; } /* Set the input stream for a MQ decoder. */ void jpc_mqdec_setinput(jpc_mqdec_t *mqdec, jas_stream_t *in) { mqdec->in = in; } /* Initialize one or more contexts. */ void jpc_mqdec_setctxs(jpc_mqdec_t *mqdec, int numctxs, jpc_mqctx_t *ctxs) { jpc_mqstate_t **ctx; int n; ctx = mqdec->ctxs; n = JAS_MIN(mqdec->maxctxs, numctxs); while (--n >= 0) { *ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps]; ++ctx; ++ctxs; } n = mqdec->maxctxs - numctxs; while (--n >= 0) { *ctx = &jpc_mqstates[0]; ++ctx; } } /* Initialize a context. */ void jpc_mqdec_setctx(jpc_mqdec_t *mqdec, int ctxno, jpc_mqctx_t *ctx) { jpc_mqstate_t **ctxi; ctxi = &mqdec->ctxs[ctxno]; *ctxi = &jpc_mqstates[2 * ctx->ind + ctx->mps]; } /******************************************************************************\ * Code for decoding a bit. \******************************************************************************/ /* Decode a bit. */ int jpc_mqdec_getbit_func(register jpc_mqdec_t *mqdec) { int bit; JAS_DBGLOG(100, ("jpc_mqdec_getbit_func(%p)\n", mqdec)); MQDEC_CALL(100, jpc_mqdec_dump(mqdec, stderr)); bit = jpc_mqdec_getbit_macro(mqdec); MQDEC_CALL(100, jpc_mqdec_dump(mqdec, stderr)); JAS_DBGLOG(100, ("ctx = %d, decoded %d\n", mqdec->curctx - mqdec->ctxs, bit)); return bit; } /* Apply MPS_EXCHANGE algorithm (with RENORMD). */ int jpc_mqdec_mpsexchrenormd(register jpc_mqdec_t *mqdec) { int ret; register jpc_mqstate_t *state = *mqdec->curctx; jpc_mqdec_mpsexchange(mqdec->areg, state->qeval, mqdec->curctx, ret); jpc_mqdec_renormd(mqdec->areg, mqdec->creg, mqdec->ctreg, mqdec->in, mqdec->eof, mqdec->inbuffer); return ret; } /* Apply LPS_EXCHANGE algorithm (with RENORMD). */ int jpc_mqdec_lpsexchrenormd(register jpc_mqdec_t *mqdec) { int ret; register jpc_mqstate_t *state = *mqdec->curctx; jpc_mqdec_lpsexchange(mqdec->areg, state->qeval, mqdec->curctx, ret); jpc_mqdec_renormd(mqdec->areg, mqdec->creg, mqdec->ctreg, mqdec->in, mqdec->eof, mqdec->inbuffer); return ret; } /******************************************************************************\ * Support code. \******************************************************************************/ /* Apply the BYTEIN algorithm. */ static void jpc_mqdec_bytein(jpc_mqdec_t *mqdec) { int c; unsigned char prevbuf; if (!mqdec->eof) { if ((c = jas_stream_getc(mqdec->in)) == EOF) { mqdec->eof = 1; c = 0xff; } prevbuf = mqdec->inbuffer; mqdec->inbuffer = c; if (prevbuf == 0xff) { if (c > 0x8f) { mqdec->creg += 0xff00; mqdec->ctreg = 8; } else { mqdec->creg += c << 9; mqdec->ctreg = 7; } } else { mqdec->creg += c << 8; mqdec->ctreg = 8; } } else { mqdec->creg += 0xff00; mqdec->ctreg = 8; } } /******************************************************************************\ * Code for debugging. \******************************************************************************/ /* Dump a MQ decoder to a stream for debugging. */ void jpc_mqdec_dump(jpc_mqdec_t *mqdec, FILE *out) { fprintf(out, "MQDEC A = %08lx, C = %08lx, CT=%08lx, ", (unsigned long) mqdec->areg, (unsigned long) mqdec->creg, (unsigned long) mqdec->ctreg); fprintf(out, "CTX = %d, ", mqdec->curctx - mqdec->ctxs); fprintf(out, "IND %d, MPS %d, QEVAL %x\n", *mqdec->curctx - jpc_mqstates, (*mqdec->curctx)->mps, (*mqdec->curctx)->qeval); } jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c0000644000175000017500000002350310554235553020117 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tag Tree Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include "jasper/jas_malloc.h" #include "jpc_tagtree.h" /******************************************************************************\ * Prototypes. \******************************************************************************/ static jpc_tagtree_t *jpc_tagtree_alloc(void); /******************************************************************************\ * Code for creating and destroying tag trees. \******************************************************************************/ /* Create a tag tree. */ jpc_tagtree_t *jpc_tagtree_create(int numleafsh, int numleafsv) { int nplh[JPC_TAGTREE_MAXDEPTH]; int nplv[JPC_TAGTREE_MAXDEPTH]; jpc_tagtreenode_t *node; jpc_tagtreenode_t *parentnode; jpc_tagtreenode_t *parentnode0; jpc_tagtree_t *tree; int i; int j; int k; int numlvls; int n; assert(numleafsh > 0 && numleafsv > 0); if (!(tree = jpc_tagtree_alloc())) { return 0; } tree->numleafsh_ = numleafsh; tree->numleafsv_ = numleafsv; numlvls = 0; nplh[0] = numleafsh; nplv[0] = numleafsv; do { n = nplh[numlvls] * nplv[numlvls]; nplh[numlvls + 1] = (nplh[numlvls] + 1) / 2; nplv[numlvls + 1] = (nplv[numlvls] + 1) / 2; tree->numnodes_ += n; ++numlvls; } while (n > 1); if (!(tree->nodes_ = jas_malloc(tree->numnodes_ * sizeof(jpc_tagtreenode_t)))) { return 0; } /* Initialize the parent links for all nodes in the tree. */ node = tree->nodes_; parentnode = &tree->nodes_[tree->numleafsh_ * tree->numleafsv_]; parentnode0 = parentnode; for (i = 0; i < numlvls - 1; ++i) { for (j = 0; j < nplv[i]; ++j) { k = nplh[i]; while (--k >= 0) { node->parent_ = parentnode; ++node; if (--k >= 0) { node->parent_ = parentnode; ++node; } ++parentnode; } if ((j & 1) || j == nplv[i] - 1) { parentnode0 = parentnode; } else { parentnode = parentnode0; parentnode0 += nplh[i]; } } } node->parent_ = 0; /* Initialize the data values to something sane. */ jpc_tagtree_reset(tree); return tree; } /* Destroy a tag tree. */ void jpc_tagtree_destroy(jpc_tagtree_t *tree) { if (tree->nodes_) { jas_free(tree->nodes_); } jas_free(tree); } static jpc_tagtree_t *jpc_tagtree_alloc() { jpc_tagtree_t *tree; if (!(tree = jas_malloc(sizeof(jpc_tagtree_t)))) { return 0; } tree->numleafsh_ = 0; tree->numleafsv_ = 0; tree->numnodes_ = 0; tree->nodes_ = 0; return tree; } /******************************************************************************\ * Code. \******************************************************************************/ /* Copy state information from one tag tree to another. */ void jpc_tagtree_copy(jpc_tagtree_t *dsttree, jpc_tagtree_t *srctree) { int n; jpc_tagtreenode_t *srcnode; jpc_tagtreenode_t *dstnode; /* The two tag trees must have similar sizes. */ assert(srctree->numleafsh_ == dsttree->numleafsh_ && srctree->numleafsv_ == dsttree->numleafsv_); n = srctree->numnodes_; srcnode = srctree->nodes_; dstnode = dsttree->nodes_; while (--n >= 0) { dstnode->value_ = srcnode->value_; dstnode->low_ = srcnode->low_; dstnode->known_ = srcnode->known_; ++dstnode; ++srcnode; } } /* Reset all of the state information associated with a tag tree. */ void jpc_tagtree_reset(jpc_tagtree_t *tree) { int n; jpc_tagtreenode_t *node; n = tree->numnodes_; node = tree->nodes_; while (--n >= 0) { node->value_ = INT_MAX; node->low_ = 0; node->known_ = 0; ++node; } } /* Set the value associated with the specified leaf node, updating the other nodes as necessary. */ void jpc_tagtree_setvalue(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int value) { jpc_tagtreenode_t *node; /* Avoid compiler warnings about unused parameters. */ tree = 0; assert(value >= 0); node = leaf; while (node && node->value_ > value) { node->value_ = value; node = node->parent_; } } /* Get a particular leaf node. */ jpc_tagtreenode_t *jpc_tagtree_getleaf(jpc_tagtree_t *tree, int n) { return &tree->nodes_[n]; } /* Invoke the tag tree encoding procedure. */ int jpc_tagtree_encode(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int threshold, jpc_bitstream_t *out) { jpc_tagtreenode_t *stk[JPC_TAGTREE_MAXDEPTH - 1]; jpc_tagtreenode_t **stkptr; jpc_tagtreenode_t *node; int low; /* Avoid compiler warnings about unused parameters. */ tree = 0; assert(leaf); assert(threshold >= 0); /* Traverse to the root of the tree, recording the path taken. */ stkptr = stk; node = leaf; while (node->parent_) { *stkptr++ = node; node = node->parent_; } low = 0; for (;;) { if (low > node->low_) { /* Deferred propagation of the lower bound downward in the tree. */ node->low_ = low; } else { low = node->low_; } while (low < threshold) { if (low >= node->value_) { if (!node->known_) { if (jpc_bitstream_putbit(out, 1) == EOF) { return -1; } node->known_ = 1; } break; } if (jpc_bitstream_putbit(out, 0) == EOF) { return -1; } ++low; } node->low_ = low; if (stkptr == stk) { break; } node = *--stkptr; } return (leaf->low_ < threshold) ? 1 : 0; } /* Invoke the tag tree decoding procedure. */ int jpc_tagtree_decode(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int threshold, jpc_bitstream_t *in) { jpc_tagtreenode_t *stk[JPC_TAGTREE_MAXDEPTH - 1]; jpc_tagtreenode_t **stkptr; jpc_tagtreenode_t *node; int low; int ret; /* Avoid compiler warnings about unused parameters. */ tree = 0; assert(threshold >= 0); /* Traverse to the root of the tree, recording the path taken. */ stkptr = stk; node = leaf; while (node->parent_) { *stkptr++ = node; node = node->parent_; } low = 0; for (;;) { if (low > node->low_) { node->low_ = low; } else { low = node->low_; } while (low < threshold && low < node->value_) { if ((ret = jpc_bitstream_getbit(in)) < 0) { return -1; } if (ret) { node->value_ = low; } else { ++low; } } node->low_ = low; if (stkptr == stk) { break; } node = *--stkptr; } return (node->value_ < threshold) ? 1 : 0; } /******************************************************************************\ * Code for debugging. \******************************************************************************/ void jpc_tagtree_dump(jpc_tagtree_t *tree, FILE *out) { jpc_tagtreenode_t *node; int n; node = tree->nodes_; n = tree->numnodes_; while (--n >= 0) { fprintf(out, "node %p, parent %p, value %d, lower %d, known %d\n", (void *) node, (void *) node->parent_, node->value_, node->low_, node->known_); ++node; } } jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.h0000644000175000017500000001323510554235553020125 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tag Tree Library * * $Id$ */ #ifndef JPC_TAGTREE_H #define JPC_TAGTREE_H /******************************************************************************\ * Includes \******************************************************************************/ #include #include #include "jpc_bs.h" /******************************************************************************\ * Constants \******************************************************************************/ /* The maximum allowable depth for a tag tree. */ #define JPC_TAGTREE_MAXDEPTH 32 /******************************************************************************\ * Types \******************************************************************************/ /* * Tag tree node. */ typedef struct jpc_tagtreenode_ { /* The parent of this node. */ struct jpc_tagtreenode_ *parent_; /* The value associated with this node. */ int value_; /* The lower bound on the value associated with this node. */ int low_; /* A flag indicating if the value is known exactly. */ int known_; } jpc_tagtreenode_t; /* * Tag tree. */ typedef struct { /* The number of leaves in the horizontal direction. */ int numleafsh_; /* The number of leaves in the vertical direction. */ int numleafsv_; /* The total number of nodes in the tree. */ int numnodes_; /* The nodes. */ jpc_tagtreenode_t *nodes_; } jpc_tagtree_t; /******************************************************************************\ * Functions. \******************************************************************************/ /* Create a tag tree. */ jpc_tagtree_t *jpc_tagtree_create(int numleafsh, int numleafsv); /* Destroy a tag tree. */ void jpc_tagtree_destroy(jpc_tagtree_t *tree); /* Copy data from one tag tree to another. */ void jpc_tagtree_copy(jpc_tagtree_t *dsttree, jpc_tagtree_t *srctree); /* Reset the tag tree state. */ void jpc_tagtree_reset(jpc_tagtree_t *tree); /* Set the value associated with a particular leaf node of a tag tree. */ void jpc_tagtree_setvalue(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int value); /* Get a pointer to a particular leaf node. */ jpc_tagtreenode_t *jpc_tagtree_getleaf(jpc_tagtree_t *tree, int n); /* Invoke the tag tree decoding procedure. */ int jpc_tagtree_decode(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int threshold, jpc_bitstream_t *in); /* Invoke the tag tree encoding procedure. */ int jpc_tagtree_encode(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int threshold, jpc_bitstream_t *out); /* Dump a tag tree (for debugging purposes). */ void jpc_tagtree_dump(jpc_tagtree_t *tree, FILE *out); #endif jasper-1.900.1/src/libjasper/jpc/jpc_cs.h0000644000175000017500000004627510554235553017111 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JPEG-2000 Code Stream Library * * $Id$ */ #ifndef JPC_CS_H #define JPC_CS_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_image.h" #include "jasper/jas_stream.h" #include "jpc_cod.h" /******************************************************************************\ * Constants and Types. \******************************************************************************/ /* The maximum number of resolution levels. */ #define JPC_MAXRLVLS 33 /* The maximum number of bands. */ #define JPC_MAXBANDS (3 * JPC_MAXRLVLS + 1) /* The maximum number of layers. */ #define JPC_MAXLYRS 16384 /**************************************\ * Code stream. \**************************************/ /* * Code stream states. */ /* Initial. */ #define JPC_CS_INIT 0 /* Main header. */ #define JPC_CS_MHDR 1 /* Tile-part header. */ #define JPC_CS_THDR 2 /* Main trailer. */ #define JPC_CS_MTLR 3 /* Tile-part data. */ #define JPC_CS_TDATA 4 /* * Unfortunately, the code stream syntax was not designed in such a way that * any given marker segment can be correctly decoded without additional state * derived from previously decoded marker segments. * For example, a RGN/COC/QCC marker segment cannot be decoded unless the * number of components is known. */ /* * Code stream state information. */ typedef struct { /* The number of components. */ uint_fast16_t numcomps; } jpc_cstate_t; /**************************************\ * SOT marker segment parameters. \**************************************/ typedef struct { /* The tile number. */ uint_fast16_t tileno; /* The combined length of the marker segment and its auxilary data (i.e., packet data). */ uint_fast32_t len; /* The tile-part instance. */ uint_fast8_t partno; /* The number of tile-parts. */ uint_fast8_t numparts; } jpc_sot_t; /**************************************\ * SIZ marker segment parameters. \**************************************/ /* Per component information. */ typedef struct { /* The precision of the samples. */ uint_fast8_t prec; /* The signedness of the samples. */ uint_fast8_t sgnd; /* The horizontal separation of samples with respect to the reference grid. */ uint_fast8_t hsamp; /* The vertical separation of samples with respect to the reference grid. */ uint_fast8_t vsamp; } jpc_sizcomp_t; /* SIZ marker segment parameters. */ typedef struct { /* The code stream capabilities. */ uint_fast16_t caps; /* The width of the image in units of the reference grid. */ uint_fast32_t width; /* The height of the image in units of the reference grid. */ uint_fast32_t height; /* The horizontal offset from the origin of the reference grid to the left side of the image area. */ uint_fast32_t xoff; /* The vertical offset from the origin of the reference grid to the top side of the image area. */ uint_fast32_t yoff; /* The nominal width of a tile in units of the reference grid. */ uint_fast32_t tilewidth; /* The nominal height of a tile in units of the reference grid. */ uint_fast32_t tileheight; /* The horizontal offset from the origin of the reference grid to the left side of the first tile. */ uint_fast32_t tilexoff; /* The vertical offset from the origin of the reference grid to the top side of the first tile. */ uint_fast32_t tileyoff; /* The number of components. */ uint_fast16_t numcomps; /* The per-component information. */ jpc_sizcomp_t *comps; } jpc_siz_t; /**************************************\ * COD marker segment parameters. \**************************************/ /* * Coding style constants. */ /* Precincts may be used. */ #define JPC_COX_PRT 0x01 /* SOP marker segments may be used. */ #define JPC_COD_SOP 0x02 /* EPH marker segments may be used. */ #define JPC_COD_EPH 0x04 /* * Progression order constants. */ /* Layer-resolution-component-precinct progressive (i.e., progressive by fidelity). */ #define JPC_COD_LRCPPRG 0 /* Resolution-layer-component-precinct progressive (i.e., progressive by resolution). */ #define JPC_COD_RLCPPRG 1 /* Resolution-precinct-component-layer progressive. */ #define JPC_COD_RPCLPRG 2 /* Precinct-component-resolution-layer progressive. */ #define JPC_COD_PCRLPRG 3 /* Component-position-resolution-layer progressive. */ #define JPC_COD_CPRLPRG 4 /* * Code block style constants. */ #define JPC_COX_LAZY 0x01 /* Selective arithmetic coding bypass. */ #define JPC_COX_RESET 0x02 /* Reset context probabilities. */ #define JPC_COX_TERMALL 0x04 /* Terminate all coding passes. */ #define JPC_COX_VSC 0x08 /* Vertical stripe causal context formation. */ #define JPC_COX_PTERM 0x10 /* Predictable termination. */ #define JPC_COX_SEGSYM 0x20 /* Use segmentation symbols. */ /* Transform constants. */ #define JPC_COX_INS 0x00 /* Irreversible 9/7. */ #define JPC_COX_RFT 0x01 /* Reversible 5/3. */ /* Multicomponent transform constants. */ #define JPC_COD_NOMCT 0x00 /* No multicomponent transform. */ #define JPC_COD_MCT 0x01 /* Multicomponent transform. */ /* Get the code block size value from the code block size exponent. */ #define JPC_COX_CBLKSIZEEXPN(x) ((x) - 2) /* Get the code block size exponent from the code block size value. */ #define JPC_COX_GETCBLKSIZEEXPN(x) ((x) + 2) /* Per resolution-level information. */ typedef struct { /* The packet partition width. */ uint_fast8_t parwidthval; /* The packet partition height. */ uint_fast8_t parheightval; } jpc_coxrlvl_t; /* Per component information. */ typedef struct { /* The coding style. */ uint_fast8_t csty; /* The number of decomposition levels. */ uint_fast8_t numdlvls; /* The nominal code block width specifier. */ uint_fast8_t cblkwidthval; /* The nominal code block height specifier. */ uint_fast8_t cblkheightval; /* The style of coding passes. */ uint_fast8_t cblksty; /* The QMFB employed. */ uint_fast8_t qmfbid; /* The number of resolution levels. */ int numrlvls; /* The per-resolution-level information. */ jpc_coxrlvl_t rlvls[JPC_MAXRLVLS]; } jpc_coxcp_t; /* COD marker segment parameters. */ typedef struct { /* The general coding style. */ uint_fast8_t csty; /* The progression order. */ uint_fast8_t prg; /* The number of layers. */ uint_fast16_t numlyrs; /* The multicomponent transform. */ uint_fast8_t mctrans; /* Component-related parameters. */ jpc_coxcp_t compparms; } jpc_cod_t; /* COC marker segment parameters. */ typedef struct { /* The component number. */ uint_fast16_t compno; /* Component-related parameters. */ jpc_coxcp_t compparms; } jpc_coc_t; /**************************************\ * RGN marker segment parameters. \**************************************/ /* The maxshift ROI style. */ #define JPC_RGN_MAXSHIFT 0x00 typedef struct { /* The component to which the marker applies. */ uint_fast16_t compno; /* The ROI style. */ uint_fast8_t roisty; /* The ROI shift value. */ uint_fast8_t roishift; } jpc_rgn_t; /**************************************\ * QCD/QCC marker segment parameters. \**************************************/ /* * Quantization style constants. */ #define JPC_QCX_NOQNT 0 /* No quantization. */ #define JPC_QCX_SIQNT 1 /* Scalar quantization, implicit. */ #define JPC_QCX_SEQNT 2 /* Scalar quantization, explicit. */ /* * Stepsize manipulation macros. */ #define JPC_QCX_GETEXPN(x) ((x) >> 11) #define JPC_QCX_GETMANT(x) ((x) & 0x07ff) #define JPC_QCX_EXPN(x) (assert(!((x) & (~0x1f))), (((x) & 0x1f) << 11)) #define JPC_QCX_MANT(x) (assert(!((x) & (~0x7ff))), ((x) & 0x7ff)) /* Per component information. */ typedef struct { /* The quantization style. */ uint_fast8_t qntsty; /* The number of step sizes. */ int numstepsizes; /* The step sizes. */ uint_fast16_t *stepsizes; /* The number of guard bits. */ uint_fast8_t numguard; } jpc_qcxcp_t; /* QCC marker segment parameters. */ typedef struct { /* The component associated with this marker segment. */ uint_fast16_t compno; /* The parameters. */ jpc_qcxcp_t compparms; } jpc_qcc_t; /* QCD marker segment parameters. */ typedef struct { /* The parameters. */ jpc_qcxcp_t compparms; } jpc_qcd_t; /**************************************\ * POD marker segment parameters. \**************************************/ typedef struct { /* The progression order. */ uint_fast8_t prgord; /* The lower bound (inclusive) on the resolution level for the progression order volume. */ uint_fast8_t rlvlnostart; /* The upper bound (exclusive) on the resolution level for the progression order volume. */ uint_fast8_t rlvlnoend; /* The lower bound (inclusive) on the component for the progression order volume. */ uint_fast16_t compnostart; /* The upper bound (exclusive) on the component for the progression order volume. */ uint_fast16_t compnoend; /* The upper bound (exclusive) on the layer for the progression order volume. */ uint_fast16_t lyrnoend; } jpc_pocpchg_t; /* An alias for the above type. */ typedef jpc_pocpchg_t jpc_pchg_t; /* POC marker segment parameters. */ typedef struct { /* The number of progression order changes. */ int numpchgs; /* The per-progression-order-change information. */ jpc_pocpchg_t *pchgs; } jpc_poc_t; /**************************************\ * PPM/PPT marker segment parameters. \**************************************/ /* PPM marker segment parameters. */ typedef struct { /* The index. */ uint_fast8_t ind; /* The length. */ uint_fast16_t len; /* The data. */ uchar *data; } jpc_ppm_t; /* PPT marker segment parameters. */ typedef struct { /* The index. */ uint_fast8_t ind; /* The length. */ uint_fast32_t len; /* The data. */ unsigned char *data; } jpc_ppt_t; /**************************************\ * COM marker segment parameters. \**************************************/ /* * Registration IDs. */ #define JPC_COM_BIN 0x00 #define JPC_COM_LATIN 0x01 typedef struct { /* The registration ID. */ uint_fast16_t regid; /* The length of the data in bytes. */ uint_fast16_t len; /* The data. */ uchar *data; } jpc_com_t; /**************************************\ * SOP marker segment parameters. \**************************************/ typedef struct { /* The sequence number. */ uint_fast16_t seqno; } jpc_sop_t; /**************************************\ * CRG marker segment parameters. \**************************************/ /* Per component information. */ typedef struct { /* The horizontal offset. */ uint_fast16_t hoff; /* The vertical offset. */ uint_fast16_t voff; } jpc_crgcomp_t; typedef struct { /* The number of components. */ int numcomps; /* Per component information. */ jpc_crgcomp_t *comps; } jpc_crg_t; /**************************************\ * Marker segment parameters for unknown marker type. \**************************************/ typedef struct { /* The data. */ uchar *data; /* The length. */ uint_fast16_t len; } jpc_unk_t; /**************************************\ * Generic marker segment parameters. \**************************************/ typedef union { int soc; /* unused */ jpc_sot_t sot; int sod; /* unused */ int eoc; /* unused */ jpc_siz_t siz; jpc_cod_t cod; jpc_coc_t coc; jpc_rgn_t rgn; jpc_qcd_t qcd; jpc_qcc_t qcc; jpc_poc_t poc; /* jpc_plm_t plm; */ /* jpc_plt_t plt; */ jpc_ppm_t ppm; jpc_ppt_t ppt; jpc_sop_t sop; int eph; /* unused */ jpc_com_t com; jpc_crg_t crg; jpc_unk_t unk; } jpc_msparms_t; /**************************************\ * Marker segment. \**************************************/ /* Marker segment IDs. */ /* The smallest valid marker value. */ #define JPC_MS_MIN 0xff00 /* The largest valid marker value. */ #define JPC_MS_MAX 0xffff /* The minimum marker value that cannot occur within packet data. */ #define JPC_MS_INMIN 0xff80 /* The maximum marker value that cannot occur within packet data. */ #define JPC_MS_INMAX 0xffff /* Delimiting marker segments. */ #define JPC_MS_SOC 0xff4f /* Start of code stream (SOC). */ #define JPC_MS_SOT 0xff90 /* Start of tile-part (SOT). */ #define JPC_MS_SOD 0xff93 /* Start of data (SOD). */ #define JPC_MS_EOC 0xffd9 /* End of code stream (EOC). */ /* Fixed information marker segments. */ #define JPC_MS_SIZ 0xff51 /* Image and tile size (SIZ). */ /* Functional marker segments. */ #define JPC_MS_COD 0xff52 /* Coding style default (COD). */ #define JPC_MS_COC 0xff53 /* Coding style component (COC). */ #define JPC_MS_RGN 0xff5e /* Region of interest (RGN). */ #define JPC_MS_QCD 0xff5c /* Quantization default (QCD). */ #define JPC_MS_QCC 0xff5d /* Quantization component (QCC). */ #define JPC_MS_POC 0xff5f /* Progression order default (POC). */ /* Pointer marker segments. */ #define JPC_MS_TLM 0xff55 /* Tile-part lengths, main header (TLM). */ #define JPC_MS_PLM 0xff57 /* Packet length, main header (PLM). */ #define JPC_MS_PLT 0xff58 /* Packet length, tile-part header (PLT). */ #define JPC_MS_PPM 0xff60 /* Packed packet headers, main header (PPM). */ #define JPC_MS_PPT 0xff61 /* Packet packet headers, tile-part header (PPT). */ /* In bit stream marker segments. */ #define JPC_MS_SOP 0xff91 /* Start of packet (SOP). */ #define JPC_MS_EPH 0xff92 /* End of packet header (EPH). */ /* Informational marker segments. */ #define JPC_MS_CRG 0xff63 /* Component registration (CRG). */ #define JPC_MS_COM 0xff64 /* Comment (COM). */ /* Forward declaration. */ struct jpc_msops_s; /* Generic marker segment class. */ typedef struct { /* The type of marker segment. */ uint_fast16_t id; /* The length of the marker segment. */ uint_fast16_t len; /* The starting offset within the stream. */ uint_fast32_t off; /* The parameters of the marker segment. */ jpc_msparms_t parms; /* The marker segment operations. */ struct jpc_msops_s *ops; } jpc_ms_t; /* Marker segment operations (which depend on the marker segment type). */ typedef struct jpc_msops_s { /* Destroy the marker segment parameters. */ void (*destroyparms)(jpc_ms_t *ms); /* Get the marker segment parameters from a stream. */ int (*getparms)(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in); /* Put the marker segment parameters to a stream. */ int (*putparms)(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out); /* Dump the marker segment parameters (for debugging). */ int (*dumpparms)(jpc_ms_t *ms, FILE *out); } jpc_msops_t; /******************************************************************************\ * Macros/Functions. \******************************************************************************/ /* Create a code-stream state object. */ jpc_cstate_t *jpc_cstate_create(void); /* Destroy a code-stream state object. */ void jpc_cstate_destroy(jpc_cstate_t *cstate); /* Create a marker segment. */ jpc_ms_t *jpc_ms_create(int type); /* Destroy a marker segment. */ void jpc_ms_destroy(jpc_ms_t *ms); /* Does a marker segment have parameters? */ #define JPC_MS_HASPARMS(x) \ (!((x) == JPC_MS_SOC || (x) == JPC_MS_SOD || (x) == JPC_MS_EOC || \ (x) == JPC_MS_EPH || ((x) >= 0xff30 && (x) <= 0xff3f))) /* Get the marker segment type. */ #define jpc_ms_gettype(ms) \ ((ms)->id) /* Read a marker segment from a stream. */ jpc_ms_t *jpc_getms(jas_stream_t *in, jpc_cstate_t *cstate); /* Write a marker segment to a stream. */ int jpc_putms(jas_stream_t *out, jpc_cstate_t *cstate, jpc_ms_t *ms); /* Copy code stream data from one stream to another. */ int jpc_getdata(jas_stream_t *in, jas_stream_t *out, long n); /* Copy code stream data from one stream to another. */ int jpc_putdata(jas_stream_t *out, jas_stream_t *in, long n); /* Dump a marker segment (for debugging). */ void jpc_ms_dump(jpc_ms_t *ms, FILE *out); /* Read a 8-bit unsigned integer from a stream. */ int jpc_getuint8(jas_stream_t *in, uint_fast8_t *val); /* Read a 16-bit unsigned integer from a stream. */ int jpc_getuint16(jas_stream_t *in, uint_fast16_t *val); /* Read a 32-bit unsigned integer from a stream. */ int jpc_getuint32(jas_stream_t *in, uint_fast32_t *val); /* Write a 8-bit unsigned integer to a stream. */ int jpc_putuint8(jas_stream_t *out, uint_fast8_t val); /* Write a 16-bit unsigned integer to a stream. */ int jpc_putuint16(jas_stream_t *out, uint_fast16_t val); /* Write a 32-bit unsigned integer to a stream. */ int jpc_putuint32(jas_stream_t *out, uint_fast32_t val); #endif jasper-1.900.1/src/libjasper/jpc/jpc_mqenc.h0000644000175000017500000001775610554235553017611 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * MQ Arithmetic Encoder * * $Id$ */ #ifndef JPC_MQENC_H #define JPC_MQENC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" #include "jasper/jas_stream.h" #include "jpc_mqcod.h" /******************************************************************************\ * Constants. \******************************************************************************/ /* * Termination modes. */ #define JPC_MQENC_DEFTERM 0 /* default termination */ #define JPC_MQENC_PTERM 1 /* predictable termination */ /******************************************************************************\ * Types. \******************************************************************************/ /* MQ arithmetic encoder class. */ typedef struct { /* The C register. */ uint_fast32_t creg; /* The A register. */ uint_fast32_t areg; /* The CT register. */ uint_fast32_t ctreg; /* The maximum number of contexts. */ int maxctxs; /* The per-context information. */ jpc_mqstate_t **ctxs; /* The current context. */ jpc_mqstate_t **curctx; /* The stream for encoder output. */ jas_stream_t *out; /* The byte buffer (i.e., the B variable in the standard). */ int_fast16_t outbuf; /* The last byte output. */ int_fast16_t lastbyte; /* The error indicator. */ int err; } jpc_mqenc_t; /* MQ arithmetic encoder state information. */ typedef struct { /* The A register. */ unsigned areg; /* The C register. */ unsigned creg; /* The CT register. */ unsigned ctreg; /* The last byte output by the encoder. */ int lastbyte; } jpc_mqencstate_t; /******************************************************************************\ * Functions/macros for construction and destruction. \******************************************************************************/ /* Create a MQ encoder. */ jpc_mqenc_t *jpc_mqenc_create(int maxctxs, jas_stream_t *out); /* Destroy a MQ encoder. */ void jpc_mqenc_destroy(jpc_mqenc_t *enc); /******************************************************************************\ * Functions/macros for initialization. \******************************************************************************/ /* Initialize a MQ encoder. */ void jpc_mqenc_init(jpc_mqenc_t *enc); /******************************************************************************\ * Functions/macros for context manipulation. \******************************************************************************/ /* Set the current context. */ #define jpc_mqenc_setcurctx(enc, ctxno) \ ((enc)->curctx = &(enc)->ctxs[ctxno]); /* Set the state information for a particular context. */ void jpc_mqenc_setctx(jpc_mqenc_t *enc, int ctxno, jpc_mqctx_t *ctx); /* Set the state information for multiple contexts. */ void jpc_mqenc_setctxs(jpc_mqenc_t *enc, int numctxs, jpc_mqctx_t *ctxs); /******************************************************************************\ * Miscellaneous functions/macros. \******************************************************************************/ /* Get the error state of a MQ encoder. */ #define jpc_mqenc_error(enc) \ ((enc)->err) /* Get the current encoder state. */ void jpc_mqenc_getstate(jpc_mqenc_t *enc, jpc_mqencstate_t *state); /* Terminate the code. */ int jpc_mqenc_flush(jpc_mqenc_t *enc, int termmode); /******************************************************************************\ * Functions/macros for encoding bits. \******************************************************************************/ /* Encode a bit. */ #if !defined(DEBUG) #define jpc_mqenc_putbit(enc, bit) jpc_mqenc_putbit_macro(enc, bit) #else #define jpc_mqenc_putbit(enc, bit) jpc_mqenc_putbit_func(enc, bit) #endif /******************************************************************************\ * Functions/macros for debugging. \******************************************************************************/ int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out); /******************************************************************************\ * Implementation-specific details. \******************************************************************************/ /* Note: This macro is included only to satisfy the needs of the mqenc_putbit macro. */ #define jpc_mqenc_putbit_macro(enc, bit) \ (((*((enc)->curctx))->mps == (bit)) ? \ (((enc)->areg -= (*(enc)->curctx)->qeval), \ ((!((enc)->areg & 0x8000)) ? (jpc_mqenc_codemps2(enc)) : \ ((enc)->creg += (*(enc)->curctx)->qeval))) : \ jpc_mqenc_codelps(enc)) /* Note: These function prototypes are included only to satisfy the needs of the mqenc_putbit_macro macro. Do not call any of these functions directly. */ int jpc_mqenc_codemps2(jpc_mqenc_t *enc); int jpc_mqenc_codelps(jpc_mqenc_t *enc); /* Note: This function prototype is included only to satisfy the needs of the mqenc_putbit macro. */ int jpc_mqenc_putbit_func(jpc_mqenc_t *enc, int bit); #endif jasper-1.900.1/src/libjasper/jpc/jpc_t1cod.c0000644000175000017500000002717010554235553017502 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include "jasper/jas_types.h" #include "jasper/jas_math.h" #include "jpc_bs.h" #include "jpc_dec.h" #include "jpc_cs.h" #include "jpc_mqcod.h" #include "jpc_t1cod.h" #include "jpc_tsfb.h" double jpc_pow2i(int n); /******************************************************************************\ * Global data. \******************************************************************************/ int jpc_zcctxnolut[4 * 256]; int jpc_spblut[256]; int jpc_scctxnolut[256]; int jpc_magctxnolut[4096]; jpc_fix_t jpc_signmsedec[1 << JPC_NMSEDEC_BITS]; jpc_fix_t jpc_refnmsedec[1 << JPC_NMSEDEC_BITS]; jpc_fix_t jpc_signmsedec0[1 << JPC_NMSEDEC_BITS]; jpc_fix_t jpc_refnmsedec0[1 << JPC_NMSEDEC_BITS]; jpc_mqctx_t jpc_mqctxs[JPC_NUMCTXS]; /******************************************************************************\ * \******************************************************************************/ void jpc_initmqctxs(void); /******************************************************************************\ * Code. \******************************************************************************/ int JPC_PASSTYPE(int passno) { int passtype; switch (passno % 3) { case 0: passtype = JPC_CLNPASS; break; case 1: passtype = JPC_SIGPASS; break; case 2: passtype = JPC_REFPASS; break; default: passtype = -1; assert(0); break; } return passtype; } int JPC_NOMINALGAIN(int qmfbid, int numlvls, int lvlno, int orient) { /* Avoid compiler warnings about unused parameters. */ numlvls = 0; if (qmfbid == JPC_COX_INS) { return 0; } assert(qmfbid == JPC_COX_RFT); if (lvlno == 0) { assert(orient == JPC_TSFB_LL); return 0; } else { switch (orient) { case JPC_TSFB_LH: case JPC_TSFB_HL: return 1; break; case JPC_TSFB_HH: return 2; break; } } abort(); } /******************************************************************************\ * Coding pass related functions. \******************************************************************************/ int JPC_SEGTYPE(int passno, int firstpassno, int bypass) { int passtype; if (bypass) { passtype = JPC_PASSTYPE(passno); if (passtype == JPC_CLNPASS) { return JPC_SEG_MQ; } return ((passno < firstpassno + 10) ? JPC_SEG_MQ : JPC_SEG_RAW); } else { return JPC_SEG_MQ; } } int JPC_SEGPASSCNT(int passno, int firstpassno, int numpasses, int bypass, int termall) { int ret; int passtype; if (termall) { ret = 1; } else if (bypass) { if (passno < firstpassno + 10) { ret = 10 - (passno - firstpassno); } else { passtype = JPC_PASSTYPE(passno); switch (passtype) { case JPC_SIGPASS: ret = 2; break; case JPC_REFPASS: ret = 1; break; case JPC_CLNPASS: ret = 1; break; default: ret = -1; assert(0); break; } } } else { ret = JPC_PREC * 3 - 2; } ret = JAS_MIN(ret, numpasses - passno); return ret; } int JPC_ISTERMINATED(int passno, int firstpassno, int numpasses, int termall, int lazy) { int ret; int n; if (passno - firstpassno == numpasses - 1) { ret = 1; } else { n = JPC_SEGPASSCNT(passno, firstpassno, numpasses, lazy, termall); ret = (n <= 1) ? 1 : 0; } return ret; } /******************************************************************************\ * Lookup table code. \******************************************************************************/ void jpc_initluts() { int i; int orient; int refine; float u; float v; float t; /* XXX - hack */ jpc_initmqctxs(); for (orient = 0; orient < 4; ++orient) { for (i = 0; i < 256; ++i) { jpc_zcctxnolut[(orient << 8) | i] = jpc_getzcctxno(i, orient); } } for (i = 0; i < 256; ++i) { jpc_spblut[i] = jpc_getspb(i << 4); } for (i = 0; i < 256; ++i) { jpc_scctxnolut[i] = jpc_getscctxno(i << 4); } for (refine = 0; refine < 2; ++refine) { for (i = 0; i < 2048; ++i) { jpc_magctxnolut[(refine << 11) + i] = jpc_getmagctxno((refine ? JPC_REFINE : 0) | i); } } for (i = 0; i < (1 << JPC_NMSEDEC_BITS); ++i) { t = i * jpc_pow2i(-JPC_NMSEDEC_FRACBITS); u = t; v = t - 1.5; jpc_signmsedec[i] = jpc_dbltofix(floor((u * u - v * v) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS)); /* XXX - this calc is not correct */ jpc_signmsedec0[i] = jpc_dbltofix(floor((u * u) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS)); u = t - 1.0; if (i & (1 << (JPC_NMSEDEC_BITS - 1))) { v = t - 1.5; } else { v = t - 0.5; } jpc_refnmsedec[i] = jpc_dbltofix(floor((u * u - v * v) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS)); /* XXX - this calc is not correct */ jpc_refnmsedec0[i] = jpc_dbltofix(floor((u * u) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS)); } } jpc_fix_t jpc_getsignmsedec_func(jpc_fix_t x, int bitpos) { jpc_fix_t y; assert(!(x & (~JAS_ONES(bitpos + 1)))); y = jpc_getsignmsedec_macro(x, bitpos); return y; } int jpc_getzcctxno(int f, int orient) { int h; int v; int d; int n; int t; int hv; /* Avoid compiler warning. */ n = 0; h = ((f & JPC_WSIG) != 0) + ((f & JPC_ESIG) != 0); v = ((f & JPC_NSIG) != 0) + ((f & JPC_SSIG) != 0); d = ((f & JPC_NWSIG) != 0) + ((f & JPC_NESIG) != 0) + ((f & JPC_SESIG) != 0) + ((f & JPC_SWSIG) != 0); switch (orient) { case JPC_TSFB_HL: t = h; h = v; v = t; case JPC_TSFB_LL: case JPC_TSFB_LH: if (!h) { if (!v) { if (!d) { n = 0; } else if (d == 1) { n = 1; } else { n = 2; } } else if (v == 1) { n = 3; } else { n = 4; } } else if (h == 1) { if (!v) { if (!d) { n = 5; } else { n = 6; } } else { n = 7; } } else { n = 8; } break; case JPC_TSFB_HH: hv = h + v; if (!d) { if (!hv) { n = 0; } else if (hv == 1) { n = 1; } else { n = 2; } } else if (d == 1) { if (!hv) { n = 3; } else if (hv == 1) { n = 4; } else { n = 5; } } else if (d == 2) { if (!hv) { n = 6; } else { n = 7; } } else { n = 8; } break; } assert(n < JPC_NUMZCCTXS); return JPC_ZCCTXNO + n; } int jpc_getspb(int f) { int hc; int vc; int n; hc = JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == JPC_ESIG) + ((f & (JPC_WSIG | JPC_WSGN)) == JPC_WSIG), 1) - JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == (JPC_ESIG | JPC_ESGN)) + ((f & (JPC_WSIG | JPC_WSGN)) == (JPC_WSIG | JPC_WSGN)), 1); vc = JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == JPC_NSIG) + ((f & (JPC_SSIG | JPC_SSGN)) == JPC_SSIG), 1) - JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == (JPC_NSIG | JPC_NSGN)) + ((f & (JPC_SSIG | JPC_SSGN)) == (JPC_SSIG | JPC_SSGN)), 1); if (!hc && !vc) { n = 0; } else { n = (!(hc > 0 || (!hc && vc > 0))); } return n; } int jpc_getscctxno(int f) { int hc; int vc; int n; /* Avoid compiler warning. */ n = 0; hc = JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == JPC_ESIG) + ((f & (JPC_WSIG | JPC_WSGN)) == JPC_WSIG), 1) - JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == (JPC_ESIG | JPC_ESGN)) + ((f & (JPC_WSIG | JPC_WSGN)) == (JPC_WSIG | JPC_WSGN)), 1); vc = JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == JPC_NSIG) + ((f & (JPC_SSIG | JPC_SSGN)) == JPC_SSIG), 1) - JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == (JPC_NSIG | JPC_NSGN)) + ((f & (JPC_SSIG | JPC_SSGN)) == (JPC_SSIG | JPC_SSGN)), 1); assert(hc >= -1 && hc <= 1 && vc >= -1 && vc <= 1); if (hc < 0) { hc = -hc; vc = -vc; } if (!hc) { if (vc == -1) { n = 1; } else if (!vc) { n = 0; } else { n = 1; } } else if (hc == 1) { if (vc == -1) { n = 2; } else if (!vc) { n = 3; } else { n = 4; } } assert(n < JPC_NUMSCCTXS); return JPC_SCCTXNO + n; } int jpc_getmagctxno(int f) { int n; if (!(f & JPC_REFINE)) { n = (f & (JPC_OTHSIGMSK)) ? 1 : 0; } else { n = 2; } assert(n < JPC_NUMMAGCTXS); return JPC_MAGCTXNO + n; } void jpc_initctxs(jpc_mqctx_t *ctxs) { jpc_mqctx_t *ctx; int i; ctx = ctxs; for (i = 0; i < JPC_NUMCTXS; ++i) { ctx->mps = 0; switch (i) { case JPC_UCTXNO: ctx->ind = 46; break; case JPC_ZCCTXNO: ctx->ind = 4; break; case JPC_AGGCTXNO: ctx->ind = 3; break; default: ctx->ind = 0; break; } ++ctx; } } void jpc_initmqctxs() { jpc_initctxs(jpc_mqctxs); } /* Calculate the real quantity exp2(n), where x is an integer. */ double jpc_pow2i(int n) { double x; double a; x = 1.0; if (n < 0) { a = 0.5; n = -n; } else { a = 2.0; } while (--n >= 0) { x *= a; } return x; } jasper-1.900.1/src/libjasper/jpc/jpc_dec.c0000644000175000017500000016472410554235553017232 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_types.h" #include "jasper/jas_math.h" #include "jasper/jas_tvp.h" #include "jasper/jas_malloc.h" #include "jasper/jas_debug.h" #include "jpc_fix.h" #include "jpc_dec.h" #include "jpc_cs.h" #include "jpc_mct.h" #include "jpc_t2dec.h" #include "jpc_t1dec.h" #include "jpc_math.h" /******************************************************************************\ * \******************************************************************************/ #define JPC_MHSOC 0x0001 /* In the main header, expecting a SOC marker segment. */ #define JPC_MHSIZ 0x0002 /* In the main header, expecting a SIZ marker segment. */ #define JPC_MH 0x0004 /* In the main header, expecting "other" marker segments. */ #define JPC_TPHSOT 0x0008 /* In a tile-part header, expecting a SOT marker segment. */ #define JPC_TPH 0x0010 /* In a tile-part header, expecting "other" marker segments. */ #define JPC_MT 0x0020 /* In the main trailer. */ typedef struct { uint_fast16_t id; /* The marker segment type. */ int validstates; /* The states in which this type of marker segment can be validly encountered. */ int (*action)(jpc_dec_t *dec, jpc_ms_t *ms); /* The action to take upon encountering this type of marker segment. */ } jpc_dec_mstabent_t; /******************************************************************************\ * \******************************************************************************/ /* COD/COC parameters have been specified. */ #define JPC_CSET 0x0001 /* QCD/QCC parameters have been specified. */ #define JPC_QSET 0x0002 /* COD/COC parameters set from a COC marker segment. */ #define JPC_COC 0x0004 /* QCD/QCC parameters set from a QCC marker segment. */ #define JPC_QCC 0x0008 /******************************************************************************\ * Local function prototypes. \******************************************************************************/ static int jpc_dec_dump(jpc_dec_t *dec, FILE *out); jpc_ppxstab_t *jpc_ppxstab_create(void); void jpc_ppxstab_destroy(jpc_ppxstab_t *tab); int jpc_ppxstab_grow(jpc_ppxstab_t *tab, int maxents); int jpc_ppxstab_insert(jpc_ppxstab_t *tab, jpc_ppxstabent_t *ent); jpc_streamlist_t *jpc_ppmstabtostreams(jpc_ppxstab_t *tab); int jpc_pptstabwrite(jas_stream_t *out, jpc_ppxstab_t *tab); jpc_ppxstabent_t *jpc_ppxstabent_create(void); void jpc_ppxstabent_destroy(jpc_ppxstabent_t *ent); int jpc_streamlist_numstreams(jpc_streamlist_t *streamlist); jpc_streamlist_t *jpc_streamlist_create(void); int jpc_streamlist_insert(jpc_streamlist_t *streamlist, int streamno, jas_stream_t *stream); jas_stream_t *jpc_streamlist_remove(jpc_streamlist_t *streamlist, int streamno); void jpc_streamlist_destroy(jpc_streamlist_t *streamlist); jas_stream_t *jpc_streamlist_get(jpc_streamlist_t *streamlist, int streamno); static void jpc_dec_cp_resetflags(jpc_dec_cp_t *cp); static jpc_dec_cp_t *jpc_dec_cp_create(uint_fast16_t numcomps); static int jpc_dec_cp_isvalid(jpc_dec_cp_t *cp); static jpc_dec_cp_t *jpc_dec_cp_copy(jpc_dec_cp_t *cp); static int jpc_dec_cp_setfromcod(jpc_dec_cp_t *cp, jpc_cod_t *cod); static int jpc_dec_cp_setfromcoc(jpc_dec_cp_t *cp, jpc_coc_t *coc); static int jpc_dec_cp_setfromcox(jpc_dec_cp_t *cp, jpc_dec_ccp_t *ccp, jpc_coxcp_t *compparms, int flags); static int jpc_dec_cp_setfromqcd(jpc_dec_cp_t *cp, jpc_qcd_t *qcd); static int jpc_dec_cp_setfromqcc(jpc_dec_cp_t *cp, jpc_qcc_t *qcc); static int jpc_dec_cp_setfromqcx(jpc_dec_cp_t *cp, jpc_dec_ccp_t *ccp, jpc_qcxcp_t *compparms, int flags); static int jpc_dec_cp_setfromrgn(jpc_dec_cp_t *cp, jpc_rgn_t *rgn); static int jpc_dec_cp_prepare(jpc_dec_cp_t *cp); static void jpc_dec_cp_destroy(jpc_dec_cp_t *cp); static int jpc_dec_cp_setfrompoc(jpc_dec_cp_t *cp, jpc_poc_t *poc, int reset); static int jpc_pi_addpchgfrompoc(jpc_pi_t *pi, jpc_poc_t *poc); static int jpc_dec_decode(jpc_dec_t *dec); static jpc_dec_t *jpc_dec_create(jpc_dec_importopts_t *impopts, jas_stream_t *in); static void jpc_dec_destroy(jpc_dec_t *dec); static void jpc_dequantize(jas_matrix_t *x, jpc_fix_t absstepsize); static void jpc_undo_roi(jas_matrix_t *x, int roishift, int bgshift, int numbps); static jpc_fix_t jpc_calcabsstepsize(int stepsize, int numbits); static int jpc_dec_tiledecode(jpc_dec_t *dec, jpc_dec_tile_t *tile); static int jpc_dec_tileinit(jpc_dec_t *dec, jpc_dec_tile_t *tile); static int jpc_dec_tilefini(jpc_dec_t *dec, jpc_dec_tile_t *tile); static int jpc_dec_process_soc(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_sod(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_eoc(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_cod(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_coc(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_rgn(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_qcd(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_qcc(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_poc(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_ppm(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_ppt(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_com(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_unk(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_process_crg(jpc_dec_t *dec, jpc_ms_t *ms); static int jpc_dec_parseopts(char *optstr, jpc_dec_importopts_t *opts); static jpc_dec_mstabent_t *jpc_dec_mstab_lookup(uint_fast16_t id); /******************************************************************************\ * Global data. \******************************************************************************/ jpc_dec_mstabent_t jpc_dec_mstab[] = { {JPC_MS_SOC, JPC_MHSOC, jpc_dec_process_soc}, {JPC_MS_SOT, JPC_MH | JPC_TPHSOT, jpc_dec_process_sot}, {JPC_MS_SOD, JPC_TPH, jpc_dec_process_sod}, {JPC_MS_EOC, JPC_TPHSOT, jpc_dec_process_eoc}, {JPC_MS_SIZ, JPC_MHSIZ, jpc_dec_process_siz}, {JPC_MS_COD, JPC_MH | JPC_TPH, jpc_dec_process_cod}, {JPC_MS_COC, JPC_MH | JPC_TPH, jpc_dec_process_coc}, {JPC_MS_RGN, JPC_MH | JPC_TPH, jpc_dec_process_rgn}, {JPC_MS_QCD, JPC_MH | JPC_TPH, jpc_dec_process_qcd}, {JPC_MS_QCC, JPC_MH | JPC_TPH, jpc_dec_process_qcc}, {JPC_MS_POC, JPC_MH | JPC_TPH, jpc_dec_process_poc}, {JPC_MS_TLM, JPC_MH, 0}, {JPC_MS_PLM, JPC_MH, 0}, {JPC_MS_PLT, JPC_TPH, 0}, {JPC_MS_PPM, JPC_MH, jpc_dec_process_ppm}, {JPC_MS_PPT, JPC_TPH, jpc_dec_process_ppt}, {JPC_MS_SOP, 0, 0}, {JPC_MS_CRG, JPC_MH, jpc_dec_process_crg}, {JPC_MS_COM, JPC_MH | JPC_TPH, jpc_dec_process_com}, {0, JPC_MH | JPC_TPH, jpc_dec_process_unk} }; /******************************************************************************\ * The main entry point for the JPEG-2000 decoder. \******************************************************************************/ jas_image_t *jpc_decode(jas_stream_t *in, char *optstr) { jpc_dec_importopts_t opts; jpc_dec_t *dec; jas_image_t *image; dec = 0; if (jpc_dec_parseopts(optstr, &opts)) { goto error; } jpc_initluts(); if (!(dec = jpc_dec_create(&opts, in))) { goto error; } /* Do most of the work. */ if (jpc_dec_decode(dec)) { goto error; } if (jas_image_numcmpts(dec->image) >= 3) { jas_image_setclrspc(dec->image, JAS_CLRSPC_SRGB); jas_image_setcmpttype(dec->image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); jas_image_setcmpttype(dec->image, 1, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); jas_image_setcmpttype(dec->image, 2, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); } else { jas_image_setclrspc(dec->image, JAS_CLRSPC_SGRAY); jas_image_setcmpttype(dec->image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); } /* Save the return value. */ image = dec->image; /* Stop the image from being discarded. */ dec->image = 0; /* Destroy decoder. */ jpc_dec_destroy(dec); return image; error: if (dec) { jpc_dec_destroy(dec); } return 0; } typedef enum { OPT_MAXLYRS, OPT_MAXPKTS, OPT_DEBUG } optid_t; jas_taginfo_t decopts[] = { {OPT_MAXLYRS, "maxlyrs"}, {OPT_MAXPKTS, "maxpkts"}, {OPT_DEBUG, "debug"}, {-1, 0} }; static int jpc_dec_parseopts(char *optstr, jpc_dec_importopts_t *opts) { jas_tvparser_t *tvp; opts->debug = 0; opts->maxlyrs = JPC_MAXLYRS; opts->maxpkts = -1; if (!(tvp = jas_tvparser_create(optstr ? optstr : ""))) { return -1; } while (!jas_tvparser_next(tvp)) { switch (jas_taginfo_nonull(jas_taginfos_lookup(decopts, jas_tvparser_gettag(tvp)))->id) { case OPT_MAXLYRS: opts->maxlyrs = atoi(jas_tvparser_getval(tvp)); break; case OPT_DEBUG: opts->debug = atoi(jas_tvparser_getval(tvp)); break; case OPT_MAXPKTS: opts->maxpkts = atoi(jas_tvparser_getval(tvp)); break; default: jas_eprintf("warning: ignoring invalid option %s\n", jas_tvparser_gettag(tvp)); break; } } jas_tvparser_destroy(tvp); return 0; } /******************************************************************************\ * Code for table-driven code stream decoder. \******************************************************************************/ static jpc_dec_mstabent_t *jpc_dec_mstab_lookup(uint_fast16_t id) { jpc_dec_mstabent_t *mstabent; for (mstabent = jpc_dec_mstab; mstabent->id != 0; ++mstabent) { if (mstabent->id == id) { break; } } return mstabent; } static int jpc_dec_decode(jpc_dec_t *dec) { jpc_ms_t *ms; jpc_dec_mstabent_t *mstabent; int ret; jpc_cstate_t *cstate; if (!(cstate = jpc_cstate_create())) { return -1; } dec->cstate = cstate; /* Initially, we should expect to encounter a SOC marker segment. */ dec->state = JPC_MHSOC; for (;;) { /* Get the next marker segment in the code stream. */ if (!(ms = jpc_getms(dec->in, cstate))) { jas_eprintf("cannot get marker segment\n"); return -1; } mstabent = jpc_dec_mstab_lookup(ms->id); assert(mstabent); /* Ensure that this type of marker segment is permitted at this point in the code stream. */ if (!(dec->state & mstabent->validstates)) { jas_eprintf("unexpected marker segment type\n"); jpc_ms_destroy(ms); return -1; } /* Process the marker segment. */ if (mstabent->action) { ret = (*mstabent->action)(dec, ms); } else { /* No explicit action is required. */ ret = 0; } /* Destroy the marker segment. */ jpc_ms_destroy(ms); if (ret < 0) { return -1; } else if (ret > 0) { break; } } return 0; } static int jpc_dec_process_crg(jpc_dec_t *dec, jpc_ms_t *ms) { int cmptno; jpc_dec_cmpt_t *cmpt; jpc_crg_t *crg; crg = &ms->parms.crg; for (cmptno = 0, cmpt = dec->cmpts; cmptno < dec->numcomps; ++cmptno, ++cmpt) { /* Ignore the information in the CRG marker segment for now. This information serves no useful purpose for decoding anyhow. Some other parts of the code need to be changed if these lines are uncommented. cmpt->hsubstep = crg->comps[cmptno].hoff; cmpt->vsubstep = crg->comps[cmptno].voff; */ } return 0; } static int jpc_dec_process_soc(jpc_dec_t *dec, jpc_ms_t *ms) { /* Eliminate warnings about unused variables. */ ms = 0; /* We should expect to encounter a SIZ marker segment next. */ dec->state = JPC_MHSIZ; return 0; } static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_dec_tile_t *tile; jpc_sot_t *sot = &ms->parms.sot; jas_image_cmptparm_t *compinfos; jas_image_cmptparm_t *compinfo; jpc_dec_cmpt_t *cmpt; int cmptno; if (dec->state == JPC_MH) { compinfos = jas_malloc(dec->numcomps * sizeof(jas_image_cmptparm_t)); assert(compinfos); for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos; cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) { compinfo->tlx = 0; compinfo->tly = 0; compinfo->prec = cmpt->prec; compinfo->sgnd = cmpt->sgnd; compinfo->width = cmpt->width; compinfo->height = cmpt->height; compinfo->hstep = cmpt->hstep; compinfo->vstep = cmpt->vstep; } if (!(dec->image = jas_image_create(dec->numcomps, compinfos, JAS_CLRSPC_UNKNOWN))) { return -1; } jas_free(compinfos); /* Is the packet header information stored in PPM marker segments in the main header? */ if (dec->ppmstab) { /* Convert the PPM marker segment data into a collection of streams (one stream per tile-part). */ if (!(dec->pkthdrstreams = jpc_ppmstabtostreams(dec->ppmstab))) { abort(); } jpc_ppxstab_destroy(dec->ppmstab); dec->ppmstab = 0; } } if (sot->len > 0) { dec->curtileendoff = jas_stream_getrwcount(dec->in) - ms->len - 4 + sot->len; } else { dec->curtileendoff = 0; } if (JAS_CAST(int, sot->tileno) > dec->numtiles) { jas_eprintf("invalid tile number in SOT marker segment\n"); return -1; } /* Set the current tile. */ dec->curtile = &dec->tiles[sot->tileno]; tile = dec->curtile; /* Ensure that this is the expected part number. */ if (sot->partno != tile->partno) { return -1; } if (tile->numparts > 0 && sot->partno >= tile->numparts) { return -1; } if (!tile->numparts && sot->numparts > 0) { tile->numparts = sot->numparts; } tile->pptstab = 0; switch (tile->state) { case JPC_TILE_INIT: /* This is the first tile-part for this tile. */ tile->state = JPC_TILE_ACTIVE; assert(!tile->cp); if (!(tile->cp = jpc_dec_cp_copy(dec->cp))) { return -1; } jpc_dec_cp_resetflags(dec->cp); break; default: if (sot->numparts == sot->partno - 1) { tile->state = JPC_TILE_ACTIVELAST; } break; } /* Note: We do not increment the expected tile-part number until all processing for this tile-part is complete. */ /* We should expect to encounter other tile-part header marker segments next. */ dec->state = JPC_TPH; return 0; } static int jpc_dec_process_sod(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_dec_tile_t *tile; int pos; /* Eliminate compiler warnings about unused variables. */ ms = 0; if (!(tile = dec->curtile)) { return -1; } if (!tile->partno) { if (!jpc_dec_cp_isvalid(tile->cp)) { return -1; } jpc_dec_cp_prepare(tile->cp); if (jpc_dec_tileinit(dec, tile)) { return -1; } } /* Are packet headers stored in the main header or tile-part header? */ if (dec->pkthdrstreams) { /* Get the stream containing the packet header data for this tile-part. */ if (!(tile->pkthdrstream = jpc_streamlist_remove(dec->pkthdrstreams, 0))) { return -1; } } if (tile->pptstab) { if (!tile->pkthdrstream) { if (!(tile->pkthdrstream = jas_stream_memopen(0, 0))) { return -1; } } pos = jas_stream_tell(tile->pkthdrstream); jas_stream_seek(tile->pkthdrstream, 0, SEEK_END); if (jpc_pptstabwrite(tile->pkthdrstream, tile->pptstab)) { return -1; } jas_stream_seek(tile->pkthdrstream, pos, SEEK_SET); jpc_ppxstab_destroy(tile->pptstab); tile->pptstab = 0; } if (jas_getdbglevel() >= 10) { jpc_dec_dump(dec, stderr); } if (jpc_dec_decodepkts(dec, (tile->pkthdrstream) ? tile->pkthdrstream : dec->in, dec->in)) { jas_eprintf("jpc_dec_decodepkts failed\n"); return -1; } /* Gobble any unconsumed tile data. */ if (dec->curtileendoff > 0) { long curoff; uint_fast32_t n; curoff = jas_stream_getrwcount(dec->in); if (curoff < dec->curtileendoff) { n = dec->curtileendoff - curoff; jas_eprintf("warning: ignoring trailing garbage (%lu bytes)\n", (unsigned long) n); while (n-- > 0) { if (jas_stream_getc(dec->in) == EOF) { jas_eprintf("read error\n"); return -1; } } } else if (curoff > dec->curtileendoff) { jas_eprintf("warning: not enough tile data (%lu bytes)\n", (unsigned long) curoff - dec->curtileendoff); } } if (tile->numparts > 0 && tile->partno == tile->numparts - 1) { if (jpc_dec_tiledecode(dec, tile)) { return -1; } jpc_dec_tilefini(dec, tile); } dec->curtile = 0; /* Increment the expected tile-part number. */ ++tile->partno; /* We should expect to encounter a SOT marker segment next. */ dec->state = JPC_TPHSOT; return 0; } static int jpc_dec_tileinit(jpc_dec_t *dec, jpc_dec_tile_t *tile) { jpc_dec_tcomp_t *tcomp; int compno; int rlvlno; jpc_dec_rlvl_t *rlvl; jpc_dec_band_t *band; jpc_dec_prc_t *prc; int bndno; jpc_tsfb_band_t *bnd; int bandno; jpc_dec_ccp_t *ccp; int prccnt; jpc_dec_cblk_t *cblk; int cblkcnt; uint_fast32_t tlprcxstart; uint_fast32_t tlprcystart; uint_fast32_t brprcxend; uint_fast32_t brprcyend; uint_fast32_t tlcbgxstart; uint_fast32_t tlcbgystart; uint_fast32_t brcbgxend; uint_fast32_t brcbgyend; uint_fast32_t cbgxstart; uint_fast32_t cbgystart; uint_fast32_t cbgxend; uint_fast32_t cbgyend; uint_fast32_t tlcblkxstart; uint_fast32_t tlcblkystart; uint_fast32_t brcblkxend; uint_fast32_t brcblkyend; uint_fast32_t cblkxstart; uint_fast32_t cblkystart; uint_fast32_t cblkxend; uint_fast32_t cblkyend; uint_fast32_t tmpxstart; uint_fast32_t tmpystart; uint_fast32_t tmpxend; uint_fast32_t tmpyend; jpc_dec_cp_t *cp; jpc_tsfb_band_t bnds[64]; jpc_pchg_t *pchg; int pchgno; jpc_dec_cmpt_t *cmpt; cp = tile->cp; tile->realmode = 0; if (cp->mctid == JPC_MCT_ICT) { tile->realmode = 1; } for (compno = 0, tcomp = tile->tcomps, cmpt = dec->cmpts; compno < dec->numcomps; ++compno, ++tcomp, ++cmpt) { ccp = &tile->cp->ccps[compno]; if (ccp->qmfbid == JPC_COX_INS) { tile->realmode = 1; } tcomp->numrlvls = ccp->numrlvls; if (!(tcomp->rlvls = jas_malloc(tcomp->numrlvls * sizeof(jpc_dec_rlvl_t)))) { return -1; } if (!(tcomp->data = jas_seq2d_create(JPC_CEILDIV(tile->xstart, cmpt->hstep), JPC_CEILDIV(tile->ystart, cmpt->vstep), JPC_CEILDIV(tile->xend, cmpt->hstep), JPC_CEILDIV(tile->yend, cmpt->vstep)))) { return -1; } if (!(tcomp->tsfb = jpc_cod_gettsfb(ccp->qmfbid, tcomp->numrlvls - 1))) { return -1; } { jpc_tsfb_getbands(tcomp->tsfb, jas_seq2d_xstart(tcomp->data), jas_seq2d_ystart(tcomp->data), jas_seq2d_xend(tcomp->data), jas_seq2d_yend(tcomp->data), bnds); } for (rlvlno = 0, rlvl = tcomp->rlvls; rlvlno < tcomp->numrlvls; ++rlvlno, ++rlvl) { rlvl->bands = 0; rlvl->xstart = JPC_CEILDIVPOW2(tcomp->xstart, tcomp->numrlvls - 1 - rlvlno); rlvl->ystart = JPC_CEILDIVPOW2(tcomp->ystart, tcomp->numrlvls - 1 - rlvlno); rlvl->xend = JPC_CEILDIVPOW2(tcomp->xend, tcomp->numrlvls - 1 - rlvlno); rlvl->yend = JPC_CEILDIVPOW2(tcomp->yend, tcomp->numrlvls - 1 - rlvlno); rlvl->prcwidthexpn = ccp->prcwidthexpns[rlvlno]; rlvl->prcheightexpn = ccp->prcheightexpns[rlvlno]; tlprcxstart = JPC_FLOORDIVPOW2(rlvl->xstart, rlvl->prcwidthexpn) << rlvl->prcwidthexpn; tlprcystart = JPC_FLOORDIVPOW2(rlvl->ystart, rlvl->prcheightexpn) << rlvl->prcheightexpn; brprcxend = JPC_CEILDIVPOW2(rlvl->xend, rlvl->prcwidthexpn) << rlvl->prcwidthexpn; brprcyend = JPC_CEILDIVPOW2(rlvl->yend, rlvl->prcheightexpn) << rlvl->prcheightexpn; rlvl->numhprcs = (brprcxend - tlprcxstart) >> rlvl->prcwidthexpn; rlvl->numvprcs = (brprcyend - tlprcystart) >> rlvl->prcheightexpn; rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs; if (rlvl->xstart >= rlvl->xend || rlvl->ystart >= rlvl->yend) { rlvl->bands = 0; rlvl->numprcs = 0; rlvl->numhprcs = 0; rlvl->numvprcs = 0; continue; } if (!rlvlno) { tlcbgxstart = tlprcxstart; tlcbgystart = tlprcystart; brcbgxend = brprcxend; brcbgyend = brprcyend; rlvl->cbgwidthexpn = rlvl->prcwidthexpn; rlvl->cbgheightexpn = rlvl->prcheightexpn; } else { tlcbgxstart = JPC_CEILDIVPOW2(tlprcxstart, 1); tlcbgystart = JPC_CEILDIVPOW2(tlprcystart, 1); brcbgxend = JPC_CEILDIVPOW2(brprcxend, 1); brcbgyend = JPC_CEILDIVPOW2(brprcyend, 1); rlvl->cbgwidthexpn = rlvl->prcwidthexpn - 1; rlvl->cbgheightexpn = rlvl->prcheightexpn - 1; } rlvl->cblkwidthexpn = JAS_MIN(ccp->cblkwidthexpn, rlvl->cbgwidthexpn); rlvl->cblkheightexpn = JAS_MIN(ccp->cblkheightexpn, rlvl->cbgheightexpn); rlvl->numbands = (!rlvlno) ? 1 : 3; if (!(rlvl->bands = jas_malloc(rlvl->numbands * sizeof(jpc_dec_band_t)))) { return -1; } for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { bndno = (!rlvlno) ? 0 : (3 * (rlvlno - 1) + bandno + 1); bnd = &bnds[bndno]; band->orient = bnd->orient; band->stepsize = ccp->stepsizes[bndno]; band->analgain = JPC_NOMINALGAIN(ccp->qmfbid, tcomp->numrlvls - 1, rlvlno, band->orient); band->absstepsize = jpc_calcabsstepsize(band->stepsize, cmpt->prec + band->analgain); band->numbps = ccp->numguardbits + JPC_QCX_GETEXPN(band->stepsize) - 1; band->roishift = (ccp->roishift + band->numbps >= JPC_PREC) ? (JPC_PREC - 1 - band->numbps) : ccp->roishift; band->data = 0; band->prcs = 0; if (bnd->xstart == bnd->xend || bnd->ystart == bnd->yend) { continue; } if (!(band->data = jas_seq2d_create(0, 0, 0, 0))) { return -1; } jas_seq2d_bindsub(band->data, tcomp->data, bnd->locxstart, bnd->locystart, bnd->locxend, bnd->locyend); jas_seq2d_setshift(band->data, bnd->xstart, bnd->ystart); assert(rlvl->numprcs); if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_dec_prc_t)))) { return -1; } /************************************************/ cbgxstart = tlcbgxstart; cbgystart = tlcbgystart; for (prccnt = rlvl->numprcs, prc = band->prcs; prccnt > 0; --prccnt, ++prc) { cbgxend = cbgxstart + (1 << rlvl->cbgwidthexpn); cbgyend = cbgystart + (1 << rlvl->cbgheightexpn); prc->xstart = JAS_MAX(cbgxstart, JAS_CAST(uint_fast32_t, jas_seq2d_xstart(band->data))); prc->ystart = JAS_MAX(cbgystart, JAS_CAST(uint_fast32_t, jas_seq2d_ystart(band->data))); prc->xend = JAS_MIN(cbgxend, JAS_CAST(uint_fast32_t, jas_seq2d_xend(band->data))); prc->yend = JAS_MIN(cbgyend, JAS_CAST(uint_fast32_t, jas_seq2d_yend(band->data))); if (prc->xend > prc->xstart && prc->yend > prc->ystart) { tlcblkxstart = JPC_FLOORDIVPOW2(prc->xstart, rlvl->cblkwidthexpn) << rlvl->cblkwidthexpn; tlcblkystart = JPC_FLOORDIVPOW2(prc->ystart, rlvl->cblkheightexpn) << rlvl->cblkheightexpn; brcblkxend = JPC_CEILDIVPOW2(prc->xend, rlvl->cblkwidthexpn) << rlvl->cblkwidthexpn; brcblkyend = JPC_CEILDIVPOW2(prc->yend, rlvl->cblkheightexpn) << rlvl->cblkheightexpn; prc->numhcblks = (brcblkxend - tlcblkxstart) >> rlvl->cblkwidthexpn; prc->numvcblks = (brcblkyend - tlcblkystart) >> rlvl->cblkheightexpn; prc->numcblks = prc->numhcblks * prc->numvcblks; assert(prc->numcblks > 0); if (!(prc->incltagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { return -1; } if (!(prc->numimsbstagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { return -1; } if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_dec_cblk_t)))) { return -1; } cblkxstart = cbgxstart; cblkystart = cbgystart; for (cblkcnt = prc->numcblks, cblk = prc->cblks; cblkcnt > 0;) { cblkxend = cblkxstart + (1 << rlvl->cblkwidthexpn); cblkyend = cblkystart + (1 << rlvl->cblkheightexpn); tmpxstart = JAS_MAX(cblkxstart, prc->xstart); tmpystart = JAS_MAX(cblkystart, prc->ystart); tmpxend = JAS_MIN(cblkxend, prc->xend); tmpyend = JAS_MIN(cblkyend, prc->yend); if (tmpxend > tmpxstart && tmpyend > tmpystart) { cblk->firstpassno = -1; cblk->mqdec = 0; cblk->nulldec = 0; cblk->flags = 0; cblk->numpasses = 0; cblk->segs.head = 0; cblk->segs.tail = 0; cblk->curseg = 0; cblk->numimsbs = 0; cblk->numlenbits = 3; cblk->flags = 0; if (!(cblk->data = jas_seq2d_create(0, 0, 0, 0))) { return -1; } jas_seq2d_bindsub(cblk->data, band->data, tmpxstart, tmpystart, tmpxend, tmpyend); ++cblk; --cblkcnt; } cblkxstart += 1 << rlvl->cblkwidthexpn; if (cblkxstart >= cbgxend) { cblkxstart = cbgxstart; cblkystart += 1 << rlvl->cblkheightexpn; } } } else { prc->cblks = 0; prc->incltagtree = 0; prc->numimsbstagtree = 0; } cbgxstart += 1 << rlvl->cbgwidthexpn; if (cbgxstart >= brcbgxend) { cbgxstart = tlcbgxstart; cbgystart += 1 << rlvl->cbgheightexpn; } } /********************************************/ } } } if (!(tile->pi = jpc_dec_pi_create(dec, tile))) { return -1; } for (pchgno = 0; pchgno < jpc_pchglist_numpchgs(tile->cp->pchglist); ++pchgno) { pchg = jpc_pchg_copy(jpc_pchglist_get(tile->cp->pchglist, pchgno)); assert(pchg); jpc_pi_addpchg(tile->pi, pchg); } jpc_pi_init(tile->pi); return 0; } static int jpc_dec_tilefini(jpc_dec_t *dec, jpc_dec_tile_t *tile) { jpc_dec_tcomp_t *tcomp; int compno; int bandno; int rlvlno; jpc_dec_band_t *band; jpc_dec_rlvl_t *rlvl; int prcno; jpc_dec_prc_t *prc; jpc_dec_seg_t *seg; jpc_dec_cblk_t *cblk; int cblkno; if (tile->tcomps) { for (compno = 0, tcomp = tile->tcomps; compno < dec->numcomps; ++compno, ++tcomp) { for (rlvlno = 0, rlvl = tcomp->rlvls; rlvlno < tcomp->numrlvls; ++rlvlno, ++rlvl) { if (!rlvl->bands) { continue; } for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { if (band->prcs) { for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { while (cblk->segs.head) { seg = cblk->segs.head; jpc_seglist_remove(&cblk->segs, seg); jpc_seg_destroy(seg); } jas_matrix_destroy(cblk->data); if (cblk->mqdec) { jpc_mqdec_destroy(cblk->mqdec); } if (cblk->nulldec) { jpc_bitstream_close(cblk->nulldec); } if (cblk->flags) { jas_matrix_destroy(cblk->flags); } } if (prc->incltagtree) { jpc_tagtree_destroy(prc->incltagtree); } if (prc->numimsbstagtree) { jpc_tagtree_destroy(prc->numimsbstagtree); } if (prc->cblks) { jas_free(prc->cblks); } } } if (band->data) { jas_matrix_destroy(band->data); } if (band->prcs) { jas_free(band->prcs); } } if (rlvl->bands) { jas_free(rlvl->bands); } } if (tcomp->rlvls) { jas_free(tcomp->rlvls); } if (tcomp->data) { jas_matrix_destroy(tcomp->data); } if (tcomp->tsfb) { jpc_tsfb_destroy(tcomp->tsfb); } } } if (tile->cp) { jpc_dec_cp_destroy(tile->cp); tile->cp = 0; } if (tile->tcomps) { jas_free(tile->tcomps); tile->tcomps = 0; } if (tile->pi) { jpc_pi_destroy(tile->pi); tile->pi = 0; } if (tile->pkthdrstream) { jas_stream_close(tile->pkthdrstream); tile->pkthdrstream = 0; } if (tile->pptstab) { jpc_ppxstab_destroy(tile->pptstab); tile->pptstab = 0; } tile->state = JPC_TILE_DONE; return 0; } static int jpc_dec_tiledecode(jpc_dec_t *dec, jpc_dec_tile_t *tile) { int i; int j; jpc_dec_tcomp_t *tcomp; jpc_dec_rlvl_t *rlvl; jpc_dec_band_t *band; int compno; int rlvlno; int bandno; int adjust; int v; jpc_dec_ccp_t *ccp; jpc_dec_cmpt_t *cmpt; if (jpc_dec_decodecblks(dec, tile)) { jas_eprintf("jpc_dec_decodecblks failed\n"); return -1; } /* Perform dequantization. */ for (compno = 0, tcomp = tile->tcomps; compno < dec->numcomps; ++compno, ++tcomp) { ccp = &tile->cp->ccps[compno]; for (rlvlno = 0, rlvl = tcomp->rlvls; rlvlno < tcomp->numrlvls; ++rlvlno, ++rlvl) { if (!rlvl->bands) { continue; } for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { if (!band->data) { continue; } jpc_undo_roi(band->data, band->roishift, ccp->roishift - band->roishift, band->numbps); if (tile->realmode) { jas_matrix_asl(band->data, JPC_FIX_FRACBITS); jpc_dequantize(band->data, band->absstepsize); } } } } /* Apply an inverse wavelet transform if necessary. */ for (compno = 0, tcomp = tile->tcomps; compno < dec->numcomps; ++compno, ++tcomp) { ccp = &tile->cp->ccps[compno]; jpc_tsfb_synthesize(tcomp->tsfb, tcomp->data); } /* Apply an inverse intercomponent transform if necessary. */ switch (tile->cp->mctid) { case JPC_MCT_RCT: assert(dec->numcomps == 3); jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data, tile->tcomps[2].data); break; case JPC_MCT_ICT: assert(dec->numcomps == 3); jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data, tile->tcomps[2].data); break; } /* Perform rounding and convert to integer values. */ if (tile->realmode) { for (compno = 0, tcomp = tile->tcomps; compno < dec->numcomps; ++compno, ++tcomp) { for (i = 0; i < jas_matrix_numrows(tcomp->data); ++i) { for (j = 0; j < jas_matrix_numcols(tcomp->data); ++j) { v = jas_matrix_get(tcomp->data, i, j); v = jpc_fix_round(v); jas_matrix_set(tcomp->data, i, j, jpc_fixtoint(v)); } } } } /* Perform level shift. */ for (compno = 0, tcomp = tile->tcomps, cmpt = dec->cmpts; compno < dec->numcomps; ++compno, ++tcomp, ++cmpt) { adjust = cmpt->sgnd ? 0 : (1 << (cmpt->prec - 1)); for (i = 0; i < jas_matrix_numrows(tcomp->data); ++i) { for (j = 0; j < jas_matrix_numcols(tcomp->data); ++j) { *jas_matrix_getref(tcomp->data, i, j) += adjust; } } } /* Perform clipping. */ for (compno = 0, tcomp = tile->tcomps, cmpt = dec->cmpts; compno < dec->numcomps; ++compno, ++tcomp, ++cmpt) { jpc_fix_t mn; jpc_fix_t mx; mn = cmpt->sgnd ? (-(1 << (cmpt->prec - 1))) : (0); mx = cmpt->sgnd ? ((1 << (cmpt->prec - 1)) - 1) : ((1 << cmpt->prec) - 1); jas_matrix_clip(tcomp->data, mn, mx); } /* XXX need to free tsfb struct */ /* Write the data for each component of the image. */ for (compno = 0, tcomp = tile->tcomps, cmpt = dec->cmpts; compno < dec->numcomps; ++compno, ++tcomp, ++cmpt) { if (jas_image_writecmpt(dec->image, compno, tcomp->xstart - JPC_CEILDIV(dec->xstart, cmpt->hstep), tcomp->ystart - JPC_CEILDIV(dec->ystart, cmpt->vstep), jas_matrix_numcols( tcomp->data), jas_matrix_numrows(tcomp->data), tcomp->data)) { jas_eprintf("write component failed\n"); return -4; } } return 0; } static int jpc_dec_process_eoc(jpc_dec_t *dec, jpc_ms_t *ms) { int tileno; jpc_dec_tile_t *tile; /* Eliminate compiler warnings about unused variables. */ ms = 0; for (tileno = 0, tile = dec->tiles; tileno < dec->numtiles; ++tileno, ++tile) { if (tile->state == JPC_TILE_ACTIVE) { if (jpc_dec_tiledecode(dec, tile)) { return -1; } } jpc_dec_tilefini(dec, tile); } /* We are done processing the code stream. */ dec->state = JPC_MT; return 1; } static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_siz_t *siz = &ms->parms.siz; int compno; int tileno; jpc_dec_tile_t *tile; jpc_dec_tcomp_t *tcomp; int htileno; int vtileno; jpc_dec_cmpt_t *cmpt; dec->xstart = siz->xoff; dec->ystart = siz->yoff; dec->xend = siz->width; dec->yend = siz->height; dec->tilewidth = siz->tilewidth; dec->tileheight = siz->tileheight; dec->tilexoff = siz->tilexoff; dec->tileyoff = siz->tileyoff; dec->numcomps = siz->numcomps; if (!(dec->cp = jpc_dec_cp_create(dec->numcomps))) { return -1; } if (!(dec->cmpts = jas_malloc(dec->numcomps * sizeof(jpc_dec_cmpt_t)))) { return -1; } for (compno = 0, cmpt = dec->cmpts; compno < dec->numcomps; ++compno, ++cmpt) { cmpt->prec = siz->comps[compno].prec; cmpt->sgnd = siz->comps[compno].sgnd; cmpt->hstep = siz->comps[compno].hsamp; cmpt->vstep = siz->comps[compno].vsamp; cmpt->width = JPC_CEILDIV(dec->xend, cmpt->hstep) - JPC_CEILDIV(dec->xstart, cmpt->hstep); cmpt->height = JPC_CEILDIV(dec->yend, cmpt->vstep) - JPC_CEILDIV(dec->ystart, cmpt->vstep); cmpt->hsubstep = 0; cmpt->vsubstep = 0; } dec->image = 0; dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth); dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight); dec->numtiles = dec->numhtiles * dec->numvtiles; if (!(dec->tiles = jas_malloc(dec->numtiles * sizeof(jpc_dec_tile_t)))) { return -1; } for (tileno = 0, tile = dec->tiles; tileno < dec->numtiles; ++tileno, ++tile) { htileno = tileno % dec->numhtiles; vtileno = tileno / dec->numhtiles; tile->realmode = 0; tile->state = JPC_TILE_INIT; tile->xstart = JAS_MAX(dec->tilexoff + htileno * dec->tilewidth, dec->xstart); tile->ystart = JAS_MAX(dec->tileyoff + vtileno * dec->tileheight, dec->ystart); tile->xend = JAS_MIN(dec->tilexoff + (htileno + 1) * dec->tilewidth, dec->xend); tile->yend = JAS_MIN(dec->tileyoff + (vtileno + 1) * dec->tileheight, dec->yend); tile->numparts = 0; tile->partno = 0; tile->pkthdrstream = 0; tile->pkthdrstreampos = 0; tile->pptstab = 0; tile->cp = 0; if (!(tile->tcomps = jas_malloc(dec->numcomps * sizeof(jpc_dec_tcomp_t)))) { return -1; } for (compno = 0, cmpt = dec->cmpts, tcomp = tile->tcomps; compno < dec->numcomps; ++compno, ++cmpt, ++tcomp) { tcomp->rlvls = 0; tcomp->data = 0; tcomp->xstart = JPC_CEILDIV(tile->xstart, cmpt->hstep); tcomp->ystart = JPC_CEILDIV(tile->ystart, cmpt->vstep); tcomp->xend = JPC_CEILDIV(tile->xend, cmpt->hstep); tcomp->yend = JPC_CEILDIV(tile->yend, cmpt->vstep); tcomp->tsfb = 0; } } dec->pkthdrstreams = 0; /* We should expect to encounter other main header marker segments or an SOT marker segment next. */ dec->state = JPC_MH; return 0; } static int jpc_dec_process_cod(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_cod_t *cod = &ms->parms.cod; jpc_dec_tile_t *tile; switch (dec->state) { case JPC_MH: jpc_dec_cp_setfromcod(dec->cp, cod); break; case JPC_TPH: if (!(tile = dec->curtile)) { return -1; } if (tile->partno != 0) { return -1; } jpc_dec_cp_setfromcod(tile->cp, cod); break; } return 0; } static int jpc_dec_process_coc(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_coc_t *coc = &ms->parms.coc; jpc_dec_tile_t *tile; if (JAS_CAST(int, coc->compno) > dec->numcomps) { jas_eprintf("invalid component number in COC marker segment\n"); return -1; } switch (dec->state) { case JPC_MH: jpc_dec_cp_setfromcoc(dec->cp, coc); break; case JPC_TPH: if (!(tile = dec->curtile)) { return -1; } if (tile->partno > 0) { return -1; } jpc_dec_cp_setfromcoc(tile->cp, coc); break; } return 0; } static int jpc_dec_process_rgn(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_rgn_t *rgn = &ms->parms.rgn; jpc_dec_tile_t *tile; if (JAS_CAST(int, rgn->compno) > dec->numcomps) { jas_eprintf("invalid component number in RGN marker segment\n"); return -1; } switch (dec->state) { case JPC_MH: jpc_dec_cp_setfromrgn(dec->cp, rgn); break; case JPC_TPH: if (!(tile = dec->curtile)) { return -1; } if (tile->partno > 0) { return -1; } jpc_dec_cp_setfromrgn(tile->cp, rgn); break; } return 0; } static int jpc_dec_process_qcd(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_qcd_t *qcd = &ms->parms.qcd; jpc_dec_tile_t *tile; switch (dec->state) { case JPC_MH: jpc_dec_cp_setfromqcd(dec->cp, qcd); break; case JPC_TPH: if (!(tile = dec->curtile)) { return -1; } if (tile->partno > 0) { return -1; } jpc_dec_cp_setfromqcd(tile->cp, qcd); break; } return 0; } static int jpc_dec_process_qcc(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_qcc_t *qcc = &ms->parms.qcc; jpc_dec_tile_t *tile; if (JAS_CAST(int, qcc->compno) > dec->numcomps) { jas_eprintf("invalid component number in QCC marker segment\n"); return -1; } switch (dec->state) { case JPC_MH: jpc_dec_cp_setfromqcc(dec->cp, qcc); break; case JPC_TPH: if (!(tile = dec->curtile)) { return -1; } if (tile->partno > 0) { return -1; } jpc_dec_cp_setfromqcc(tile->cp, qcc); break; } return 0; } static int jpc_dec_process_poc(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_poc_t *poc = &ms->parms.poc; jpc_dec_tile_t *tile; switch (dec->state) { case JPC_MH: if (jpc_dec_cp_setfrompoc(dec->cp, poc, 1)) { return -1; } break; case JPC_TPH: if (!(tile = dec->curtile)) { return -1; } if (!tile->partno) { if (jpc_dec_cp_setfrompoc(tile->cp, poc, (!tile->partno))) { return -1; } } else { jpc_pi_addpchgfrompoc(tile->pi, poc); } break; } return 0; } static int jpc_dec_process_ppm(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_ppm_t *ppm = &ms->parms.ppm; jpc_ppxstabent_t *ppmstabent; if (!dec->ppmstab) { if (!(dec->ppmstab = jpc_ppxstab_create())) { return -1; } } if (!(ppmstabent = jpc_ppxstabent_create())) { return -1; } ppmstabent->ind = ppm->ind; ppmstabent->data = ppm->data; ppm->data = 0; ppmstabent->len = ppm->len; if (jpc_ppxstab_insert(dec->ppmstab, ppmstabent)) { return -1; } return 0; } static int jpc_dec_process_ppt(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_ppt_t *ppt = &ms->parms.ppt; jpc_dec_tile_t *tile; jpc_ppxstabent_t *pptstabent; tile = dec->curtile; if (!tile->pptstab) { if (!(tile->pptstab = jpc_ppxstab_create())) { return -1; } } if (!(pptstabent = jpc_ppxstabent_create())) { return -1; } pptstabent->ind = ppt->ind; pptstabent->data = ppt->data; ppt->data = 0; pptstabent->len = ppt->len; if (jpc_ppxstab_insert(tile->pptstab, pptstabent)) { return -1; } return 0; } static int jpc_dec_process_com(jpc_dec_t *dec, jpc_ms_t *ms) { /* Eliminate compiler warnings about unused variables. */ dec = 0; ms = 0; return 0; } static int jpc_dec_process_unk(jpc_dec_t *dec, jpc_ms_t *ms) { /* Eliminate compiler warnings about unused variables. */ dec = 0; jas_eprintf("warning: ignoring unknown marker segment\n"); jpc_ms_dump(ms, stderr); return 0; } /******************************************************************************\ * \******************************************************************************/ static jpc_dec_cp_t *jpc_dec_cp_create(uint_fast16_t numcomps) { jpc_dec_cp_t *cp; jpc_dec_ccp_t *ccp; int compno; if (!(cp = jas_malloc(sizeof(jpc_dec_cp_t)))) { return 0; } cp->flags = 0; cp->numcomps = numcomps; cp->prgord = 0; cp->numlyrs = 0; cp->mctid = 0; cp->csty = 0; if (!(cp->ccps = jas_malloc(cp->numcomps * sizeof(jpc_dec_ccp_t)))) { return 0; } if (!(cp->pchglist = jpc_pchglist_create())) { jas_free(cp->ccps); return 0; } for (compno = 0, ccp = cp->ccps; compno < cp->numcomps; ++compno, ++ccp) { ccp->flags = 0; ccp->numrlvls = 0; ccp->cblkwidthexpn = 0; ccp->cblkheightexpn = 0; ccp->qmfbid = 0; ccp->numstepsizes = 0; ccp->numguardbits = 0; ccp->roishift = 0; ccp->cblkctx = 0; } return cp; } static jpc_dec_cp_t *jpc_dec_cp_copy(jpc_dec_cp_t *cp) { jpc_dec_cp_t *newcp; jpc_dec_ccp_t *newccp; jpc_dec_ccp_t *ccp; int compno; if (!(newcp = jpc_dec_cp_create(cp->numcomps))) { return 0; } newcp->flags = cp->flags; newcp->prgord = cp->prgord; newcp->numlyrs = cp->numlyrs; newcp->mctid = cp->mctid; newcp->csty = cp->csty; jpc_pchglist_destroy(newcp->pchglist); newcp->pchglist = 0; if (!(newcp->pchglist = jpc_pchglist_copy(cp->pchglist))) { jas_free(newcp); return 0; } for (compno = 0, newccp = newcp->ccps, ccp = cp->ccps; compno < cp->numcomps; ++compno, ++newccp, ++ccp) { *newccp = *ccp; } return newcp; } static void jpc_dec_cp_resetflags(jpc_dec_cp_t *cp) { int compno; jpc_dec_ccp_t *ccp; cp->flags &= (JPC_CSET | JPC_QSET); for (compno = 0, ccp = cp->ccps; compno < cp->numcomps; ++compno, ++ccp) { ccp->flags = 0; } } static void jpc_dec_cp_destroy(jpc_dec_cp_t *cp) { if (cp->ccps) { jas_free(cp->ccps); } if (cp->pchglist) { jpc_pchglist_destroy(cp->pchglist); } jas_free(cp); } static int jpc_dec_cp_isvalid(jpc_dec_cp_t *cp) { uint_fast16_t compcnt; jpc_dec_ccp_t *ccp; if (!(cp->flags & JPC_CSET) || !(cp->flags & JPC_QSET)) { return 0; } for (compcnt = cp->numcomps, ccp = cp->ccps; compcnt > 0; --compcnt, ++ccp) { /* Is there enough step sizes for the number of bands? */ if ((ccp->qsty != JPC_QCX_SIQNT && JAS_CAST(int, ccp->numstepsizes) < 3 * ccp->numrlvls - 2) || (ccp->qsty == JPC_QCX_SIQNT && ccp->numstepsizes != 1)) { return 0; } } return 1; } static void calcstepsizes(uint_fast16_t refstepsize, int numrlvls, uint_fast16_t *stepsizes) { int bandno; int numbands; uint_fast16_t expn; uint_fast16_t mant; expn = JPC_QCX_GETEXPN(refstepsize); mant = JPC_QCX_GETMANT(refstepsize); numbands = 3 * numrlvls - 2; for (bandno = 0; bandno < numbands; ++bandno) { stepsizes[bandno] = JPC_QCX_MANT(mant) | JPC_QCX_EXPN(expn + (numrlvls - 1) - (numrlvls - 1 - ((bandno > 0) ? ((bandno + 2) / 3) : (0)))); } } static int jpc_dec_cp_prepare(jpc_dec_cp_t *cp) { jpc_dec_ccp_t *ccp; int compno; int i; for (compno = 0, ccp = cp->ccps; compno < cp->numcomps; ++compno, ++ccp) { if (!(ccp->csty & JPC_COX_PRT)) { for (i = 0; i < JPC_MAXRLVLS; ++i) { ccp->prcwidthexpns[i] = 15; ccp->prcheightexpns[i] = 15; } } if (ccp->qsty == JPC_QCX_SIQNT) { calcstepsizes(ccp->stepsizes[0], ccp->numrlvls, ccp->stepsizes); } } return 0; } static int jpc_dec_cp_setfromcod(jpc_dec_cp_t *cp, jpc_cod_t *cod) { jpc_dec_ccp_t *ccp; int compno; cp->flags |= JPC_CSET; cp->prgord = cod->prg; if (cod->mctrans) { cp->mctid = (cod->compparms.qmfbid == JPC_COX_INS) ? (JPC_MCT_ICT) : (JPC_MCT_RCT); } else { cp->mctid = JPC_MCT_NONE; } cp->numlyrs = cod->numlyrs; cp->csty = cod->csty & (JPC_COD_SOP | JPC_COD_EPH); for (compno = 0, ccp = cp->ccps; compno < cp->numcomps; ++compno, ++ccp) { jpc_dec_cp_setfromcox(cp, ccp, &cod->compparms, 0); } cp->flags |= JPC_CSET; return 0; } static int jpc_dec_cp_setfromcoc(jpc_dec_cp_t *cp, jpc_coc_t *coc) { jpc_dec_cp_setfromcox(cp, &cp->ccps[coc->compno], &coc->compparms, JPC_COC); return 0; } static int jpc_dec_cp_setfromcox(jpc_dec_cp_t *cp, jpc_dec_ccp_t *ccp, jpc_coxcp_t *compparms, int flags) { int rlvlno; /* Eliminate compiler warnings about unused variables. */ cp = 0; if ((flags & JPC_COC) || !(ccp->flags & JPC_COC)) { ccp->numrlvls = compparms->numdlvls + 1; ccp->cblkwidthexpn = JPC_COX_GETCBLKSIZEEXPN( compparms->cblkwidthval); ccp->cblkheightexpn = JPC_COX_GETCBLKSIZEEXPN( compparms->cblkheightval); ccp->qmfbid = compparms->qmfbid; ccp->cblkctx = compparms->cblksty; ccp->csty = compparms->csty & JPC_COX_PRT; for (rlvlno = 0; rlvlno < compparms->numrlvls; ++rlvlno) { ccp->prcwidthexpns[rlvlno] = compparms->rlvls[rlvlno].parwidthval; ccp->prcheightexpns[rlvlno] = compparms->rlvls[rlvlno].parheightval; } ccp->flags |= flags | JPC_CSET; } return 0; } static int jpc_dec_cp_setfromqcd(jpc_dec_cp_t *cp, jpc_qcd_t *qcd) { int compno; jpc_dec_ccp_t *ccp; for (compno = 0, ccp = cp->ccps; compno < cp->numcomps; ++compno, ++ccp) { jpc_dec_cp_setfromqcx(cp, ccp, &qcd->compparms, 0); } cp->flags |= JPC_QSET; return 0; } static int jpc_dec_cp_setfromqcc(jpc_dec_cp_t *cp, jpc_qcc_t *qcc) { return jpc_dec_cp_setfromqcx(cp, &cp->ccps[qcc->compno], &qcc->compparms, JPC_QCC); } static int jpc_dec_cp_setfromqcx(jpc_dec_cp_t *cp, jpc_dec_ccp_t *ccp, jpc_qcxcp_t *compparms, int flags) { int bandno; /* Eliminate compiler warnings about unused variables. */ cp = 0; if ((flags & JPC_QCC) || !(ccp->flags & JPC_QCC)) { ccp->flags |= flags | JPC_QSET; for (bandno = 0; bandno < compparms->numstepsizes; ++bandno) { ccp->stepsizes[bandno] = compparms->stepsizes[bandno]; } ccp->numstepsizes = compparms->numstepsizes; ccp->numguardbits = compparms->numguard; ccp->qsty = compparms->qntsty; } return 0; } static int jpc_dec_cp_setfromrgn(jpc_dec_cp_t *cp, jpc_rgn_t *rgn) { jpc_dec_ccp_t *ccp; ccp = &cp->ccps[rgn->compno]; ccp->roishift = rgn->roishift; return 0; } static int jpc_pi_addpchgfrompoc(jpc_pi_t *pi, jpc_poc_t *poc) { int pchgno; jpc_pchg_t *pchg; for (pchgno = 0; pchgno < poc->numpchgs; ++pchgno) { if (!(pchg = jpc_pchg_copy(&poc->pchgs[pchgno]))) { return -1; } if (jpc_pchglist_insert(pi->pchglist, -1, pchg)) { return -1; } } return 0; } static int jpc_dec_cp_setfrompoc(jpc_dec_cp_t *cp, jpc_poc_t *poc, int reset) { int pchgno; jpc_pchg_t *pchg; if (reset) { while (jpc_pchglist_numpchgs(cp->pchglist) > 0) { pchg = jpc_pchglist_remove(cp->pchglist, 0); jpc_pchg_destroy(pchg); } } for (pchgno = 0; pchgno < poc->numpchgs; ++pchgno) { if (!(pchg = jpc_pchg_copy(&poc->pchgs[pchgno]))) { return -1; } if (jpc_pchglist_insert(cp->pchglist, -1, pchg)) { return -1; } } return 0; } static jpc_fix_t jpc_calcabsstepsize(int stepsize, int numbits) { jpc_fix_t absstepsize; int n; absstepsize = jpc_inttofix(1); n = JPC_FIX_FRACBITS - 11; absstepsize |= (n >= 0) ? (JPC_QCX_GETMANT(stepsize) << n) : (JPC_QCX_GETMANT(stepsize) >> (-n)); n = numbits - JPC_QCX_GETEXPN(stepsize); absstepsize = (n >= 0) ? (absstepsize << n) : (absstepsize >> (-n)); return absstepsize; } static void jpc_dequantize(jas_matrix_t *x, jpc_fix_t absstepsize) { int i; int j; int t; assert(absstepsize >= 0); if (absstepsize == jpc_inttofix(1)) { return; } for (i = 0; i < jas_matrix_numrows(x); ++i) { for (j = 0; j < jas_matrix_numcols(x); ++j) { t = jas_matrix_get(x, i, j); if (t) { t = jpc_fix_mul(t, absstepsize); } else { t = 0; } jas_matrix_set(x, i, j, t); } } } static void jpc_undo_roi(jas_matrix_t *x, int roishift, int bgshift, int numbps) { int i; int j; int thresh; jpc_fix_t val; jpc_fix_t mag; bool warn; uint_fast32_t mask; if (roishift == 0 && bgshift == 0) { return; } thresh = 1 << roishift; warn = false; for (i = 0; i < jas_matrix_numrows(x); ++i) { for (j = 0; j < jas_matrix_numcols(x); ++j) { val = jas_matrix_get(x, i, j); mag = JAS_ABS(val); if (mag >= thresh) { /* We are dealing with ROI data. */ mag >>= roishift; val = (val < 0) ? (-mag) : mag; jas_matrix_set(x, i, j, val); } else { /* We are dealing with non-ROI (i.e., background) data. */ mag <<= bgshift; mask = (1 << numbps) - 1; /* Perform a basic sanity check on the sample value. */ /* Some implementations write garbage in the unused most-significant bit planes introduced by ROI shifting. Here we ensure that any such bits are masked off. */ if (mag & (~mask)) { if (!warn) { jas_eprintf("warning: possibly corrupt code stream\n"); warn = true; } mag &= mask; } val = (val < 0) ? (-mag) : mag; jas_matrix_set(x, i, j, val); } } } } static jpc_dec_t *jpc_dec_create(jpc_dec_importopts_t *impopts, jas_stream_t *in) { jpc_dec_t *dec; if (!(dec = jas_malloc(sizeof(jpc_dec_t)))) { return 0; } dec->image = 0; dec->xstart = 0; dec->ystart = 0; dec->xend = 0; dec->yend = 0; dec->tilewidth = 0; dec->tileheight = 0; dec->tilexoff = 0; dec->tileyoff = 0; dec->numhtiles = 0; dec->numvtiles = 0; dec->numtiles = 0; dec->tiles = 0; dec->curtile = 0; dec->numcomps = 0; dec->in = in; dec->cp = 0; dec->maxlyrs = impopts->maxlyrs; dec->maxpkts = impopts->maxpkts; dec->numpkts = 0; dec->ppmseqno = 0; dec->state = 0; dec->cmpts = 0; dec->pkthdrstreams = 0; dec->ppmstab = 0; dec->curtileendoff = 0; return dec; } static void jpc_dec_destroy(jpc_dec_t *dec) { if (dec->cstate) { jpc_cstate_destroy(dec->cstate); } if (dec->pkthdrstreams) { jpc_streamlist_destroy(dec->pkthdrstreams); } if (dec->image) { jas_image_destroy(dec->image); } if (dec->cp) { jpc_dec_cp_destroy(dec->cp); } if (dec->cmpts) { jas_free(dec->cmpts); } if (dec->tiles) { jas_free(dec->tiles); } jas_free(dec); } /******************************************************************************\ * \******************************************************************************/ void jpc_seglist_insert(jpc_dec_seglist_t *list, jpc_dec_seg_t *ins, jpc_dec_seg_t *node) { jpc_dec_seg_t *prev; jpc_dec_seg_t *next; prev = ins; node->prev = prev; next = prev ? (prev->next) : 0; node->prev = prev; node->next = next; if (prev) { prev->next = node; } else { list->head = node; } if (next) { next->prev = node; } else { list->tail = node; } } void jpc_seglist_remove(jpc_dec_seglist_t *list, jpc_dec_seg_t *seg) { jpc_dec_seg_t *prev; jpc_dec_seg_t *next; prev = seg->prev; next = seg->next; if (prev) { prev->next = next; } else { list->head = next; } if (next) { next->prev = prev; } else { list->tail = prev; } seg->prev = 0; seg->next = 0; } jpc_dec_seg_t *jpc_seg_alloc() { jpc_dec_seg_t *seg; if (!(seg = jas_malloc(sizeof(jpc_dec_seg_t)))) { return 0; } seg->prev = 0; seg->next = 0; seg->passno = -1; seg->numpasses = 0; seg->maxpasses = 0; seg->type = JPC_SEG_INVALID; seg->stream = 0; seg->cnt = 0; seg->complete = 0; seg->lyrno = -1; return seg; } void jpc_seg_destroy(jpc_dec_seg_t *seg) { if (seg->stream) { jas_stream_close(seg->stream); } jas_free(seg); } static int jpc_dec_dump(jpc_dec_t *dec, FILE *out) { jpc_dec_tile_t *tile; int tileno; jpc_dec_tcomp_t *tcomp; int compno; jpc_dec_rlvl_t *rlvl; int rlvlno; jpc_dec_band_t *band; int bandno; jpc_dec_prc_t *prc; int prcno; jpc_dec_cblk_t *cblk; int cblkno; for (tileno = 0, tile = dec->tiles; tileno < dec->numtiles; ++tileno, ++tile) { for (compno = 0, tcomp = tile->tcomps; compno < dec->numcomps; ++compno, ++tcomp) { for (rlvlno = 0, rlvl = tcomp->rlvls; rlvlno < tcomp->numrlvls; ++rlvlno, ++rlvl) { fprintf(out, "RESOLUTION LEVEL %d\n", rlvlno); fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n", rlvl->xstart, rlvl->ystart, rlvl->xend, rlvl->yend, rlvl->xend - rlvl->xstart, rlvl->yend - rlvl->ystart); for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { fprintf(out, "BAND %d\n", bandno); fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n", jas_seq2d_xstart(band->data), jas_seq2d_ystart(band->data), jas_seq2d_xend(band->data), jas_seq2d_yend(band->data), jas_seq2d_xend(band->data) - jas_seq2d_xstart(band->data), jas_seq2d_yend(band->data) - jas_seq2d_ystart(band->data)); for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, ++prc) { fprintf(out, "CODE BLOCK GROUP %d\n", prcno); fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n", prc->xstart, prc->ystart, prc->xend, prc->yend, prc->xend - prc->xstart, prc->yend - prc->ystart); for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { fprintf(out, "CODE BLOCK %d\n", cblkno); fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n", jas_seq2d_xstart(cblk->data), jas_seq2d_ystart(cblk->data), jas_seq2d_xend(cblk->data), jas_seq2d_yend(cblk->data), jas_seq2d_xend(cblk->data) - jas_seq2d_xstart(cblk->data), jas_seq2d_yend(cblk->data) - jas_seq2d_ystart(cblk->data)); } } } } } } return 0; } jpc_streamlist_t *jpc_streamlist_create() { jpc_streamlist_t *streamlist; int i; if (!(streamlist = jas_malloc(sizeof(jpc_streamlist_t)))) { return 0; } streamlist->numstreams = 0; streamlist->maxstreams = 100; if (!(streamlist->streams = jas_malloc(streamlist->maxstreams * sizeof(jas_stream_t *)))) { jas_free(streamlist); return 0; } for (i = 0; i < streamlist->maxstreams; ++i) { streamlist->streams[i] = 0; } return streamlist; } int jpc_streamlist_insert(jpc_streamlist_t *streamlist, int streamno, jas_stream_t *stream) { jas_stream_t **newstreams; int newmaxstreams; int i; /* Grow the array of streams if necessary. */ if (streamlist->numstreams >= streamlist->maxstreams) { newmaxstreams = streamlist->maxstreams + 1024; if (!(newstreams = jas_realloc(streamlist->streams, (newmaxstreams + 1024) * sizeof(jas_stream_t *)))) { return -1; } for (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) { streamlist->streams[i] = 0; } streamlist->maxstreams = newmaxstreams; streamlist->streams = newstreams; } if (streamno != streamlist->numstreams) { /* Can only handle insertion at start of list. */ return -1; } streamlist->streams[streamno] = stream; ++streamlist->numstreams; return 0; } jas_stream_t *jpc_streamlist_remove(jpc_streamlist_t *streamlist, int streamno) { jas_stream_t *stream; int i; if (streamno >= streamlist->numstreams) { abort(); } stream = streamlist->streams[streamno]; for (i = streamno + 1; i < streamlist->numstreams; ++i) { streamlist->streams[i - 1] = streamlist->streams[i]; } --streamlist->numstreams; return stream; } void jpc_streamlist_destroy(jpc_streamlist_t *streamlist) { int streamno; if (streamlist->streams) { for (streamno = 0; streamno < streamlist->numstreams; ++streamno) { jas_stream_close(streamlist->streams[streamno]); } jas_free(streamlist->streams); } jas_free(streamlist); } jas_stream_t *jpc_streamlist_get(jpc_streamlist_t *streamlist, int streamno) { assert(streamno < streamlist->numstreams); return streamlist->streams[streamno]; } int jpc_streamlist_numstreams(jpc_streamlist_t *streamlist) { return streamlist->numstreams; } jpc_ppxstab_t *jpc_ppxstab_create() { jpc_ppxstab_t *tab; if (!(tab = jas_malloc(sizeof(jpc_ppxstab_t)))) { return 0; } tab->numents = 0; tab->maxents = 0; tab->ents = 0; return tab; } void jpc_ppxstab_destroy(jpc_ppxstab_t *tab) { int i; for (i = 0; i < tab->numents; ++i) { jpc_ppxstabent_destroy(tab->ents[i]); } if (tab->ents) { jas_free(tab->ents); } jas_free(tab); } int jpc_ppxstab_grow(jpc_ppxstab_t *tab, int maxents) { jpc_ppxstabent_t **newents; if (tab->maxents < maxents) { newents = (tab->ents) ? jas_realloc(tab->ents, maxents * sizeof(jpc_ppxstabent_t *)) : jas_malloc(maxents * sizeof(jpc_ppxstabent_t *)); if (!newents) { return -1; } tab->ents = newents; tab->maxents = maxents; } return 0; } int jpc_ppxstab_insert(jpc_ppxstab_t *tab, jpc_ppxstabent_t *ent) { int inspt; int i; for (i = 0; i < tab->numents; ++i) { if (tab->ents[i]->ind > ent->ind) { break; } } inspt = i; if (tab->numents >= tab->maxents) { if (jpc_ppxstab_grow(tab, tab->maxents + 128)) { return -1; } } for (i = tab->numents; i > inspt; --i) { tab->ents[i] = tab->ents[i - 1]; } tab->ents[i] = ent; ++tab->numents; return 0; } jpc_streamlist_t *jpc_ppmstabtostreams(jpc_ppxstab_t *tab) { jpc_streamlist_t *streams; uchar *dataptr; uint_fast32_t datacnt; uint_fast32_t tpcnt; jpc_ppxstabent_t *ent; int entno; jas_stream_t *stream; int n; if (!(streams = jpc_streamlist_create())) { goto error; } if (!tab->numents) { return streams; } entno = 0; ent = tab->ents[entno]; dataptr = ent->data; datacnt = ent->len; for (;;) { /* Get the length of the packet header data for the current tile-part. */ if (datacnt < 4) { goto error; } if (!(stream = jas_stream_memopen(0, 0))) { goto error; } if (jpc_streamlist_insert(streams, jpc_streamlist_numstreams(streams), stream)) { goto error; } tpcnt = (dataptr[0] << 24) | (dataptr[1] << 16) | (dataptr[2] << 8) | dataptr[3]; datacnt -= 4; dataptr += 4; /* Get the packet header data for the current tile-part. */ while (tpcnt) { if (!datacnt) { if (++entno >= tab->numents) { goto error; } ent = tab->ents[entno]; dataptr = ent->data; datacnt = ent->len; } n = JAS_MIN(tpcnt, datacnt); if (jas_stream_write(stream, dataptr, n) != n) { goto error; } tpcnt -= n; dataptr += n; datacnt -= n; } jas_stream_rewind(stream); if (!datacnt) { if (++entno >= tab->numents) { break; } ent = tab->ents[entno]; dataptr = ent->data; datacnt = ent->len; } } return streams; error: jpc_streamlist_destroy(streams); return 0; } int jpc_pptstabwrite(jas_stream_t *out, jpc_ppxstab_t *tab) { int i; jpc_ppxstabent_t *ent; for (i = 0; i < tab->numents; ++i) { ent = tab->ents[i]; if (jas_stream_write(out, ent->data, ent->len) != JAS_CAST(int, ent->len)) { return -1; } } return 0; } jpc_ppxstabent_t *jpc_ppxstabent_create() { jpc_ppxstabent_t *ent; if (!(ent = jas_malloc(sizeof(jpc_ppxstabent_t)))) { return 0; } ent->data = 0; ent->len = 0; ent->ind = 0; return ent; } void jpc_ppxstabent_destroy(jpc_ppxstabent_t *ent) { if (ent->data) { jas_free(ent->data); } jas_free(ent); } jasper-1.900.1/src/libjasper/jpc/jpc_fix.h0000644000175000017500000001503310554235553017256 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Fixed-Point Number Class * * $Id$ */ #ifndef JPC_FIX_H #define JPC_FIX_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" #include "jasper/jas_fix.h" /******************************************************************************\ * Basic parameters of the fixed-point type. \******************************************************************************/ /* The integral type used to represent a fixed-point number. This type must be capable of representing values from -(2^31) to 2^31-1 (inclusive). */ typedef int_fast32_t jpc_fix_t; /* The integral type used to respresent higher-precision intermediate results. This type should be capable of representing values from -(2^63) to 2^63-1 (inclusive). */ typedef int_fast64_t jpc_fix_big_t; /* The number of bits used for the fractional part of a fixed-point number. */ #define JPC_FIX_FRACBITS 13 /******************************************************************************\ * Instantiations of the generic fixed-point number macros for the * parameters given above. (Too bad C does not support templates, eh?) * The purpose of these macros is self-evident if one examines the * corresponding macros in the jasper/jas_fix.h header file. \******************************************************************************/ #define JPC_FIX_ZERO JAS_FIX_ZERO(jpc_fix_t, JPC_FIX_FRACBITS) #define JPC_FIX_ONE JAS_FIX_ONE(jpc_fix_t, JPC_FIX_FRACBITS) #define JPC_FIX_HALF JAS_FIX_HALF(jpc_fix_t, JPC_FIX_FRACBITS) #define jpc_inttofix(x) JAS_INTTOFIX(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fixtoint(x) JAS_FIXTOINT(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fixtodbl(x) JAS_FIXTODBL(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_dbltofix(x) JAS_DBLTOFIX(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fix_add(x, y) JAS_FIX_ADD(jpc_fix_t, JPC_FIX_FRACBITS, x, y) #define jpc_fix_sub(x, y) JAS_FIX_SUB(jpc_fix_t, JPC_FIX_FRACBITS, x, y) #define jpc_fix_mul(x, y) \ JAS_FIX_MUL(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y) #define jpc_fix_mulbyint(x, y) \ JAS_FIX_MULBYINT(jpc_fix_t, JPC_FIX_FRACBITS, x, y) #define jpc_fix_div(x, y) \ JAS_FIX_DIV(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y) #define jpc_fix_neg(x) JAS_FIX_NEG(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fix_asl(x, n) JAS_FIX_ASL(jpc_fix_t, JPC_FIX_FRACBITS, x, n) #define jpc_fix_asr(x, n) JAS_FIX_ASR(jpc_fix_t, JPC_FIX_FRACBITS, x, n) #define jpc_fix_pluseq(x, y) JAS_FIX_PLUSEQ(jpc_fix_t, JPC_FIX_FRACBITS, x, y) #define jpc_fix_minuseq(x, y) JAS_FIX_MINUSEQ(jpc_fix_t, JPC_FIX_FRACBITS, x, y) #define jpc_fix_muleq(x, y) \ JAS_FIX_MULEQ(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y) #define jpc_fix_abs(x) JAS_FIX_ABS(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fix_isint(x) JAS_FIX_ISINT(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fix_sgn(x) JAS_FIX_SGN(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fix_round(x) JAS_FIX_ROUND(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fix_floor(x) JAS_FIX_FLOOR(jpc_fix_t, JPC_FIX_FRACBITS, x) #define jpc_fix_trunc(x) JAS_FIX_TRUNC(jpc_fix_t, JPC_FIX_FRACBITS, x) /******************************************************************************\ * Extra macros for convenience. \******************************************************************************/ /* Compute the sum of three fixed-point numbers. */ #define jpc_fix_add3(x, y, z) jpc_fix_add(jpc_fix_add(x, y), z) #endif jasper-1.900.1/src/libjasper/jpc/jpc_util.c0000644000175000017500000001310610554235553017437 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ /******************************************************************************\ * Includes \******************************************************************************/ #include #include #include #include #include #include #include "jasper/jas_math.h" #include "jasper/jas_malloc.h" #include "jpc_fix.h" #include "jpc_cs.h" #include "jpc_flt.h" #include "jpc_util.h" /******************************************************************************\ * Miscellaneous Functions \******************************************************************************/ int jpc_atoaf(char *s, int *numvalues, double **values) { static char delim[] = ", \t\n"; char buf[4096]; int n; double *vs; char *cp; strncpy(buf, s, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; n = 0; if ((cp = strtok(buf, delim))) { ++n; while ((cp = strtok(0, delim))) { if (cp != '\0') { ++n; } } } if (n) { if (!(vs = jas_malloc(n * sizeof(double)))) { return -1; } strncpy(buf, s, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; n = 0; if ((cp = strtok(buf, delim))) { vs[n] = atof(cp); ++n; while ((cp = strtok(0, delim))) { if (cp != '\0') { vs[n] = atof(cp); ++n; } } } } else { vs = 0; } *numvalues = n; *values = vs; return 0; } jas_seq_t *jpc_seq_upsample(jas_seq_t *x, int m) { jas_seq_t *z; int i; if (!(z = jas_seq_create(jas_seq_start(x) * m, (jas_seq_end(x) - 1) * m + 1))) return 0; for (i = jas_seq_start(z); i < jas_seq_end(z); i++) { *jas_seq_getref(z, i) = (!JAS_MOD(i, m)) ? jas_seq_get(x, i / m) : jpc_inttofix(0); } return z; } jpc_fix_t jpc_seq_norm(jas_seq_t *x) { jpc_fix_t s; int i; s = jpc_inttofix(0); for (i = jas_seq_start(x); i < jas_seq_end(x); i++) { s = jpc_fix_add(s, jpc_fix_mul(jas_seq_get(x, i), jas_seq_get(x, i))); } return jpc_dbltofix(sqrt(jpc_fixtodbl(s))); } jas_seq_t *jpc_seq_conv(jas_seq_t *x, jas_seq_t *y) { int i; int j; int k; jas_seq_t *z; jpc_fix_t s; jpc_fix_t v; z = jas_seq_create(jas_seq_start(x) + jas_seq_start(y), jas_seq_end(x) + jas_seq_end(y) - 1); assert(z); for (i = jas_seq_start(z); i < jas_seq_end(z); i++) { s = jpc_inttofix(0); for (j = jas_seq_start(y); j < jas_seq_end(y); j++) { k = i - j; if (k < jas_seq_start(x) || k >= jas_seq_end(x)) { v = JPC_FIX_ZERO; } else { v = jas_seq_get(x, k); } s = jpc_fix_add(s, jpc_fix_mul(jas_seq_get(y, j), v)); } *jas_seq_getref(z, i) = s; } return z; } jasper-1.900.1/src/libjasper/jpc/jpc_mct.c0000644000175000017500000002003010554235553017237 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Multicomponent Transform Code * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_seq.h" #include "jpc_fix.h" #include "jpc_mct.h" /******************************************************************************\ * Code. \******************************************************************************/ /* Compute the forward RCT. */ void jpc_rct(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2) { int numrows; int numcols; int i; int j; jpc_fix_t *c0p; jpc_fix_t *c1p; jpc_fix_t *c2p; numrows = jas_matrix_numrows(c0); numcols = jas_matrix_numcols(c0); /* All three matrices must have the same dimensions. */ assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numcols(c1) == numcols && jas_matrix_numrows(c2) == numrows && jas_matrix_numcols(c2) == numcols); for (i = 0; i < numrows; i++) { c0p = jas_matrix_getref(c0, i, 0); c1p = jas_matrix_getref(c1, i, 0); c2p = jas_matrix_getref(c2, i, 0); for (j = numcols; j > 0; --j) { int r; int g; int b; int y; int u; int v; r = *c0p; g = *c1p; b = *c2p; y = (r + (g << 1) + b) >> 2; u = b - g; v = r - g; *c0p++ = y; *c1p++ = u; *c2p++ = v; } } } /* Compute the inverse RCT. */ void jpc_irct(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2) { int numrows; int numcols; int i; int j; jpc_fix_t *c0p; jpc_fix_t *c1p; jpc_fix_t *c2p; numrows = jas_matrix_numrows(c0); numcols = jas_matrix_numcols(c0); /* All three matrices must have the same dimensions. */ assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numcols(c1) == numcols && jas_matrix_numrows(c2) == numrows && jas_matrix_numcols(c2) == numcols); for (i = 0; i < numrows; i++) { c0p = jas_matrix_getref(c0, i, 0); c1p = jas_matrix_getref(c1, i, 0); c2p = jas_matrix_getref(c2, i, 0); for (j = numcols; j > 0; --j) { int r; int g; int b; int y; int u; int v; y = *c0p; u = *c1p; v = *c2p; g = y - ((u + v) >> 2); r = v + g; b = u + g; *c0p++ = r; *c1p++ = g; *c2p++ = b; } } } void jpc_ict(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2) { int numrows; int numcols; int i; int j; jpc_fix_t r; jpc_fix_t g; jpc_fix_t b; jpc_fix_t y; jpc_fix_t u; jpc_fix_t v; jpc_fix_t *c0p; jpc_fix_t *c1p; jpc_fix_t *c2p; numrows = jas_matrix_numrows(c0); assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numrows(c2) == numrows); numcols = jas_matrix_numcols(c0); assert(jas_matrix_numcols(c1) == numcols && jas_matrix_numcols(c2) == numcols); for (i = 0; i < numrows; ++i) { c0p = jas_matrix_getref(c0, i, 0); c1p = jas_matrix_getref(c1, i, 0); c2p = jas_matrix_getref(c2, i, 0); for (j = numcols; j > 0; --j) { r = *c0p; g = *c1p; b = *c2p; y = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(0.299), r), jpc_fix_mul(jpc_dbltofix(0.587), g), jpc_fix_mul(jpc_dbltofix(0.114), b)); u = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(-0.16875), r), jpc_fix_mul(jpc_dbltofix(-0.33126), g), jpc_fix_mul(jpc_dbltofix(0.5), b)); v = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(0.5), r), jpc_fix_mul(jpc_dbltofix(-0.41869), g), jpc_fix_mul(jpc_dbltofix(-0.08131), b)); *c0p++ = y; *c1p++ = u; *c2p++ = v; } } } void jpc_iict(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2) { int numrows; int numcols; int i; int j; jpc_fix_t r; jpc_fix_t g; jpc_fix_t b; jpc_fix_t y; jpc_fix_t u; jpc_fix_t v; jpc_fix_t *c0p; jpc_fix_t *c1p; jpc_fix_t *c2p; numrows = jas_matrix_numrows(c0); assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numrows(c2) == numrows); numcols = jas_matrix_numcols(c0); assert(jas_matrix_numcols(c1) == numcols && jas_matrix_numcols(c2) == numcols); for (i = 0; i < numrows; ++i) { c0p = jas_matrix_getref(c0, i, 0); c1p = jas_matrix_getref(c1, i, 0); c2p = jas_matrix_getref(c2, i, 0); for (j = numcols; j > 0; --j) { y = *c0p; u = *c1p; v = *c2p; r = jpc_fix_add(y, jpc_fix_mul(jpc_dbltofix(1.402), v)); g = jpc_fix_add3(y, jpc_fix_mul(jpc_dbltofix(-0.34413), u), jpc_fix_mul(jpc_dbltofix(-0.71414), v)); b = jpc_fix_add(y, jpc_fix_mul(jpc_dbltofix(1.772), u)); *c0p++ = r; *c1p++ = g; *c2p++ = b; } } } jpc_fix_t jpc_mct_getsynweight(int mctid, int cmptno) { jpc_fix_t synweight; synweight = JPC_FIX_ONE; switch (mctid) { case JPC_MCT_RCT: switch (cmptno) { case 0: synweight = jpc_dbltofix(sqrt(3.0)); break; case 1: synweight = jpc_dbltofix(sqrt(0.6875)); break; case 2: synweight = jpc_dbltofix(sqrt(0.6875)); break; } break; case JPC_MCT_ICT: switch (cmptno) { case 0: synweight = jpc_dbltofix(sqrt(3.0000)); break; case 1: synweight = jpc_dbltofix(sqrt(3.2584)); break; case 2: synweight = jpc_dbltofix(sqrt(2.4755)); break; } break; #if 0 default: synweight = JPC_FIX_ONE; break; #endif } return synweight; } jasper-1.900.1/src/libjasper/jpc/jpc_dec.h0000644000175000017500000004272210554235553017230 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JPEG-2000 Decoder * * $Id$ */ #ifndef JPC_DEC_H #define JPC_DEC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_stream.h" #include "jpc_tsfb.h" #include "jpc_bs.h" #include "jpc_tagtree.h" #include "jpc_cs.h" #include "jpc_cod.h" #include "jpc_mqdec.h" #include "jpc_t2cod.h" /******************************************************************************\ * Below are some ugly warts necessary to support packed packet headers. \******************************************************************************/ /* PPM/PPT marker segment table entry. */ typedef struct { /* The index for this entry. */ uint_fast16_t ind; /* The data length. */ uint_fast32_t len; /* The data. */ uchar *data; } jpc_ppxstabent_t; /* PPM/PPT marker segment table. */ typedef struct { /* The number of entries. */ int numents; /* The maximum number of entries (i.e., the allocated size of the array below). */ int maxents; /* The table entries. */ jpc_ppxstabent_t **ents; } jpc_ppxstab_t; /* Stream list class. */ typedef struct { /* The number of streams in this list. */ int numstreams; /* The maximum number of streams that can be accomodated without growing the streams array. */ int maxstreams; /* The streams. */ jas_stream_t **streams; } jpc_streamlist_t; /******************************************************************************\ * Coding parameters class. \******************************************************************************/ /* Per-component coding parameters. */ typedef struct { /* How were various coding parameters set? */ int flags; /* Per-component coding style parameters (e.g., explicit precinct sizes) */ uint_fast8_t csty; /* The number of resolution levels. */ uint_fast8_t numrlvls; /* The code block width exponent. */ uint_fast8_t cblkwidthexpn; /* The code block height exponent. */ uint_fast8_t cblkheightexpn; /* The QMFB ID. */ uint_fast8_t qmfbid; /* The quantization style. */ uint_fast8_t qsty; /* The number of quantizer step sizes. */ uint_fast16_t numstepsizes; /* The step sizes. */ uint_fast16_t stepsizes[3 * JPC_MAXRLVLS + 1]; /* The number of guard bits. */ uint_fast8_t numguardbits; /* The ROI shift value. */ uint_fast8_t roishift; /* The code block parameters. */ uint_fast8_t cblkctx; /* The precinct width exponents. */ uint_fast8_t prcwidthexpns[JPC_MAXRLVLS]; /* The precinct height exponents. */ uint_fast8_t prcheightexpns[JPC_MAXRLVLS]; } jpc_dec_ccp_t; /* Coding paramters. */ typedef struct { /* How were these coding parameters set? */ int flags; /* Progression change list. */ jpc_pchglist_t *pchglist; /* Progression order. */ uint_fast8_t prgord; /* The number of layers. */ uint_fast16_t numlyrs; /* The MCT ID. */ uint_fast8_t mctid; /* The coding style parameters (e.g., SOP, EPH). */ uint_fast8_t csty; /* The number of components. */ int numcomps; /* The per-component coding parameters. */ jpc_dec_ccp_t *ccps; } jpc_dec_cp_t; /******************************************************************************\ * Decoder class. \******************************************************************************/ /* Decoder per-segment state information. */ typedef struct jpc_dec_seg_s { /* The next segment in the list. */ struct jpc_dec_seg_s *next; /* The previous segment in the list. */ struct jpc_dec_seg_s *prev; /* The starting pass number for this segment. */ int passno; /* The number of passes in this segment. */ int numpasses; /* The maximum number of passes in this segment. */ int maxpasses; /* The type of data in this segment (i.e., MQ or raw). */ int type; /* A stream containing the data for this segment. */ jas_stream_t *stream; /* The number of bytes destined for this segment from the packet currently being decoded. */ int cnt; /* A flag indicating if this segment has been terminated. */ int complete; /* The layer number to which this segment belongs. */ /* If the segment spans multiple layers, then the largest layer number spanned by the segment is used. */ int lyrno; } jpc_dec_seg_t; /* Decoder segment list. */ typedef struct { /* The first entry in the list. */ jpc_dec_seg_t *head; /* The last entry in the list. */ jpc_dec_seg_t *tail; } jpc_dec_seglist_t; /* Decoder per-code-block state information. */ typedef struct { /* The number of passes. */ int numpasses; /* A list of segments that still need to be decoded. */ jpc_dec_seglist_t segs; /* The first incomplete/partial segment. */ jpc_dec_seg_t *curseg; /* The number of leading insignificant bit planes for this code block. */ int numimsbs; /* The number of bits used to encode pass data lengths. */ int numlenbits; /* The first pass number containing data for this code block. */ int firstpassno; /* The MQ decoder. */ jpc_mqdec_t *mqdec; /* The raw bit stream decoder. */ jpc_bitstream_t *nulldec; /* The per-sample state information for this code block. */ jas_matrix_t *flags; /* The sample data associated with this code block. */ jas_matrix_t *data; } jpc_dec_cblk_t; /* Decoder per-code-block-group state information. */ typedef struct { /* The x-coordinate of the top-left corner of the precinct. */ uint_fast32_t xstart; /* The y-coordinate of the top-left corner of the precinct. */ uint_fast32_t ystart; /* The x-coordinate of the bottom-right corner of the precinct (plus one). */ uint_fast32_t xend; /* The y-coordinate of the bottom-right corner of the precinct (plus one). */ uint_fast32_t yend; /* The number of code blocks spanning this precinct in the horizontal direction. */ int numhcblks; /* The number of code blocks spanning this precinct in the vertical direction. */ int numvcblks; /* The total number of code blocks in this precinct. */ int numcblks; /* The per code block information. */ jpc_dec_cblk_t *cblks; /* The inclusion tag tree. */ jpc_tagtree_t *incltagtree; /* The insignificant MSBs tag tree. */ jpc_tagtree_t *numimsbstagtree; } jpc_dec_prc_t; /* Decoder per-band state information. */ typedef struct { /* The per-code-block-group state information. */ jpc_dec_prc_t *prcs; /* The sample data associated with this band. */ jas_matrix_t *data; /* The orientation of this band (i.e., LL, LH, HL, or HH). */ int orient; /* The encoded quantizer step size. */ int stepsize; /* The absolute quantizer step size. */ jpc_fix_t absstepsize; /* The number of bit planes for this band. */ int numbps; /* The analysis gain associated with this band. */ int analgain; /* The ROI shift value for this band. */ int roishift; } jpc_dec_band_t; /* Decoder per-resolution-level state information. */ typedef struct { /* The number of bands associated with this resolution level. */ int numbands; /* The per-band information. */ jpc_dec_band_t *bands; /* The x-coordinate of the top-left corner of the tile-component at this resolution. */ uint_fast32_t xstart; /* The y-coordinate of the top-left corner of the tile-component at this resolution. */ uint_fast32_t ystart; /* The x-coordinate of the bottom-right corner of the tile-component at this resolution (plus one). */ uint_fast32_t xend; /* The y-coordinate of the bottom-right corner of the tile-component at this resolution (plus one). */ uint_fast32_t yend; /* The exponent value for the nominal precinct width measured relative to the associated LL band. */ int prcwidthexpn; /* The exponent value for the nominal precinct height measured relative to the associated LL band. */ int prcheightexpn; /* The number of precincts in the horizontal direction. */ int numhprcs; /* The number of precincts in the vertical direction. */ int numvprcs; /* The total number of precincts. */ int numprcs; /* The exponent value for the nominal code block group width. This quantity is associated with the next lower resolution level (assuming that there is one). */ int cbgwidthexpn; /* The exponent value for the nominal code block group height This quantity is associated with the next lower resolution level (assuming that there is one). */ int cbgheightexpn; /* The exponent value for the code block width. */ uint_fast16_t cblkwidthexpn; /* The exponent value for the code block height. */ uint_fast16_t cblkheightexpn; } jpc_dec_rlvl_t; /* Decoder per-tile-component state information. */ typedef struct { /* The x-coordinate of the top-left corner of the tile-component in the coordinate system of the tile-component. */ uint_fast32_t xstart; /* The y-coordinate of the top-left corner of the tile-component in the coordinate system of the tile-component. */ uint_fast32_t ystart; /* The x-coordinate of the bottom-right corner of the tile-component in the coordinate system of the tile-component (plus one). */ uint_fast32_t xend; /* The y-coordinate of the bottom-right corner of the tile-component in the coordinate system of the tile-component (plus one). */ uint_fast32_t yend; /* The component data for the current tile. */ jas_matrix_t *data; /* The number of resolution levels. */ int numrlvls; /* The per resolution level information. */ jpc_dec_rlvl_t *rlvls; /* The TSFB. */ jpc_tsfb_t *tsfb; } jpc_dec_tcomp_t; /* * Tile states. */ #define JPC_TILE_INIT 0 #define JPC_TILE_ACTIVE 1 #define JPC_TILE_ACTIVELAST 2 #define JPC_TILE_DONE 3 /* Decoder per-tile state information. */ typedef struct { /* The processing state for this tile. */ int state; /* The x-coordinate of the top-left corner of the tile on the reference grid. */ uint_fast32_t xstart; /* The y-coordinate of the top-left corner of the tile on the reference grid. */ uint_fast32_t ystart; /* The x-coordinate of the bottom-right corner of the tile on the reference grid (plus one). */ uint_fast32_t xend; /* The y-coordinate of the bottom-right corner of the tile on the reference grid (plus one). */ uint_fast32_t yend; /* The packed packet header data for this tile. */ jpc_ppxstab_t *pptstab; /* A stream containing the packed packet header data for this tile. */ jas_stream_t *pkthdrstream; /* The current position within the packed packet header stream. */ long pkthdrstreampos; /* The coding parameters for this tile. */ jpc_dec_cp_t *cp; /* The per tile-component information. */ jpc_dec_tcomp_t *tcomps; /* The next expected tile-part number. */ int partno; /* The number of tile-parts. */ int numparts; /* The coding mode. */ int realmode; /* The packet iterator for this tile. */ jpc_pi_t *pi; } jpc_dec_tile_t; /* Decoder per-component state information. */ typedef struct { /* The horizontal sampling period. */ uint_fast32_t hstep; /* The vertical sampling period. */ uint_fast32_t vstep; /* The number of samples in the horizontal direction. */ uint_fast32_t width; /* The number of samples in the vertical direction. */ uint_fast32_t height; /* The precision of the sample data. */ uint_fast16_t prec; /* The signedness of the sample data. */ bool sgnd; /* The sample alignment horizontal offset. */ uint_fast32_t hsubstep; /* The sample alignment vertical offset. */ uint_fast32_t vsubstep; } jpc_dec_cmpt_t; /* Decoder state information. */ typedef struct { /* The decoded image. */ jas_image_t *image; /* The x-coordinate of the top-left corner of the image area on the reference grid. */ uint_fast32_t xstart; /* The y-coordinate of the top-left corner of the image area on the reference grid. */ uint_fast32_t ystart; /* The x-coordinate of the bottom-right corner of the image area on the reference grid (plus one). */ uint_fast32_t xend; /* The y-coordinate of the bottom-right corner of the image area on the reference grid (plus one). */ uint_fast32_t yend; /* The nominal tile width in units of the image reference grid. */ uint_fast32_t tilewidth; /* The nominal tile height in units of the image reference grid. */ uint_fast32_t tileheight; /* The horizontal offset from the origin of the reference grid to the left side of the first tile. */ uint_fast32_t tilexoff; /* The vertical offset from the origin of the reference grid to the top side of the first tile. */ uint_fast32_t tileyoff; /* The number of tiles spanning the image area in the vertical direction. */ int numhtiles; /* The number of tiles spanning the image area in the horizontal direction. */ int numvtiles; /* The total number of tiles. */ int numtiles; /* The per-tile information. */ jpc_dec_tile_t *tiles; /* The tile currently being processed. */ jpc_dec_tile_t *curtile; /* The number of components. */ int numcomps; /* The stream containing the input JPEG-2000 code stream data. */ jas_stream_t *in; /* The default coding parameters for all tiles. */ jpc_dec_cp_t *cp; /* The maximum number of layers that may be decoded. */ int maxlyrs; /* The maximum number of packets that may be decoded. */ int maxpkts; /* The number of packets decoded so far in the processing of the entire code stream. */ int numpkts; /* The next expected PPM marker segment sequence number. */ int ppmseqno; /* The current state for code stream processing. */ int state; /* The per-component information. */ jpc_dec_cmpt_t *cmpts; /* The information from PPM marker segments. */ jpc_ppxstab_t *ppmstab; /* A list of streams containing packet header data from PPM marker segments. */ jpc_streamlist_t *pkthdrstreams; /* The expected ending offset for a tile-part. */ long curtileendoff; /* This is required by the tier-2 decoder. */ jpc_cstate_t *cstate; } jpc_dec_t; /* Decoder options. */ typedef struct { /* The debug level for the decoder. */ int debug; /* The maximum number of layers to decode. */ int maxlyrs; /* The maximum number of packets to decode. */ int maxpkts; } jpc_dec_importopts_t; /******************************************************************************\ * Functions. \******************************************************************************/ /* Create a decoder segment object. */ jpc_dec_seg_t *jpc_seg_alloc(void); /* Destroy a decoder segment object. */ void jpc_seg_destroy(jpc_dec_seg_t *seg); /* Remove a segment from a segment list. */ void jpc_seglist_remove(jpc_dec_seglist_t *list, jpc_dec_seg_t *node); /* Insert a segment into a segment list. */ void jpc_seglist_insert(jpc_dec_seglist_t *list, jpc_dec_seg_t *ins, jpc_dec_seg_t *node); #endif jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.h0000644000175000017500000001104610554235553017415 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2004 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Quadrature Mirror-Image Filter Bank (QMFB) Routines * * $Id$ */ #ifndef JPC_QMFB_H #define JPC_QMFB_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_seq.h" /******************************************************************************\ * Constants. \******************************************************************************/ /* QMFB IDs. */ #define JPC_QMFB1D_FT 1 /* 5/3 */ #define JPC_QMFB1D_NS 2 /* 9/7 */ /******************************************************************************\ * Types. \******************************************************************************/ /******************************************************************************\ * Functions. \******************************************************************************/ #if !defined(JPC_QMFB_COLGRPSIZE) /* The number of columns to group together during the vertical processing stage of the wavelet transform. */ /* The default value for this parameter is probably not optimal for any particular platform. Hopefully, it is not too unreasonable, however. */ #define JPC_QMFB_COLGRPSIZE 16 #endif typedef struct { int (*analyze)(int *, int, int, int, int, int); int (*synthesize)(int *, int, int, int, int, int); double *lpenergywts; double *hpenergywts; } jpc_qmfb2d_t; extern jpc_qmfb2d_t jpc_ft_qmfb2d; extern jpc_qmfb2d_t jpc_ns_qmfb2d; #endif jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.h0000644000175000017500000000745210554235553017510 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 1 Encoder * * $Id$ */ #ifndef JPC_T1ENC_H #define JPC_T1ENC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_seq.h" #include "jpc_enc.h" #include "jpc_t1cod.h" /******************************************************************************\ * Functions. \******************************************************************************/ /* Encode all of the code blocks. */ int jpc_enc_enccblks(jpc_enc_t *enc); /* Encode a single code block. */ int jpc_enc_enccblk(jpc_enc_t *enc, jas_stream_t *out, jpc_enc_tcmpt_t *comp, jpc_enc_band_t *band, jpc_enc_cblk_t *cblk); #endif jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.h0000644000175000017500000001024010554235553017476 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 2 Encoder * * $Id$ */ #ifndef JPC_T2ENC_H #define JPC_T2ENC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jpc_enc.h" /******************************************************************************\ * Functions. \******************************************************************************/ /* Encode the packets for a tile. */ int jpc_enc_encpkts(jpc_enc_t *enc, jas_stream_t *out); /* Encode the specified packet. */ int jpc_enc_encpkt(jpc_enc_t *enc, jas_stream_t *out, int compno, int lvlno, int prcno, int lyrno); /* Save the tier-2 coding state. */ void jpc_save_t2state(jpc_enc_t *enc); /* Restore the tier-2 coding state. */ void jpc_restore_t2state(jpc_enc_t *enc); /* Initialize the tier-2 coding state. */ void jpc_init_t2state(jpc_enc_t *enc, int raflag); /* Create a packet iterator for the encoder. */ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile); #endif jasper-1.900.1/src/libjasper/jpc/jpc_enc.h0000644000175000017500000004075110554235553017242 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ #ifndef JPC_ENC_H #define JPC_ENC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_seq.h" #include "jpc_t2cod.h" #include "jpc_mqenc.h" #include "jpc_cod.h" #include "jpc_tagtree.h" #include "jpc_cs.h" #include "jpc_flt.h" #include "jpc_tsfb.h" /******************************************************************************\ * Constants. \******************************************************************************/ /* The number of bits used in various lookup tables. */ #define JPC_NUMEXTRABITS JPC_NMSEDEC_FRACBITS /* An invalid R-D slope value. */ #define JPC_BADRDSLOPE (-1) /******************************************************************************\ * Coding parameters types. \******************************************************************************/ /* Per-component coding paramters. */ typedef struct { /* The horizontal sampling period. */ uint_fast8_t sampgrdstepx; /* The vertical sampling period. */ uint_fast8_t sampgrdstepy; /* The sample alignment horizontal offset. */ uint_fast8_t sampgrdsubstepx; /* The sample alignment vertical offset. */ uint_fast8_t sampgrdsubstepy; /* The precision of the samples. */ uint_fast8_t prec; /* The signedness of the samples. */ bool sgnd; /* The number of step sizes. */ uint_fast16_t numstepsizes; /* The quantizer step sizes. */ uint_fast16_t stepsizes[JPC_MAXBANDS]; } jpc_enc_ccp_t; /* Per-tile coding parameters. */ typedef struct { /* The coding mode. */ bool intmode; /* The coding style (i.e., SOP, EPH). */ uint_fast8_t csty; /* The progression order. */ uint_fast8_t prg; /* The multicomponent transform. */ uint_fast8_t mctid; /* The number of layers. */ uint_fast16_t numlyrs; /* The normalized bit rates associated with the various intermediate layers. */ jpc_fix_t *ilyrrates; } jpc_enc_tcp_t; /* Per tile-component coding parameters. */ typedef struct { /* The coding style (i.e., explicit precinct sizes). */ uint_fast8_t csty; /* The maximum number of resolution levels allowed. */ uint_fast8_t maxrlvls; /* The exponent for the nominal code block width. */ uint_fast16_t cblkwidthexpn; /* The exponent for the nominal code block height. */ uint_fast16_t cblkheightexpn; /* The code block style parameters (e.g., lazy, terminate all, segmentation symbols, causal, reset probability models). */ uint_fast8_t cblksty; /* The QMFB. */ uint_fast8_t qmfbid; /* The precinct width values. */ uint_fast16_t prcwidthexpns[JPC_MAXRLVLS]; /* The precinct height values. */ uint_fast16_t prcheightexpns[JPC_MAXRLVLS]; /* The number of guard bits. */ uint_fast8_t numgbits; } jpc_enc_tccp_t; /* Coding parameters. */ typedef struct { /* The debug level. */ int debug; /* The horizontal offset from the origin of the reference grid to the left edge of the image area. */ uint_fast32_t imgareatlx; /* The vertical offset from the origin of the reference grid to the top edge of the image area. */ uint_fast32_t imgareatly; /* The horizontal offset from the origin of the reference grid to the right edge of the image area (plus one). */ uint_fast32_t refgrdwidth; /* The vertical offset from the origin of the reference grid to the bottom edge of the image area (plus one). */ uint_fast32_t refgrdheight; /* The horizontal offset from the origin of the tile grid to the origin of the reference grid. */ uint_fast32_t tilegrdoffx; /* The vertical offset from the origin of the tile grid to the origin of the reference grid. */ uint_fast32_t tilegrdoffy; /* The nominal tile width in units of the image reference grid. */ uint_fast32_t tilewidth; /* The nominal tile height in units of the image reference grid. */ uint_fast32_t tileheight; /* The number of tiles spanning the image area in the horizontal direction. */ uint_fast32_t numhtiles; /* The number of tiles spanning the image area in the vertical direction. */ uint_fast32_t numvtiles; /* The number of tiles. */ uint_fast32_t numtiles; /* The number of components. */ uint_fast16_t numcmpts; /* The per-component coding parameters. */ jpc_enc_ccp_t *ccps; /* The per-tile coding parameters. */ jpc_enc_tcp_t tcp; /* The per-tile-component coding parameters. */ jpc_enc_tccp_t tccp; /* The target code stream length in bytes. */ uint_fast32_t totalsize; /* The raw (i.e., uncompressed) size of the image in bytes. */ uint_fast32_t rawsize; } jpc_enc_cp_t; /******************************************************************************\ * Encoder class. \******************************************************************************/ /* Encoder per-coding-pass state information. */ typedef struct { /* The starting offset for this pass. */ int start; /* The ending offset for this pass. */ int end; /* The type of data in this pass (i.e., MQ or raw). */ int type; /* Flag indicating that this pass is terminated. */ int term; /* The entropy coder state after coding this pass. */ jpc_mqencstate_t mqencstate; /* The layer to which this pass has been assigned. */ int lyrno; /* The R-D slope for this pass. */ jpc_flt_t rdslope; /* The weighted MSE reduction associated with this pass. */ jpc_flt_t wmsedec; /* The cumulative weighted MSE reduction. */ jpc_flt_t cumwmsedec; /* The normalized MSE reduction. */ long nmsedec; } jpc_enc_pass_t; /* Encoder per-code-block state information. */ typedef struct { /* The number of passes. */ int numpasses; /* The per-pass information. */ jpc_enc_pass_t *passes; /* The number of passes encoded so far. */ int numencpasses; /* The number of insignificant MSBs. */ int numimsbs; /* The number of bits used to encode pass data lengths. */ int numlenbits; /* The byte stream for this code block. */ jas_stream_t *stream; /* The entropy encoder. */ jpc_mqenc_t *mqenc; /* The data for this code block. */ jas_matrix_t *data; /* The state for this code block. */ jas_matrix_t *flags; /* The number of bit planes required for this code block. */ int numbps; /* The next pass to be encoded. */ jpc_enc_pass_t *curpass; /* The per-code-block-group state information. */ struct jpc_enc_prc_s *prc; /* The saved current pass. */ /* This is used by the rate control code. */ jpc_enc_pass_t *savedcurpass; /* The saved length indicator size. */ /* This is used by the rate control code. */ int savednumlenbits; /* The saved number of encoded passes. */ /* This is used by the rate control code. */ int savednumencpasses; } jpc_enc_cblk_t; /* Encoder per-code-block-group state information. */ typedef struct jpc_enc_prc_s { /* The x-coordinate of the top-left corner of the precinct. */ uint_fast32_t tlx; /* The y-coordinate of the top-left corner of the precinct. */ uint_fast32_t tly; /* The x-coordinate of the bottom-right corner of the precinct (plus one). */ uint_fast32_t brx; /* The y-coordinate of the bottom-right corner of the precinct (plus one). */ uint_fast32_t bry; /* The number of code blocks spanning the precinct in the horizontal direction. */ int numhcblks; /* The number of code blocks spanning the precinct in the vertical direction. */ int numvcblks; /* The total number of code blocks. */ int numcblks; /* The per-code-block information. */ jpc_enc_cblk_t *cblks; /* The inclusion tag tree. */ jpc_tagtree_t *incltree; /* The insignifcant MSBs tag tree. */ jpc_tagtree_t *nlibtree; /* The per-band information. */ struct jpc_enc_band_s *band; /* The saved inclusion tag tree. */ /* This is used by rate control. */ jpc_tagtree_t *savincltree; /* The saved leading-insignificant-bit-planes tag tree. */ /* This is used by rate control. */ jpc_tagtree_t *savnlibtree; } jpc_enc_prc_t; /* Encoder per-band state information. */ typedef struct jpc_enc_band_s { /* The per precinct information. */ jpc_enc_prc_t *prcs; /* The coefficient data for this band. */ jas_matrix_t *data; /* The orientation of this band (i.e., LL, LH, HL, or HH). */ int orient; /* The number of bit planes associated with this band. */ int numbps; /* The quantizer step size. */ jpc_fix_t absstepsize; /* The encoded quantizer step size. */ int stepsize; /* The L2 norm of the synthesis basis functions associated with this band. (The MCT is not considered in this value.) */ jpc_fix_t synweight; /* The analysis gain for this band. */ int analgain; /* The per-resolution-level information. */ struct jpc_enc_rlvl_s *rlvl; } jpc_enc_band_t; /* Encoder per-resolution-level state information. */ typedef struct jpc_enc_rlvl_s { /* The x-coordinate of the top-left corner of the tile-component at this resolution. */ uint_fast32_t tlx; /* The y-coordinate of the top-left corner of the tile-component at this resolution. */ uint_fast32_t tly; /* The x-coordinate of the bottom-right corner of the tile-component at this resolution (plus one). */ uint_fast32_t brx; /* The y-coordinate of the bottom-right corner of the tile-component at this resolution (plus one). */ uint_fast32_t bry; /* The exponent value for the nominal precinct width measured relative to the associated LL band. */ int prcwidthexpn; /* The exponent value for the nominal precinct height measured relative to the associated LL band. */ int prcheightexpn; /* The number of precincts spanning the resolution level in the horizontal direction. */ int numhprcs; /* The number of precincts spanning the resolution level in the vertical direction. */ int numvprcs; /* The total number of precincts. */ int numprcs; /* The exponent value for the nominal code block group width. This quantity is associated with the next lower resolution level (assuming that there is one). */ int cbgwidthexpn; /* The exponent value for the nominal code block group height. This quantity is associated with the next lower resolution level (assuming that there is one). */ int cbgheightexpn; /* The exponent value for the code block width. */ uint_fast16_t cblkwidthexpn; /* The exponent value for the code block height. */ uint_fast16_t cblkheightexpn; /* The number of bands associated with this resolution level. */ int numbands; /* The per-band information. */ jpc_enc_band_t *bands; /* The parent tile-component. */ struct jpc_enc_tcmpt_s *tcmpt; } jpc_enc_rlvl_t; /* Encoder per-tile-component state information. */ typedef struct jpc_enc_tcmpt_s { /* The number of resolution levels. */ int numrlvls; /* The per-resolution-level information. */ jpc_enc_rlvl_t *rlvls; /* The tile-component data. */ jas_matrix_t *data; /* The QMFB. */ int qmfbid; /* The number of bands. */ int numbands; /* The TSFB. */ jpc_tsfb_t *tsfb; /* The synthesis energy weight (for the MCT). */ jpc_fix_t synweight; /* The precinct width exponents. */ int prcwidthexpns[JPC_MAXRLVLS]; /* The precinct height exponents. */ int prcheightexpns[JPC_MAXRLVLS]; /* The code block width exponent. */ int cblkwidthexpn; /* The code block height exponent. */ int cblkheightexpn; /* Coding style (i.e., explicit precinct sizes). */ int csty; /* Code block style. */ int cblksty; /* The number of quantizer step sizes. */ int numstepsizes; /* The encoded quantizer step sizes. */ uint_fast16_t stepsizes[JPC_MAXBANDS]; /* The parent tile. */ struct jpc_enc_tile_s *tile; } jpc_enc_tcmpt_t; /* Encoder per-tile state information. */ typedef struct jpc_enc_tile_s { /* The tile number. */ uint_fast32_t tileno; /* The x-coordinate of the top-left corner of the tile measured with respect to the reference grid. */ uint_fast32_t tlx; /* The y-coordinate of the top-left corner of the tile measured with respect to the reference grid. */ uint_fast32_t tly; /* The x-coordinate of the bottom-right corner of the tile measured with respect to the reference grid (plus one). */ uint_fast32_t brx; /* The y-coordinate of the bottom-right corner of the tile measured with respect to the reference grid (plus one). */ uint_fast32_t bry; /* The coding style. */ uint_fast8_t csty; /* The progression order. */ uint_fast8_t prg; /* The number of layers. */ int numlyrs; /* The MCT to employ (if any). */ uint_fast8_t mctid; /* The packet iterator (used to determine the order of packet generation). */ jpc_pi_t *pi; /* The coding mode (i.e., integer or real). */ bool intmode; /* The number of bytes to allocate to the various layers. */ uint_fast32_t *lyrsizes; /* The number of tile-components. */ int numtcmpts; /* The per tile-component information. */ jpc_enc_tcmpt_t *tcmpts; /* The raw (i.e., uncompressed) size of this tile. */ uint_fast32_t rawsize; } jpc_enc_tile_t; /* Encoder class. */ typedef struct jpc_enc_s { /* The image being encoded. */ jas_image_t *image; /* The output stream. */ jas_stream_t *out; /* The coding parameters. */ jpc_enc_cp_t *cp; /* The tile currently being processed. */ jpc_enc_tile_t *curtile; /* The code stream state. */ jpc_cstate_t *cstate; /* The number of bytes output so far. */ uint_fast32_t len; /* The number of bytes available for the main body of the code stream. */ /* This is used for rate allocation purposes. */ uint_fast32_t mainbodysize; /* The marker segment currently being processed. */ /* This member is a convenience for making cleanup easier. */ jpc_ms_t *mrk; /* The stream used to temporarily hold tile-part data. */ jas_stream_t *tmpstream; } jpc_enc_t; #endif jasper-1.900.1/src/libjasper/jpc/jpc_bs.h0000644000175000017500000002067310554235553017102 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Bit Stream Class * * $Id$ */ #ifndef JPC_BS_H #define JPC_BS_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_types.h" #include "jasper/jas_stream.h" /******************************************************************************\ * Constants. \******************************************************************************/ /* * Bit stream open mode flags. */ /* Bit stream open for reading. */ #define JPC_BITSTREAM_READ 0x01 /* Bit stream open for writing. */ #define JPC_BITSTREAM_WRITE 0x02 /* * Bit stream flags. */ /* Do not close underlying character stream. */ #define JPC_BITSTREAM_NOCLOSE 0x01 /* End of file has been reached while reading. */ #define JPC_BITSTREAM_EOF 0x02 /* An I/O error has occured. */ #define JPC_BITSTREAM_ERR 0x04 /******************************************************************************\ * Types. \******************************************************************************/ /* Bit stream class. */ typedef struct { /* Some miscellaneous flags. */ int flags_; /* The input/output buffer. */ uint_fast16_t buf_; /* The number of bits remaining in the byte being read/written. */ int cnt_; /* The underlying stream associated with this bit stream. */ jas_stream_t *stream_; /* The mode in which this bit stream was opened. */ int openmode_; } jpc_bitstream_t; /******************************************************************************\ * Functions/macros for opening and closing bit streams.. \******************************************************************************/ /* Open a stream as a bit stream. */ jpc_bitstream_t *jpc_bitstream_sopen(jas_stream_t *stream, char *mode); /* Close a bit stream. */ int jpc_bitstream_close(jpc_bitstream_t *bitstream); /******************************************************************************\ * Functions/macros for reading from and writing to bit streams.. \******************************************************************************/ /* Read a bit from a bit stream. */ #if defined(DEBUG) #define jpc_bitstream_getbit(bitstream) \ jpc_bitstream_getbit_func(bitstream) #else #define jpc_bitstream_getbit(bitstream) \ jpc_bitstream_getbit_macro(bitstream) #endif /* Write a bit to a bit stream. */ #if defined(DEBUG) #define jpc_bitstream_putbit(bitstream, v) \ jpc_bitstream_putbit_func(bitstream, v) #else #define jpc_bitstream_putbit(bitstream, v) \ jpc_bitstream_putbit_macro(bitstream, v) #endif /* Read one or more bits from a bit stream. */ long jpc_bitstream_getbits(jpc_bitstream_t *bitstream, int n); /* Write one or more bits to a bit stream. */ int jpc_bitstream_putbits(jpc_bitstream_t *bitstream, int n, long v); /******************************************************************************\ * Functions/macros for flushing and aligning bit streams. \******************************************************************************/ /* Align the current position within the bit stream to the next byte boundary. */ int jpc_bitstream_align(jpc_bitstream_t *bitstream); /* Align the current position in the bit stream with the next byte boundary, ensuring that certain bits consumed in the process match a particular pattern. */ int jpc_bitstream_inalign(jpc_bitstream_t *bitstream, int fillmask, int filldata); /* Align the current position in the bit stream with the next byte boundary, writing bits from the specified pattern (if necessary) in the process. */ int jpc_bitstream_outalign(jpc_bitstream_t *bitstream, int filldata); /* Check if a bit stream needs alignment. */ int jpc_bitstream_needalign(jpc_bitstream_t *bitstream); /* How many additional bytes would be output if the bit stream was aligned? */ int jpc_bitstream_pending(jpc_bitstream_t *bitstream); /******************************************************************************\ * Functions/macros for querying state information for bit streams. \******************************************************************************/ /* Has EOF been encountered on a bit stream? */ #define jpc_bitstream_eof(bitstream) \ ((bitstream)->flags_ & JPC_BITSTREAM_EOF) /******************************************************************************\ * Internals. \******************************************************************************/ /* DO NOT DIRECTLY INVOKE ANY OF THE MACROS OR FUNCTIONS BELOW. THEY ARE FOR INTERNAL USE ONLY. */ int jpc_bitstream_getbit_func(jpc_bitstream_t *bitstream); int jpc_bitstream_putbit_func(jpc_bitstream_t *bitstream, int v); int jpc_bitstream_fillbuf(jpc_bitstream_t *bitstream); #define jpc_bitstream_getbit_macro(bitstream) \ (assert((bitstream)->openmode_ & JPC_BITSTREAM_READ), \ (--(bitstream)->cnt_ >= 0) ? \ ((int)(((bitstream)->buf_ >> (bitstream)->cnt_) & 1)) : \ jpc_bitstream_fillbuf(bitstream)) #define jpc_bitstream_putbit_macro(bitstream, bit) \ (assert((bitstream)->openmode_ & JPC_BITSTREAM_WRITE), \ (--(bitstream)->cnt_ < 0) ? \ ((bitstream)->buf_ = ((bitstream)->buf_ << 8) & 0xffff, \ (bitstream)->cnt_ = ((bitstream)->buf_ == 0xff00) ? 6 : 7, \ (bitstream)->buf_ |= ((bit) & 1) << (bitstream)->cnt_, \ (jas_stream_putc((bitstream)->stream_, (bitstream)->buf_ >> 8) == EOF) \ ? (EOF) : ((bit) & 1)) : \ ((bitstream)->buf_ |= ((bit) & 1) << (bitstream)->cnt_, \ (bit) & 1)) #endif jasper-1.900.1/src/libjasper/jpc/jpc_mqdec.h0000644000175000017500000002106110554235553017557 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * MQ Arithmetic Decoder * * $Id$ */ #ifndef JPC_MQDEC_H #define JPC_MQDEC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" #include "jasper/jas_stream.h" #include "jpc_mqcod.h" /******************************************************************************\ * Types. \******************************************************************************/ /* MQ arithmetic decoder. */ typedef struct { /* The C register. */ uint_fast32_t creg; /* The A register. */ uint_fast32_t areg; /* The CT register. */ uint_fast32_t ctreg; /* The current context. */ jpc_mqstate_t **curctx; /* The per-context information. */ jpc_mqstate_t **ctxs; /* The maximum number of contexts. */ int maxctxs; /* The stream from which to read data. */ jas_stream_t *in; /* The last character read. */ uchar inbuffer; /* The EOF indicator. */ int eof; } jpc_mqdec_t; /******************************************************************************\ * Functions/macros for construction and destruction. \******************************************************************************/ /* Create a MQ decoder. */ jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in); /* Destroy a MQ decoder. */ void jpc_mqdec_destroy(jpc_mqdec_t *dec); /******************************************************************************\ * Functions/macros for initialization. \******************************************************************************/ /* Set the input stream associated with a MQ decoder. */ void jpc_mqdec_setinput(jpc_mqdec_t *dec, jas_stream_t *in); /* Initialize a MQ decoder. */ void jpc_mqdec_init(jpc_mqdec_t *dec); /******************************************************************************\ * Functions/macros for manipulating contexts. \******************************************************************************/ /* Set the current context for a MQ decoder. */ #define jpc_mqdec_setcurctx(dec, ctxno) \ ((mqdec)->curctx = &(mqdec)->ctxs[ctxno]); /* Set the state information for a particular context of a MQ decoder. */ void jpc_mqdec_setctx(jpc_mqdec_t *dec, int ctxno, jpc_mqctx_t *ctx); /* Set the state information for all contexts of a MQ decoder. */ void jpc_mqdec_setctxs(jpc_mqdec_t *dec, int numctxs, jpc_mqctx_t *ctxs); /******************************************************************************\ * Functions/macros for decoding bits. \******************************************************************************/ /* Decode a symbol. */ #if !defined(DEBUG) #define jpc_mqdec_getbit(dec) \ jpc_mqdec_getbit_macro(dec) #else #define jpc_mqdec_getbit(dec) \ jpc_mqdec_getbit_func(dec) #endif /* Decode a symbol (assuming an unskewed probability distribution). */ #if !defined(DEBUG) #define jpc_mqdec_getbitnoskew(dec) \ jpc_mqdec_getbit_macro(dec) #else #define jpc_mqdec_getbitnoskew(dec) \ jpc_mqdec_getbit_func(dec) #endif /******************************************************************************\ * Functions/macros for debugging. \******************************************************************************/ /* Dump the MQ decoder state for debugging. */ void jpc_mqdec_dump(jpc_mqdec_t *dec, FILE *out); /******************************************************************************\ * EVERYTHING BELOW THIS POINT IS IMPLEMENTATION SPECIFIC AND NOT PART OF THE * APPLICATION INTERFACE. DO NOT RELY ON ANY OF THE INTERNAL FUNCTIONS/MACROS * GIVEN BELOW. \******************************************************************************/ #define jpc_mqdec_getbit_macro(dec) \ ((((dec)->areg -= (*(dec)->curctx)->qeval), \ (dec)->creg >> 16 >= (*(dec)->curctx)->qeval) ? \ ((((dec)->creg -= (*(dec)->curctx)->qeval << 16), \ (dec)->areg & 0x8000) ? (*(dec)->curctx)->mps : \ jpc_mqdec_mpsexchrenormd(dec)) : \ jpc_mqdec_lpsexchrenormd(dec)) #define jpc_mqdec_mpsexchange(areg, delta, curctx, bit) \ { \ if ((areg) < (delta)) { \ register jpc_mqstate_t *state = *(curctx); \ /* LPS decoded. */ \ (bit) = state->mps ^ 1; \ *(curctx) = state->nlps; \ } else { \ register jpc_mqstate_t *state = *(curctx); \ /* MPS decoded. */ \ (bit) = state->mps; \ *(curctx) = state->nmps; \ } \ } #define jpc_mqdec_lpsexchange(areg, delta, curctx, bit) \ { \ if ((areg) >= (delta)) { \ register jpc_mqstate_t *state = *(curctx); \ (areg) = (delta); \ (bit) = state->mps ^ 1; \ *(curctx) = state->nlps; \ } else { \ register jpc_mqstate_t *state = *(curctx); \ (areg) = (delta); \ (bit) = state->mps; \ *(curctx) = state->nmps; \ } \ } #define jpc_mqdec_renormd(areg, creg, ctreg, in, eof, inbuf) \ { \ do { \ if (!(ctreg)) { \ jpc_mqdec_bytein2(creg, ctreg, in, eof, inbuf); \ } \ (areg) <<= 1; \ (creg) <<= 1; \ --(ctreg); \ } while (!((areg) & 0x8000)); \ } #define jpc_mqdec_bytein2(creg, ctreg, in, eof, inbuf) \ { \ int c; \ unsigned char prevbuf; \ if (!(eof)) { \ if ((c = jas_stream_getc(in)) == EOF) { \ (eof) = 1; \ c = 0xff; \ } \ prevbuf = (inbuf); \ (inbuf) = c; \ if (prevbuf == 0xff) { \ if (c > 0x8f) { \ (creg) += 0xff00; \ (ctreg) = 8; \ } else { \ (creg) += c << 9; \ (ctreg) = 7; \ } \ } else { \ (creg) += c << 8; \ (ctreg) = 8; \ } \ } else { \ (creg) += 0xff00; \ (ctreg) = 8; \ } \ } int jpc_mqdec_getbit_func(jpc_mqdec_t *dec); int jpc_mqdec_mpsexchrenormd(jpc_mqdec_t *dec); int jpc_mqdec_lpsexchrenormd(jpc_mqdec_t *dec); #endif jasper-1.900.1/src/libjasper/jpc/jpc_mct.h0000644000175000017500000001056010554235553017253 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Multicomponent Transform Code * * $Id$ */ #ifndef JPC_MCT_H #define JPC_MCT_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_seq.h" #include "jasper/jas_fix.h" /******************************************************************************\ * Constants. \******************************************************************************/ /* * Multicomponent transform IDs. */ #define JPC_MCT_NONE 0 #define JPC_MCT_ICT 1 #define JPC_MCT_RCT 2 /******************************************************************************\ * Functions. \******************************************************************************/ /* Calculate the forward RCT. */ void jpc_rct(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2); /* Calculate the inverse RCT. */ void jpc_irct(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2); /* Calculate the forward ICT. */ void jpc_ict(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2); /* Calculate the inverse ICT. */ void jpc_iict(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2); /* Get the synthesis weight associated with a particular component. */ jpc_fix_t jpc_mct_getsynweight(int mctid, int cmptno); #endif jasper-1.900.1/src/libjasper/jpc/jpc_cod.h0000644000175000017500000000657210554235553017245 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ #ifndef JPC_COD_H #define JPC_COD_H /******************************************************************************\ * Constants. \******************************************************************************/ /* The nominal word size used by this implementation. */ #define JPC_PREC 32 #endif jasper-1.900.1/src/libjasper/jpc/jpc_t1dec.c0000644000175000017500000006165610554235553017477 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 1 Decoder * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_fix.h" #include "jasper/jas_stream.h" #include "jasper/jas_math.h" #include "jpc_bs.h" #include "jpc_mqdec.h" #include "jpc_t1dec.h" #include "jpc_t1cod.h" #include "jpc_dec.h" /******************************************************************************\ * \******************************************************************************/ static int jpc_dec_decodecblk(jpc_dec_t *dec, jpc_dec_tile_t *tile, jpc_dec_tcomp_t *tcomp, jpc_dec_band_t *band, jpc_dec_cblk_t *cblk, int dopartial, int maxlyrs); static int dec_sigpass(jpc_dec_t *dec, jpc_mqdec_t *mqdec, int bitpos, int orient, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data); static int dec_rawsigpass(jpc_dec_t *dec, jpc_bitstream_t *in, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data); static int dec_refpass(jpc_dec_t *dec, jpc_mqdec_t *mqdec, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data); static int dec_rawrefpass(jpc_dec_t *dec, jpc_bitstream_t *in, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data); static int dec_clnpass(jpc_dec_t *dec, jpc_mqdec_t *mqdec, int bitpos, int orient, int vcausalflag, int segsymflag, jas_matrix_t *flags, jas_matrix_t *data); #if defined(DEBUG) static long t1dec_cnt = 0; #endif #if !defined(DEBUG) #define JPC_T1D_GETBIT(mqdec, v, passtypename, symtypename) \ ((v) = jpc_mqdec_getbit(mqdec)) #else #define JPC_T1D_GETBIT(mqdec, v, passtypename, symtypename) \ { \ (v) = jpc_mqdec_getbit(mqdec); \ if (jas_getdbglevel() >= 100) { \ jas_eprintf("index = %ld; passtype = %s; symtype = %s; sym = %d\n", t1dec_cnt, passtypename, symtypename, v); \ ++t1dec_cnt; \ } \ } #endif #define JPC_T1D_GETBITNOSKEW(mqdec, v, passtypename, symtypename) \ JPC_T1D_GETBIT(mqdec, v, passtypename, symtypename) #if !defined(DEBUG) #define JPC_T1D_RAWGETBIT(bitstream, v, passtypename, symtypename) \ ((v) = jpc_bitstream_getbit(bitstream)) #else #define JPC_T1D_RAWGETBIT(bitstream, v, passtypename, symtypename) \ { \ (v) = jpc_bitstream_getbit(bitstream); \ if (jas_getdbglevel() >= 100) { \ jas_eprintf("index = %ld; passtype = %s; symtype = %s; sym = %d\n", t1dec_cnt, passtypename, symtypename, v); \ ++t1dec_cnt; \ } \ } #endif /******************************************************************************\ * Code. \******************************************************************************/ int jpc_dec_decodecblks(jpc_dec_t *dec, jpc_dec_tile_t *tile) { jpc_dec_tcomp_t *tcomp; int compcnt; jpc_dec_rlvl_t *rlvl; int rlvlcnt; jpc_dec_band_t *band; int bandcnt; jpc_dec_prc_t *prc; int prccnt; jpc_dec_cblk_t *cblk; int cblkcnt; for (compcnt = dec->numcomps, tcomp = tile->tcomps; compcnt > 0; --compcnt, ++tcomp) { for (rlvlcnt = tcomp->numrlvls, rlvl = tcomp->rlvls; rlvlcnt > 0; --rlvlcnt, ++rlvl) { if (!rlvl->bands) { continue; } for (bandcnt = rlvl->numbands, band = rlvl->bands; bandcnt > 0; --bandcnt, ++band) { if (!band->data) { continue; } for (prccnt = rlvl->numprcs, prc = band->prcs; prccnt > 0; --prccnt, ++prc) { if (!prc->cblks) { continue; } for (cblkcnt = prc->numcblks, cblk = prc->cblks; cblkcnt > 0; --cblkcnt, ++cblk) { if (jpc_dec_decodecblk(dec, tile, tcomp, band, cblk, 1, JPC_MAXLYRS)) { return -1; } } } } } } return 0; } static int jpc_dec_decodecblk(jpc_dec_t *dec, jpc_dec_tile_t *tile, jpc_dec_tcomp_t *tcomp, jpc_dec_band_t *band, jpc_dec_cblk_t *cblk, int dopartial, int maxlyrs) { jpc_dec_seg_t *seg; int i; int bpno; int passtype; int ret; int compno; int filldata; int fillmask; jpc_dec_ccp_t *ccp; compno = tcomp - tile->tcomps; if (!cblk->flags) { /* Note: matrix is assumed to be zeroed */ if (!(cblk->flags = jas_matrix_create(jas_matrix_numrows(cblk->data) + 2, jas_matrix_numcols(cblk->data) + 2))) { return -1; } } seg = cblk->segs.head; while (seg && (seg != cblk->curseg || dopartial) && (maxlyrs < 0 || seg->lyrno < maxlyrs)) { assert(seg->numpasses >= seg->maxpasses || dopartial); assert(seg->stream); jas_stream_rewind(seg->stream); jas_stream_setrwcount(seg->stream, 0); if (seg->type == JPC_SEG_MQ) { if (!cblk->mqdec) { if (!(cblk->mqdec = jpc_mqdec_create(JPC_NUMCTXS, 0))) { return -1; } jpc_mqdec_setctxs(cblk->mqdec, JPC_NUMCTXS, jpc_mqctxs); } jpc_mqdec_setinput(cblk->mqdec, seg->stream); jpc_mqdec_init(cblk->mqdec); } else { assert(seg->type == JPC_SEG_RAW); if (!cblk->nulldec) { if (!(cblk->nulldec = jpc_bitstream_sopen(seg->stream, "r"))) { assert(0); } } } for (i = 0; i < seg->numpasses; ++i) { if (cblk->numimsbs > band->numbps) { ccp = &tile->cp->ccps[compno]; if (ccp->roishift <= 0) { jas_eprintf("warning: corrupt code stream\n"); } else { if (cblk->numimsbs < ccp->roishift - band->numbps) { jas_eprintf("warning: corrupt code stream\n"); } } } bpno = band->roishift + band->numbps - 1 - (cblk->numimsbs + (seg->passno + i - cblk->firstpassno + 2) / 3); if (bpno < 0) { goto premature_exit; } #if 1 passtype = (seg->passno + i + 2) % 3; #else passtype = JPC_PASSTYPE(seg->passno + i + 2); #endif assert(bpno >= 0 && bpno < 31); switch (passtype) { case JPC_SIGPASS: ret = (seg->type == JPC_SEG_MQ) ? dec_sigpass(dec, cblk->mqdec, bpno, band->orient, (tile->cp->ccps[compno].cblkctx & JPC_COX_VSC) != 0, cblk->flags, cblk->data) : dec_rawsigpass(dec, cblk->nulldec, bpno, (tile->cp->ccps[compno].cblkctx & JPC_COX_VSC) != 0, cblk->flags, cblk->data); break; case JPC_REFPASS: ret = (seg->type == JPC_SEG_MQ) ? dec_refpass(dec, cblk->mqdec, bpno, (tile->cp->ccps[compno].cblkctx & JPC_COX_VSC) != 0, cblk->flags, cblk->data) : dec_rawrefpass(dec, cblk->nulldec, bpno, (tile->cp->ccps[compno].cblkctx & JPC_COX_VSC) != 0, cblk->flags, cblk->data); break; case JPC_CLNPASS: assert(seg->type == JPC_SEG_MQ); ret = dec_clnpass(dec, cblk->mqdec, bpno, band->orient, (tile->cp->ccps[compno].cblkctx & JPC_COX_VSC) != 0, (tile->cp->ccps[compno].cblkctx & JPC_COX_SEGSYM) != 0, cblk->flags, cblk->data); break; default: ret = -1; break; } /* Do we need to reset after each coding pass? */ if (tile->cp->ccps[compno].cblkctx & JPC_COX_RESET) { jpc_mqdec_setctxs(cblk->mqdec, JPC_NUMCTXS, jpc_mqctxs); } if (ret) { jas_eprintf("coding pass failed passtype=%d segtype=%d\n", passtype, seg->type); return -1; } } if (seg->type == JPC_SEG_MQ) { /* Note: dont destroy mq decoder because context info will be lost */ } else { assert(seg->type == JPC_SEG_RAW); if (tile->cp->ccps[compno].cblkctx & JPC_COX_PTERM) { fillmask = 0x7f; filldata = 0x2a; } else { fillmask = 0; filldata = 0; } if ((ret = jpc_bitstream_inalign(cblk->nulldec, fillmask, filldata)) < 0) { return -1; } else if (ret > 0) { jas_eprintf("warning: bad termination pattern detected\n"); } jpc_bitstream_close(cblk->nulldec); cblk->nulldec = 0; } cblk->curseg = seg->next; jpc_seglist_remove(&cblk->segs, seg); jpc_seg_destroy(seg); seg = cblk->curseg; } assert(dopartial ? (!cblk->curseg) : 1); premature_exit: return 0; } /******************************************************************************\ * Code for significance pass. \******************************************************************************/ #define jpc_sigpass_step(fp, frowstep, dp, bitpos, oneplushalf, orient, mqdec, vcausalflag) \ { \ int f; \ int v; \ f = *(fp); \ if ((f & JPC_OTHSIGMSK) && !(f & (JPC_SIG | JPC_VISIT))) { \ jpc_mqdec_setcurctx((mqdec), JPC_GETZCCTXNO(f, (orient))); \ JPC_T1D_GETBIT((mqdec), v, "SIG", "ZC"); \ if (v) { \ jpc_mqdec_setcurctx((mqdec), JPC_GETSCCTXNO(f)); \ JPC_T1D_GETBIT((mqdec), v, "SIG", "SC"); \ v ^= JPC_GETSPB(f); \ JPC_UPDATEFLAGS4((fp), (frowstep), v, (vcausalflag)); \ *(fp) |= JPC_SIG; \ *(dp) = (v) ? (-(oneplushalf)) : (oneplushalf); \ } \ *(fp) |= JPC_VISIT; \ } \ } static int dec_sigpass(jpc_dec_t *dec, register jpc_mqdec_t *mqdec, int bitpos, int orient, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data) { int i; int j; int one; int half; int oneplushalf; int vscanlen; int width; int height; jpc_fix_t *fp; int frowstep; int fstripestep; jpc_fix_t *fstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dp; int drowstep; int dstripestep; jpc_fix_t *dstripestart; jpc_fix_t *dvscanstart; int k; /* Avoid compiler warning about unused parameters. */ dec = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << bitpos; half = one >> 1; oneplushalf = one | half; fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; /* Process first sample in vertical scan. */ jpc_sigpass_step(fp, frowstep, dp, bitpos, oneplushalf, orient, mqdec, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process second sample in vertical scan. */ jpc_sigpass_step(fp, frowstep, dp, bitpos, oneplushalf, orient, mqdec, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process third sample in vertical scan. */ jpc_sigpass_step(fp, frowstep, dp, bitpos, oneplushalf, orient, mqdec, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process fourth sample in vertical scan. */ jpc_sigpass_step(fp, frowstep, dp, bitpos, oneplushalf, orient, mqdec, 0); } } return 0; } #define jpc_rawsigpass_step(fp, frowstep, dp, oneplushalf, in, vcausalflag) \ { \ jpc_fix_t f = *(fp); \ jpc_fix_t v; \ if ((f & JPC_OTHSIGMSK) && !(f & (JPC_SIG | JPC_VISIT))) { \ JPC_T1D_RAWGETBIT(in, v, "SIG", "ZC"); \ if (v < 0) { \ return -1; \ } \ if (v) { \ JPC_T1D_RAWGETBIT(in, v, "SIG", "SC"); \ if (v < 0) { \ return -1; \ } \ JPC_UPDATEFLAGS4((fp), (frowstep), v, (vcausalflag)); \ *(fp) |= JPC_SIG; \ *(dp) = v ? (-oneplushalf) : (oneplushalf); \ } \ *(fp) |= JPC_VISIT; \ } \ } static int dec_rawsigpass(jpc_dec_t *dec, jpc_bitstream_t *in, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data) { int i; int j; int k; int one; int half; int oneplushalf; int vscanlen; int width; int height; jpc_fix_t *fp; int frowstep; int fstripestep; jpc_fix_t *fstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dp; int drowstep; int dstripestep; jpc_fix_t *dstripestart; jpc_fix_t *dvscanstart; /* Avoid compiler warning about unused parameters. */ dec = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << bitpos; half = one >> 1; oneplushalf = one | half; fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; /* Process first sample in vertical scan. */ jpc_rawsigpass_step(fp, frowstep, dp, oneplushalf, in, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process second sample in vertical scan. */ jpc_rawsigpass_step(fp, frowstep, dp, oneplushalf, in, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process third sample in vertical scan. */ jpc_rawsigpass_step(fp, frowstep, dp, oneplushalf, in, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process fourth sample in vertical scan. */ jpc_rawsigpass_step(fp, frowstep, dp, oneplushalf, in, 0); } } return 0; } /******************************************************************************\ * Code for refinement pass. \******************************************************************************/ #define jpc_refpass_step(fp, dp, poshalf, neghalf, mqdec, vcausalflag) \ { \ int v; \ int t; \ if (((*(fp)) & (JPC_SIG | JPC_VISIT)) == JPC_SIG) { \ jpc_mqdec_setcurctx((mqdec), JPC_GETMAGCTXNO(*(fp))); \ JPC_T1D_GETBITNOSKEW((mqdec), v, "REF", "MR"); \ t = (v ? (poshalf) : (neghalf)); \ *(dp) += (*(dp) < 0) ? (-t) : t; \ *(fp) |= JPC_REFINE; \ } \ } static int dec_refpass(jpc_dec_t *dec, register jpc_mqdec_t *mqdec, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data) { int i; int j; int vscanlen; int width; int height; int one; int poshalf; int neghalf; jpc_fix_t *fp; int frowstep; int fstripestep; jpc_fix_t *fstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dp; int drowstep; int dstripestep; jpc_fix_t *dstripestart; jpc_fix_t *dvscanstart; int k; /* Avoid compiler warning about unused parameters. */ dec = 0; vcausalflag = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << bitpos; poshalf = one >> 1; neghalf = (bitpos > 0) ? (-poshalf) : (-1); fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; /* Process first sample in vertical scan. */ jpc_refpass_step(fp, dp, poshalf, neghalf, mqdec, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process second sample in vertical scan. */ jpc_refpass_step(fp, dp, poshalf, neghalf, mqdec, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process third sample in vertical scan. */ jpc_refpass_step(fp, dp, poshalf, neghalf, mqdec, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process fourth sample in vertical scan. */ jpc_refpass_step(fp, dp, poshalf, neghalf, mqdec, 0); } } return 0; } #define jpc_rawrefpass_step(fp, dp, poshalf, neghalf, in, vcausalflag) \ { \ jpc_fix_t v; \ jpc_fix_t t; \ if (((*(fp)) & (JPC_SIG | JPC_VISIT)) == JPC_SIG) { \ JPC_T1D_RAWGETBIT(in, v, "REF", "MAGREF"); \ if (v < 0) { \ return -1; \ } \ t = (v ? poshalf : neghalf); \ *(dp) += (*(dp) < 0) ? (-t) : t; \ *(fp) |= JPC_REFINE; \ } \ } static int dec_rawrefpass(jpc_dec_t *dec, jpc_bitstream_t *in, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data) { int i; int j; int k; int vscanlen; int width; int height; int one; int poshalf; int neghalf; jpc_fix_t *fp; int frowstep; int fstripestep; jpc_fix_t *fstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dp; int drowstep; int dstripestep; jpc_fix_t *dstripestart; jpc_fix_t *dvscanstart; /* Avoid compiler warning about unused parameters. */ dec = 0; vcausalflag = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << bitpos; poshalf = one >> 1; neghalf = (bitpos > 0) ? (-poshalf) : (-1); fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; /* Process first sample in vertical scan. */ jpc_rawrefpass_step(fp, dp, poshalf, neghalf, in, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process second sample in vertical scan. */ jpc_rawrefpass_step(fp, dp, poshalf, neghalf, in, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process third sample in vertical scan. */ jpc_rawrefpass_step(fp, dp, poshalf, neghalf, in, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process fourth sample in vertical scan. */ jpc_rawrefpass_step(fp, dp, poshalf, neghalf, in, 0); } } return 0; } /******************************************************************************\ * Code for cleanup pass. \******************************************************************************/ #define jpc_clnpass_step(f, fp, frowstep, dp, oneplushalf, orient, mqdec, flabel, plabel, vcausalflag) \ { \ int v; \ flabel \ if (!((f) & (JPC_SIG | JPC_VISIT))) { \ jpc_mqdec_setcurctx((mqdec), JPC_GETZCCTXNO((f), (orient))); \ JPC_T1D_GETBIT((mqdec), v, "CLN", "ZC"); \ if (v) { \ plabel \ /* Coefficient is significant. */ \ jpc_mqdec_setcurctx((mqdec), JPC_GETSCCTXNO(f)); \ JPC_T1D_GETBIT((mqdec), v, "CLN", "SC"); \ v ^= JPC_GETSPB(f); \ *(dp) = (v) ? (-(oneplushalf)) : (oneplushalf); \ JPC_UPDATEFLAGS4((fp), (frowstep), v, (vcausalflag)); \ *(fp) |= JPC_SIG; \ } \ } \ /* XXX - Is this correct? Can aggregation cause some VISIT bits not to be reset? Check. */ \ *(fp) &= ~JPC_VISIT; \ } static int dec_clnpass(jpc_dec_t *dec, register jpc_mqdec_t *mqdec, int bitpos, int orient, int vcausalflag, int segsymflag, jas_matrix_t *flags, jas_matrix_t *data) { int i; int j; int k; int vscanlen; int v; int half; int runlen; int f; int width; int height; int one; int oneplushalf; jpc_fix_t *fp; int frowstep; int fstripestep; jpc_fix_t *fstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dp; int drowstep; int dstripestep; jpc_fix_t *dstripestart; jpc_fix_t *dvscanstart; /* Avoid compiler warning about unused parameters. */ dec = 0; one = 1 << bitpos; half = one >> 1; oneplushalf = one | half; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = 0; i < height; i += 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(4, height - i); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; if (vscanlen >= 4 && (!((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK))) && (fp += frowstep, !((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK))) && (fp += frowstep, !((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK))) && (fp += frowstep, !((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK)))) { jpc_mqdec_setcurctx(mqdec, JPC_AGGCTXNO); JPC_T1D_GETBIT(mqdec, v, "CLN", "AGG"); if (!v) { continue; } jpc_mqdec_setcurctx(mqdec, JPC_UCTXNO); JPC_T1D_GETBITNOSKEW(mqdec, v, "CLN", "RL"); runlen = v; JPC_T1D_GETBITNOSKEW(mqdec, v, "CLN", "RL"); runlen = (runlen << 1) | v; f = *(fp = fvscanstart + frowstep * runlen); dp = dvscanstart + drowstep * runlen; k = vscanlen - runlen; switch (runlen) { case 0: goto clnpass_partial0; break; case 1: goto clnpass_partial1; break; case 2: goto clnpass_partial2; break; case 3: goto clnpass_partial3; break; } } else { f = *(fp = fvscanstart); dp = dvscanstart; k = vscanlen; goto clnpass_full0; } /* Process first sample in vertical scan. */ jpc_clnpass_step(f, fp, frowstep, dp, oneplushalf, orient, mqdec, clnpass_full0:, clnpass_partial0:, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process second sample in vertical scan. */ f = *fp; jpc_clnpass_step(f, fp, frowstep, dp, oneplushalf, orient, mqdec, ;, clnpass_partial1:, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process third sample in vertical scan. */ f = *fp; jpc_clnpass_step(f, fp, frowstep, dp, oneplushalf, orient, mqdec, ;, clnpass_partial2:, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; /* Process fourth sample in vertical scan. */ f = *fp; jpc_clnpass_step(f, fp, frowstep, dp, oneplushalf, orient, mqdec, ;, clnpass_partial3:, 0); } } if (segsymflag) { int segsymval; segsymval = 0; jpc_mqdec_setcurctx(mqdec, JPC_UCTXNO); JPC_T1D_GETBITNOSKEW(mqdec, v, "CLN", "SEGSYM"); segsymval = (segsymval << 1) | (v & 1); JPC_T1D_GETBITNOSKEW(mqdec, v, "CLN", "SEGSYM"); segsymval = (segsymval << 1) | (v & 1); JPC_T1D_GETBITNOSKEW(mqdec, v, "CLN", "SEGSYM"); segsymval = (segsymval << 1) | (v & 1); JPC_T1D_GETBITNOSKEW(mqdec, v, "CLN", "SEGSYM"); segsymval = (segsymval << 1) | (v & 1); if (segsymval != 0xa) { jas_eprintf("warning: bad segmentation symbol\n"); } } return 0; } jasper-1.900.1/src/libjasper/jpc/jpc_t2dec.c0000644000175000017500000003671610554235553017477 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 2 Decoder * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_types.h" #include "jasper/jas_fix.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jasper/jas_stream.h" #include "jasper/jas_debug.h" #include "jpc_bs.h" #include "jpc_dec.h" #include "jpc_cs.h" #include "jpc_mqdec.h" #include "jpc_t2dec.h" #include "jpc_t1cod.h" #include "jpc_math.h" /******************************************************************************\ * \******************************************************************************/ long jpc_dec_lookahead(jas_stream_t *in); static int jpc_getcommacode(jpc_bitstream_t *in); static int jpc_getnumnewpasses(jpc_bitstream_t *in); static int jpc_dec_decodepkt(jpc_dec_t *dec, jas_stream_t *pkthdrstream, jas_stream_t *in, int compno, int lvlno, int prcno, int lyrno); /******************************************************************************\ * Code. \******************************************************************************/ static int jpc_getcommacode(jpc_bitstream_t *in) { int n; int v; n = 0; for (;;) { if ((v = jpc_bitstream_getbit(in)) < 0) { return -1; } if (jpc_bitstream_eof(in)) { return -1; } if (!v) { break; } ++n; } return n; } static int jpc_getnumnewpasses(jpc_bitstream_t *in) { int n; if ((n = jpc_bitstream_getbit(in)) > 0) { if ((n = jpc_bitstream_getbit(in)) > 0) { if ((n = jpc_bitstream_getbits(in, 2)) == 3) { if ((n = jpc_bitstream_getbits(in, 5)) == 31) { if ((n = jpc_bitstream_getbits(in, 7)) >= 0) { n += 36 + 1; } } else if (n >= 0) { n += 5 + 1; } } else if (n >= 0) { n += 2 + 1; } } else if (!n) { n += 2; } } else if (!n) { ++n; } return n; } static int jpc_dec_decodepkt(jpc_dec_t *dec, jas_stream_t *pkthdrstream, jas_stream_t *in, int compno, int rlvlno, int prcno, int lyrno) { jpc_bitstream_t *inb; jpc_dec_tcomp_t *tcomp; jpc_dec_rlvl_t *rlvl; jpc_dec_band_t *band; jpc_dec_cblk_t *cblk; int n; int m; int i; jpc_tagtreenode_t *leaf; int included; int ret; int numnewpasses; jpc_dec_seg_t *seg; int len; int present; int savenumnewpasses; int mycounter; jpc_ms_t *ms; jpc_dec_tile_t *tile; jpc_dec_ccp_t *ccp; jpc_dec_cp_t *cp; int bandno; jpc_dec_prc_t *prc; int usedcblkcnt; int cblkno; uint_fast32_t bodylen; bool discard; int passno; int maxpasses; int hdrlen; int hdroffstart; int hdroffend; /* Avoid compiler warning about possible use of uninitialized variable. */ bodylen = 0; discard = (lyrno >= dec->maxlyrs); tile = dec->curtile; cp = tile->cp; ccp = &cp->ccps[compno]; /* * Decode the packet header. */ /* Decode the SOP marker segment if present. */ if (cp->csty & JPC_COD_SOP) { if (jpc_dec_lookahead(in) == JPC_MS_SOP) { if (!(ms = jpc_getms(in, dec->cstate))) { return -1; } if (jpc_ms_gettype(ms) != JPC_MS_SOP) { jpc_ms_destroy(ms); jas_eprintf("missing SOP marker segment\n"); return -1; } jpc_ms_destroy(ms); } } hdroffstart = jas_stream_getrwcount(pkthdrstream); if (!(inb = jpc_bitstream_sopen(pkthdrstream, "r"))) { return -1; } if ((present = jpc_bitstream_getbit(inb)) < 0) { return 1; } JAS_DBGLOG(10, ("\n", present)); JAS_DBGLOG(10, ("present=%d ", present)); /* Is the packet non-empty? */ if (present) { /* The packet is non-empty. */ tcomp = &tile->tcomps[compno]; rlvl = &tcomp->rlvls[rlvlno]; bodylen = 0; for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { if (!band->data) { continue; } prc = &band->prcs[prcno]; if (!prc->cblks) { continue; } usedcblkcnt = 0; for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { ++usedcblkcnt; if (!cblk->numpasses) { leaf = jpc_tagtree_getleaf(prc->incltagtree, usedcblkcnt - 1); if ((included = jpc_tagtree_decode(prc->incltagtree, leaf, lyrno + 1, inb)) < 0) { return -1; } } else { if ((included = jpc_bitstream_getbit(inb)) < 0) { return -1; } } JAS_DBGLOG(10, ("\n")); JAS_DBGLOG(10, ("included=%d ", included)); if (!included) { continue; } if (!cblk->numpasses) { i = 1; leaf = jpc_tagtree_getleaf(prc->numimsbstagtree, usedcblkcnt - 1); for (;;) { if ((ret = jpc_tagtree_decode(prc->numimsbstagtree, leaf, i, inb)) < 0) { return -1; } if (ret) { break; } ++i; } cblk->numimsbs = i - 1; cblk->firstpassno = cblk->numimsbs * 3; } if ((numnewpasses = jpc_getnumnewpasses(inb)) < 0) { return -1; } JAS_DBGLOG(10, ("numnewpasses=%d ", numnewpasses)); seg = cblk->curseg; savenumnewpasses = numnewpasses; mycounter = 0; if (numnewpasses > 0) { if ((m = jpc_getcommacode(inb)) < 0) { return -1; } cblk->numlenbits += m; JAS_DBGLOG(10, ("increment=%d ", m)); while (numnewpasses > 0) { passno = cblk->firstpassno + cblk->numpasses + mycounter; /* XXX - the maxpasses is not set precisely but this doesn't matter... */ maxpasses = JPC_SEGPASSCNT(passno, cblk->firstpassno, 10000, (ccp->cblkctx & JPC_COX_LAZY) != 0, (ccp->cblkctx & JPC_COX_TERMALL) != 0); if (!discard && !seg) { if (!(seg = jpc_seg_alloc())) { return -1; } jpc_seglist_insert(&cblk->segs, cblk->segs.tail, seg); if (!cblk->curseg) { cblk->curseg = seg; } seg->passno = passno; seg->type = JPC_SEGTYPE(seg->passno, cblk->firstpassno, (ccp->cblkctx & JPC_COX_LAZY) != 0); seg->maxpasses = maxpasses; } n = JAS_MIN(numnewpasses, maxpasses); mycounter += n; numnewpasses -= n; if ((len = jpc_bitstream_getbits(inb, cblk->numlenbits + jpc_floorlog2(n))) < 0) { return -1; } JAS_DBGLOG(10, ("len=%d ", len)); if (!discard) { seg->lyrno = lyrno; seg->numpasses += n; seg->cnt = len; seg = seg->next; } bodylen += len; } } cblk->numpasses += savenumnewpasses; } } jpc_bitstream_inalign(inb, 0, 0); } else { if (jpc_bitstream_inalign(inb, 0x7f, 0)) { jas_eprintf("alignment failed\n"); return -1; } } jpc_bitstream_close(inb); hdroffend = jas_stream_getrwcount(pkthdrstream); hdrlen = hdroffend - hdroffstart; if (jas_getdbglevel() >= 5) { jas_eprintf("hdrlen=%lu bodylen=%lu \n", (unsigned long) hdrlen, (unsigned long) bodylen); } if (cp->csty & JPC_COD_EPH) { if (jpc_dec_lookahead(pkthdrstream) == JPC_MS_EPH) { if (!(ms = jpc_getms(pkthdrstream, dec->cstate))) { jas_eprintf("cannot get (EPH) marker segment\n"); return -1; } if (jpc_ms_gettype(ms) != JPC_MS_EPH) { jpc_ms_destroy(ms); jas_eprintf("missing EPH marker segment\n"); return -1; } jpc_ms_destroy(ms); } } /* decode the packet body. */ if (jas_getdbglevel() >= 1) { jas_eprintf("packet body offset=%06ld\n", (long) jas_stream_getrwcount(in)); } if (!discard) { tcomp = &tile->tcomps[compno]; rlvl = &tcomp->rlvls[rlvlno]; for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { if (!band->data) { continue; } prc = &band->prcs[prcno]; if (!prc->cblks) { continue; } for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { seg = cblk->curseg; while (seg) { if (!seg->stream) { if (!(seg->stream = jas_stream_memopen(0, 0))) { return -1; } } #if 0 jas_eprintf("lyrno=%02d, compno=%02d, lvlno=%02d, prcno=%02d, bandno=%02d, cblkno=%02d, passno=%02d numpasses=%02d cnt=%d numbps=%d, numimsbs=%d\n", lyrno, compno, rlvlno, prcno, band - rlvl->bands, cblk - prc->cblks, seg->passno, seg->numpasses, seg->cnt, band->numbps, cblk->numimsbs); #endif if (seg->cnt > 0) { if (jpc_getdata(in, seg->stream, seg->cnt) < 0) { return -1; } seg->cnt = 0; } if (seg->numpasses >= seg->maxpasses) { cblk->curseg = seg->next; } seg = seg->next; } } } } else { if (jas_stream_gobble(in, bodylen) != JAS_CAST(int, bodylen)) { return -1; } } return 0; } /********************************************************************************************/ /********************************************************************************************/ int jpc_dec_decodepkts(jpc_dec_t *dec, jas_stream_t *pkthdrstream, jas_stream_t *in) { jpc_dec_tile_t *tile; jpc_pi_t *pi; int ret; tile = dec->curtile; pi = tile->pi; for (;;) { if (!tile->pkthdrstream || jas_stream_peekc(tile->pkthdrstream) == EOF) { switch (jpc_dec_lookahead(in)) { case JPC_MS_EOC: case JPC_MS_SOT: return 0; break; case JPC_MS_SOP: case JPC_MS_EPH: case 0: break; default: return -1; break; } } if ((ret = jpc_pi_next(pi))) { return ret; } if (dec->maxpkts >= 0 && dec->numpkts >= dec->maxpkts) { jas_eprintf("warning: stopping decode prematurely as requested\n"); return 0; } if (jas_getdbglevel() >= 1) { jas_eprintf("packet offset=%08ld prg=%d cmptno=%02d " "rlvlno=%02d prcno=%03d lyrno=%02d\n", (long) jas_stream_getrwcount(in), jpc_pi_prg(pi), jpc_pi_cmptno(pi), jpc_pi_rlvlno(pi), jpc_pi_prcno(pi), jpc_pi_lyrno(pi)); } if (jpc_dec_decodepkt(dec, pkthdrstream, in, jpc_pi_cmptno(pi), jpc_pi_rlvlno(pi), jpc_pi_prcno(pi), jpc_pi_lyrno(pi))) { return -1; } ++dec->numpkts; } return 0; } jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile) { jpc_pi_t *pi; int compno; jpc_picomp_t *picomp; jpc_pirlvl_t *pirlvl; jpc_dec_tcomp_t *tcomp; int rlvlno; jpc_dec_rlvl_t *rlvl; int prcno; int *prclyrno; jpc_dec_cmpt_t *cmpt; if (!(pi = jpc_pi_create0())) { return 0; } pi->numcomps = dec->numcomps; if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) { jpc_pi_destroy(pi); return 0; } for (compno = 0, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++picomp) { picomp->pirlvls = 0; } for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++tcomp, ++picomp) { picomp->numrlvls = tcomp->numrlvls; if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls * sizeof(jpc_pirlvl_t)))) { jpc_pi_destroy(pi); return 0; } for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl) { pirlvl->prclyrnos = 0; } for (rlvlno = 0, pirlvl = picomp->pirlvls, rlvl = tcomp->rlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) { /* XXX sizeof(long) should be sizeof different type */ pirlvl->numprcs = rlvl->numprcs; if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs * sizeof(long)))) { jpc_pi_destroy(pi); return 0; } } } pi->maxrlvls = 0; for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps, cmpt = dec->cmpts; compno < pi->numcomps; ++compno, ++tcomp, ++picomp, ++cmpt) { picomp->hsamp = cmpt->hstep; picomp->vsamp = cmpt->vstep; for (rlvlno = 0, pirlvl = picomp->pirlvls, rlvl = tcomp->rlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) { pirlvl->prcwidthexpn = rlvl->prcwidthexpn; pirlvl->prcheightexpn = rlvl->prcheightexpn; for (prcno = 0, prclyrno = pirlvl->prclyrnos; prcno < pirlvl->numprcs; ++prcno, ++prclyrno) { *prclyrno = 0; } pirlvl->numhprcs = rlvl->numhprcs; } if (pi->maxrlvls < tcomp->numrlvls) { pi->maxrlvls = tcomp->numrlvls; } } pi->numlyrs = tile->cp->numlyrs; pi->xstart = tile->xstart; pi->ystart = tile->ystart; pi->xend = tile->xend; pi->yend = tile->yend; pi->picomp = 0; pi->pirlvl = 0; pi->x = 0; pi->y = 0; pi->compno = 0; pi->rlvlno = 0; pi->prcno = 0; pi->lyrno = 0; pi->xstep = 0; pi->ystep = 0; pi->pchgno = -1; pi->defaultpchg.prgord = tile->cp->prgord; pi->defaultpchg.compnostart = 0; pi->defaultpchg.compnoend = pi->numcomps; pi->defaultpchg.rlvlnostart = 0; pi->defaultpchg.rlvlnoend = pi->maxrlvls; pi->defaultpchg.lyrnoend = pi->numlyrs; pi->pchg = 0; pi->valid = 0; return pi; } long jpc_dec_lookahead(jas_stream_t *in) { uint_fast16_t x; if (jpc_getuint16(in, &x)) { return -1; } if (jas_stream_ungetc(in, x & 0xff) == EOF || jas_stream_ungetc(in, x >> 8) == EOF) { return -1; } if (x >= JPC_MS_INMIN && x <= JPC_MS_INMAX) { return x; } return 0; } jasper-1.900.1/src/libjasper/jpc/jpc_util.h0000644000175000017500000000662210554235553017451 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JPC_UTIL_H #define JPC_UTIL_H /* Parse a comma separated list of real numbers into an array of doubles. */ int jpc_atoaf(char *s, int *numvalues, double **values); /* Upsample a sequence. */ jas_seq_t *jpc_seq_upsample(jas_seq_t *seq, int n); /* Convolve two sequences. */ jas_seq_t *jpc_seq_conv(jas_seq_t *seq0, jas_seq_t *seq1); /* Compute the norm of a sequence. */ jpc_fix_t jpc_seq_norm(jas_seq_t *x); #endif jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.h0000644000175000017500000002156510554235553017512 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier-2 Coding Library * * $Id$ */ #ifndef JPC_T2COD_H #define JPC_T2COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jpc_cs.h" /******************************************************************************\ * Types. \******************************************************************************/ /* Progression change list. */ typedef struct { /* The number of progression changes. */ int numpchgs; /* The maximum number of progression changes that can be accomodated without growing the progression change array. */ int maxpchgs; /* The progression changes. */ jpc_pchg_t **pchgs; } jpc_pchglist_t; /* Packet iterator per-resolution-level information. */ typedef struct { /* The number of precincts. */ int numprcs; /* The last layer processed for each precinct. */ int *prclyrnos; /* The precinct width exponent. */ int prcwidthexpn; /* The precinct height exponent. */ int prcheightexpn; /* The number of precincts spanning the resolution level in the horizontal direction. */ int numhprcs; } jpc_pirlvl_t; /* Packet iterator per-component information. */ typedef struct { /* The number of resolution levels. */ int numrlvls; /* The per-resolution-level information. */ jpc_pirlvl_t *pirlvls; /* The horizontal sampling period. */ int hsamp; /* The vertical sampling period. */ int vsamp; } jpc_picomp_t; /* Packet iterator class. */ typedef struct { /* The number of layers. */ int numlyrs; /* The number of resolution levels. */ int maxrlvls; /* The number of components. */ int numcomps; /* The per-component information. */ jpc_picomp_t *picomps; /* The current component. */ jpc_picomp_t *picomp; /* The current resolution level. */ jpc_pirlvl_t *pirlvl; /* The number of the current component. */ int compno; /* The number of the current resolution level. */ int rlvlno; /* The number of the current precinct. */ int prcno; /* The number of the current layer. */ int lyrno; /* The x-coordinate of the current position. */ int x; /* The y-coordinate of the current position. */ int y; /* The horizontal step size. */ int xstep; /* The vertical step size. */ int ystep; /* The x-coordinate of the top-left corner of the tile on the reference grid. */ int xstart; /* The y-coordinate of the top-left corner of the tile on the reference grid. */ int ystart; /* The x-coordinate of the bottom-right corner of the tile on the reference grid (plus one). */ int xend; /* The y-coordinate of the bottom-right corner of the tile on the reference grid (plus one). */ int yend; /* The current progression change. */ jpc_pchg_t *pchg; /* The progression change list. */ jpc_pchglist_t *pchglist; /* The progression to use in the absense of explicit specification. */ jpc_pchg_t defaultpchg; /* The current progression change number. */ int pchgno; /* Is this the first time in the current progression volume? */ bool prgvolfirst; /* Is the current iterator value valid? */ bool valid; /* The current packet number. */ int pktno; } jpc_pi_t; /******************************************************************************\ * Functions/macros for packet iterators. \******************************************************************************/ /* Create a packet iterator. */ jpc_pi_t *jpc_pi_create0(void); /* Destroy a packet iterator. */ void jpc_pi_destroy(jpc_pi_t *pi); /* Add a progression change to a packet iterator. */ int jpc_pi_addpchg(jpc_pi_t *pi, jpc_pocpchg_t *pchg); /* Prepare a packet iterator for iteration. */ int jpc_pi_init(jpc_pi_t *pi); /* Set the iterator to the first packet. */ int jpc_pi_begin(jpc_pi_t *pi); /* Proceed to the next packet in sequence. */ int jpc_pi_next(jpc_pi_t *pi); /* Get the index of the current packet. */ #define jpc_pi_getind(pi) ((pi)->pktno) /* Get the component number of the current packet. */ #define jpc_pi_cmptno(pi) (assert(pi->valid), (pi)->compno) /* Get the resolution level of the current packet. */ #define jpc_pi_rlvlno(pi) (assert(pi->valid), (pi)->rlvlno) /* Get the layer number of the current packet. */ #define jpc_pi_lyrno(pi) (assert(pi->valid), (pi)->lyrno) /* Get the precinct number of the current packet. */ #define jpc_pi_prcno(pi) (assert(pi->valid), (pi)->prcno) /* Get the progression order for the current packet. */ #define jpc_pi_prg(pi) (assert(pi->valid), (pi)->pchg->prgord) /******************************************************************************\ * Functions/macros for progression change lists. \******************************************************************************/ /* Create a progression change list. */ jpc_pchglist_t *jpc_pchglist_create(void); /* Destroy a progression change list. */ void jpc_pchglist_destroy(jpc_pchglist_t *pchglist); /* Insert a new element into a progression change list. */ int jpc_pchglist_insert(jpc_pchglist_t *pchglist, int pchgno, jpc_pchg_t *pchg); /* Remove an element from a progression change list. */ jpc_pchg_t *jpc_pchglist_remove(jpc_pchglist_t *pchglist, int pchgno); /* Get an element from a progression change list. */ jpc_pchg_t *jpc_pchglist_get(jpc_pchglist_t *pchglist, int pchgno); /* Copy a progression change list. */ jpc_pchglist_t *jpc_pchglist_copy(jpc_pchglist_t *pchglist); /* Get the number of elements in a progression change list. */ int jpc_pchglist_numpchgs(jpc_pchglist_t *pchglist); /******************************************************************************\ * Functions/macros for progression changes. \******************************************************************************/ /* Destroy a progression change. */ void jpc_pchg_destroy(jpc_pchg_t *pchg); /* Copy a progression change. */ jpc_pchg_t *jpc_pchg_copy(jpc_pchg_t *pchg); #endif jasper-1.900.1/src/libjasper/jpc/jpc_t1cod.h0000644000175000017500000002510510554235553017503 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ #ifndef JPC_T1COD_H #define JPC_T1COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_fix.h" #include "jasper/jas_math.h" #include "jpc_mqcod.h" #include "jpc_tsfb.h" /******************************************************************************\ * Constants. \******************************************************************************/ /* The number of bits used to index into various lookup tables. */ #define JPC_NMSEDEC_BITS 7 #define JPC_NMSEDEC_FRACBITS (JPC_NMSEDEC_BITS - 1) /* * Segment types. */ /* Invalid. */ #define JPC_SEG_INVALID 0 /* MQ. */ #define JPC_SEG_MQ 1 /* Raw. */ #define JPC_SEG_RAW 2 /* The nominal word size. */ #define JPC_PREC 32 /* Tier-1 coding pass types. */ #define JPC_SIGPASS 0 /* significance */ #define JPC_REFPASS 1 /* refinement */ #define JPC_CLNPASS 2 /* cleanup */ /* * Per-sample state information for tier-1 coding. */ /* The northeast neighbour has been found to be significant. */ #define JPC_NESIG 0x0001 /* The southeast neighbour has been found to be significant. */ #define JPC_SESIG 0x0002 /* The southwest neighbour has been found to be significant. */ #define JPC_SWSIG 0x0004 /* The northwest neighbour has been found to be significant. */ #define JPC_NWSIG 0x0008 /* The north neighbour has been found to be significant. */ #define JPC_NSIG 0x0010 /* The east neighbour has been found to be significant. */ #define JPC_ESIG 0x0020 /* The south neighbour has been found to be significant. */ #define JPC_SSIG 0x0040 /* The west neighbour has been found to be significant. */ #define JPC_WSIG 0x0080 /* The significance mask for 8-connected neighbours. */ #define JPC_OTHSIGMSK \ (JPC_NSIG | JPC_NESIG | JPC_ESIG | JPC_SESIG | JPC_SSIG | JPC_SWSIG | JPC_WSIG | JPC_NWSIG) /* The significance mask for 4-connected neighbours. */ #define JPC_PRIMSIGMSK (JPC_NSIG | JPC_ESIG | JPC_SSIG | JPC_WSIG) /* The north neighbour is negative in value. */ #define JPC_NSGN 0x0100 /* The east neighbour is negative in value. */ #define JPC_ESGN 0x0200 /* The south neighbour is negative in value. */ #define JPC_SSGN 0x0400 /* The west neighbour is negative in value. */ #define JPC_WSGN 0x0800 /* The sign mask for 4-connected neighbours. */ #define JPC_SGNMSK (JPC_NSGN | JPC_ESGN | JPC_SSGN | JPC_WSGN) /* This sample has been found to be significant. */ #define JPC_SIG 0x1000 /* The sample has been refined. */ #define JPC_REFINE 0x2000 /* This sample has been processed during the significance pass. */ #define JPC_VISIT 0x4000 /* The number of aggregation contexts. */ #define JPC_NUMAGGCTXS 1 /* The number of zero coding contexts. */ #define JPC_NUMZCCTXS 9 /* The number of magnitude contexts. */ #define JPC_NUMMAGCTXS 3 /* The number of sign coding contexts. */ #define JPC_NUMSCCTXS 5 /* The number of uniform contexts. */ #define JPC_NUMUCTXS 1 /* The context ID for the first aggregation context. */ #define JPC_AGGCTXNO 0 /* The context ID for the first zero coding context. */ #define JPC_ZCCTXNO (JPC_AGGCTXNO + JPC_NUMAGGCTXS) /* The context ID for the first magnitude context. */ #define JPC_MAGCTXNO (JPC_ZCCTXNO + JPC_NUMZCCTXS) /* The context ID for the first sign coding context. */ #define JPC_SCCTXNO (JPC_MAGCTXNO + JPC_NUMMAGCTXS) /* The context ID for the first uniform context. */ #define JPC_UCTXNO (JPC_SCCTXNO + JPC_NUMSCCTXS) /* The total number of contexts. */ #define JPC_NUMCTXS (JPC_UCTXNO + JPC_NUMUCTXS) /******************************************************************************\ * External data. \******************************************************************************/ /* These lookup tables are used by various macros/functions. */ /* Do not access these lookup tables directly. */ extern int jpc_zcctxnolut[]; extern int jpc_spblut[]; extern int jpc_scctxnolut[]; extern int jpc_magctxnolut[]; extern jpc_fix_t jpc_refnmsedec[]; extern jpc_fix_t jpc_signmsedec[]; extern jpc_fix_t jpc_refnmsedec0[]; extern jpc_fix_t jpc_signmsedec0[]; /* The initial settings for the MQ contexts. */ extern jpc_mqctx_t jpc_mqctxs[]; /******************************************************************************\ * Functions and macros. \******************************************************************************/ /* Initialize the MQ contexts. */ void jpc_initctxs(jpc_mqctx_t *ctxs); /* Get the zero coding context. */ int jpc_getzcctxno(int f, int orient); #define JPC_GETZCCTXNO(f, orient) \ (jpc_zcctxnolut[((orient) << 8) | ((f) & JPC_OTHSIGMSK)]) /* Get the sign prediction bit. */ int jpc_getspb(int f); #define JPC_GETSPB(f) \ (jpc_spblut[((f) & (JPC_PRIMSIGMSK | JPC_SGNMSK)) >> 4]) /* Get the sign coding context. */ int jpc_getscctxno(int f); #define JPC_GETSCCTXNO(f) \ (jpc_scctxnolut[((f) & (JPC_PRIMSIGMSK | JPC_SGNMSK)) >> 4]) /* Get the magnitude context. */ int jpc_getmagctxno(int f); #define JPC_GETMAGCTXNO(f) \ (jpc_magctxnolut[((f) & JPC_OTHSIGMSK) | ((((f) & JPC_REFINE) != 0) << 11)]) /* Get the normalized MSE reduction for significance passes. */ #define JPC_GETSIGNMSEDEC(x, bitpos) jpc_getsignmsedec_macro(x, bitpos) jpc_fix_t jpc_getsignmsedec_func(jpc_fix_t x, int bitpos); #define jpc_getsignmsedec_macro(x, bitpos) \ ((bitpos > JPC_NMSEDEC_FRACBITS) ? jpc_signmsedec[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)] : \ (jpc_signmsedec0[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)])) /* Get the normalized MSE reduction for refinement passes. */ #define JPC_GETREFNMSEDEC(x, bitpos) jpc_getrefnmsedec_macro(x, bitpos) jpc_fix_t jpc_refsignmsedec_func(jpc_fix_t x, int bitpos); #define jpc_getrefnmsedec_macro(x, bitpos) \ ((bitpos > JPC_NMSEDEC_FRACBITS) ? jpc_refnmsedec[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)] : \ (jpc_refnmsedec0[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)])) /* Arithmetic shift right (with ability to shift left also). */ #define JPC_ASR(x, n) \ (((n) >= 0) ? ((x) >> (n)) : ((x) << (-(n)))) /* Update the per-sample state information. */ #define JPC_UPDATEFLAGS4(fp, rowstep, s, vcausalflag) \ { \ register jpc_fix_t *np = (fp) - (rowstep); \ register jpc_fix_t *sp = (fp) + (rowstep); \ if ((vcausalflag)) { \ sp[-1] |= JPC_NESIG; \ sp[1] |= JPC_NWSIG; \ if (s) { \ *sp |= JPC_NSIG | JPC_NSGN; \ (fp)[-1] |= JPC_ESIG | JPC_ESGN; \ (fp)[1] |= JPC_WSIG | JPC_WSGN; \ } else { \ *sp |= JPC_NSIG; \ (fp)[-1] |= JPC_ESIG; \ (fp)[1] |= JPC_WSIG; \ } \ } else { \ np[-1] |= JPC_SESIG; \ np[1] |= JPC_SWSIG; \ sp[-1] |= JPC_NESIG; \ sp[1] |= JPC_NWSIG; \ if (s) { \ *np |= JPC_SSIG | JPC_SSGN; \ *sp |= JPC_NSIG | JPC_NSGN; \ (fp)[-1] |= JPC_ESIG | JPC_ESGN; \ (fp)[1] |= JPC_WSIG | JPC_WSGN; \ } else { \ *np |= JPC_SSIG; \ *sp |= JPC_NSIG; \ (fp)[-1] |= JPC_ESIG; \ (fp)[1] |= JPC_WSIG; \ } \ } \ } /* Initialize the lookup tables used by the codec. */ void jpc_initluts(void); /* Get the nominal gain associated with a particular band. */ int JPC_NOMINALGAIN(int qmfbid, int numlvls, int lvlno, int orient); /* Get the coding pass type. */ int JPC_PASSTYPE(int passno); /* Get the segment type. */ int JPC_SEGTYPE(int passno, int firstpassno, int bypass); /* Get the number of coding passess in the segment. */ int JPC_SEGPASSCNT(int passno, int firstpassno, int numpasses, int bypass, int termall); /* Is the coding pass terminated? */ int JPC_ISTERMINATED(int passno, int firstpassno, int numpasses, int termall, int lazy); #endif jasper-1.900.1/src/libjasper/jpc/jpc_enc.c0000644000175000017500000021107010554235553017227 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include #include "jasper/jas_types.h" #include "jasper/jas_string.h" #include "jasper/jas_malloc.h" #include "jasper/jas_image.h" #include "jasper/jas_fix.h" #include "jasper/jas_tvp.h" #include "jasper/jas_version.h" #include "jasper/jas_math.h" #include "jasper/jas_debug.h" #include "jpc_flt.h" #include "jpc_fix.h" #include "jpc_tagtree.h" #include "jpc_enc.h" #include "jpc_cs.h" #include "jpc_mct.h" #include "jpc_tsfb.h" #include "jpc_qmfb.h" #include "jpc_t1enc.h" #include "jpc_t2enc.h" #include "jpc_cod.h" #include "jpc_math.h" #include "jpc_util.h" /******************************************************************************\ * \******************************************************************************/ #define JPC_POW2(n) \ (1 << (n)) #define JPC_FLOORTOMULTPOW2(x, n) \ (((n) > 0) ? ((x) & (~((1 << n) - 1))) : (x)) /* Round to the nearest multiple of the specified power of two in the direction of negative infinity. */ #define JPC_CEILTOMULTPOW2(x, n) \ (((n) > 0) ? JPC_FLOORTOMULTPOW2(((x) + (1 << (n)) - 1), n) : (x)) /* Round to the nearest multiple of the specified power of two in the direction of positive infinity. */ #define JPC_POW2(n) \ (1 << (n)) jpc_enc_tile_t *jpc_enc_tile_create(jpc_enc_cp_t *cp, jas_image_t *image, int tileno); void jpc_enc_tile_destroy(jpc_enc_tile_t *tile); static jpc_enc_tcmpt_t *tcmpt_create(jpc_enc_tcmpt_t *tcmpt, jpc_enc_cp_t *cp, jas_image_t *image, jpc_enc_tile_t *tile); static void tcmpt_destroy(jpc_enc_tcmpt_t *tcmpt); static jpc_enc_rlvl_t *rlvl_create(jpc_enc_rlvl_t *rlvl, jpc_enc_cp_t *cp, jpc_enc_tcmpt_t *tcmpt, jpc_tsfb_band_t *bandinfos); static void rlvl_destroy(jpc_enc_rlvl_t *rlvl); static jpc_enc_band_t *band_create(jpc_enc_band_t *band, jpc_enc_cp_t *cp, jpc_enc_rlvl_t *rlvl, jpc_tsfb_band_t *bandinfos); static void band_destroy(jpc_enc_band_t *bands); static jpc_enc_prc_t *prc_create(jpc_enc_prc_t *prc, jpc_enc_cp_t *cp, jpc_enc_band_t *band); static void prc_destroy(jpc_enc_prc_t *prcs); static jpc_enc_cblk_t *cblk_create(jpc_enc_cblk_t *cblk, jpc_enc_cp_t *cp, jpc_enc_prc_t *prc); static void cblk_destroy(jpc_enc_cblk_t *cblks); int ratestrtosize(char *s, uint_fast32_t rawsize, uint_fast32_t *size); static void pass_destroy(jpc_enc_pass_t *pass); void jpc_enc_dump(jpc_enc_t *enc); /******************************************************************************\ * Local prototypes. \******************************************************************************/ int dump_passes(jpc_enc_pass_t *passes, int numpasses, jpc_enc_cblk_t *cblk); void calcrdslopes(jpc_enc_cblk_t *cblk); void dump_layeringinfo(jpc_enc_t *enc); static int jpc_calcssexp(jpc_fix_t stepsize); static int jpc_calcssmant(jpc_fix_t stepsize); void jpc_quantize(jas_matrix_t *data, jpc_fix_t stepsize); static int jpc_enc_encodemainhdr(jpc_enc_t *enc); static int jpc_enc_encodemainbody(jpc_enc_t *enc); int jpc_enc_encodetiledata(jpc_enc_t *enc); jpc_enc_t *jpc_enc_create(jpc_enc_cp_t *cp, jas_stream_t *out, jas_image_t *image); void jpc_enc_destroy(jpc_enc_t *enc); static int jpc_enc_encodemainhdr(jpc_enc_t *enc); static int jpc_enc_encodemainbody(jpc_enc_t *enc); int jpc_enc_encodetiledata(jpc_enc_t *enc); int rateallocate(jpc_enc_t *enc, int numlyrs, uint_fast32_t *cumlens); int setins(int numvalues, jpc_flt_t *values, jpc_flt_t value); static jpc_enc_cp_t *cp_create(char *optstr, jas_image_t *image); void jpc_enc_cp_destroy(jpc_enc_cp_t *cp); static uint_fast32_t jpc_abstorelstepsize(jpc_fix_t absdelta, int scaleexpn); static uint_fast32_t jpc_abstorelstepsize(jpc_fix_t absdelta, int scaleexpn) { int p; uint_fast32_t mant; uint_fast32_t expn; int n; if (absdelta < 0) { abort(); } p = jpc_firstone(absdelta) - JPC_FIX_FRACBITS; n = 11 - jpc_firstone(absdelta); mant = ((n < 0) ? (absdelta >> (-n)) : (absdelta << n)) & 0x7ff; expn = scaleexpn - p; if (scaleexpn < p) { abort(); } return JPC_QCX_EXPN(expn) | JPC_QCX_MANT(mant); } typedef enum { OPT_DEBUG, OPT_IMGAREAOFFX, OPT_IMGAREAOFFY, OPT_TILEGRDOFFX, OPT_TILEGRDOFFY, OPT_TILEWIDTH, OPT_TILEHEIGHT, OPT_PRCWIDTH, OPT_PRCHEIGHT, OPT_CBLKWIDTH, OPT_CBLKHEIGHT, OPT_MODE, OPT_PRG, OPT_NOMCT, OPT_MAXRLVLS, OPT_SOP, OPT_EPH, OPT_LAZY, OPT_TERMALL, OPT_SEGSYM, OPT_VCAUSAL, OPT_RESET, OPT_PTERM, OPT_NUMGBITS, OPT_RATE, OPT_ILYRRATES, OPT_JP2OVERHEAD } optid_t; jas_taginfo_t encopts[] = { {OPT_DEBUG, "debug"}, {OPT_IMGAREAOFFX, "imgareatlx"}, {OPT_IMGAREAOFFY, "imgareatly"}, {OPT_TILEGRDOFFX, "tilegrdtlx"}, {OPT_TILEGRDOFFY, "tilegrdtly"}, {OPT_TILEWIDTH, "tilewidth"}, {OPT_TILEHEIGHT, "tileheight"}, {OPT_PRCWIDTH, "prcwidth"}, {OPT_PRCHEIGHT, "prcheight"}, {OPT_CBLKWIDTH, "cblkwidth"}, {OPT_CBLKHEIGHT, "cblkheight"}, {OPT_MODE, "mode"}, {OPT_PRG, "prg"}, {OPT_NOMCT, "nomct"}, {OPT_MAXRLVLS, "numrlvls"}, {OPT_SOP, "sop"}, {OPT_EPH, "eph"}, {OPT_LAZY, "lazy"}, {OPT_TERMALL, "termall"}, {OPT_SEGSYM, "segsym"}, {OPT_VCAUSAL, "vcausal"}, {OPT_PTERM, "pterm"}, {OPT_RESET, "resetprob"}, {OPT_NUMGBITS, "numgbits"}, {OPT_RATE, "rate"}, {OPT_ILYRRATES, "ilyrrates"}, {OPT_JP2OVERHEAD, "_jp2overhead"}, {-1, 0} }; typedef enum { PO_L = 0, PO_R } poid_t; jas_taginfo_t prgordtab[] = { {JPC_COD_LRCPPRG, "lrcp"}, {JPC_COD_RLCPPRG, "rlcp"}, {JPC_COD_RPCLPRG, "rpcl"}, {JPC_COD_PCRLPRG, "pcrl"}, {JPC_COD_CPRLPRG, "cprl"}, {-1, 0} }; typedef enum { MODE_INT, MODE_REAL } modeid_t; jas_taginfo_t modetab[] = { {MODE_INT, "int"}, {MODE_REAL, "real"}, {-1, 0} }; /******************************************************************************\ * The main encoder entry point. \******************************************************************************/ int jpc_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { jpc_enc_t *enc; jpc_enc_cp_t *cp; enc = 0; cp = 0; jpc_initluts(); if (!(cp = cp_create(optstr, image))) { jas_eprintf("invalid JP encoder options\n"); goto error; } if (!(enc = jpc_enc_create(cp, out, image))) { goto error; } cp = 0; /* Encode the main header. */ if (jpc_enc_encodemainhdr(enc)) { goto error; } /* Encode the main body. This constitutes most of the encoding work. */ if (jpc_enc_encodemainbody(enc)) { goto error; } /* Write EOC marker segment. */ if (!(enc->mrk = jpc_ms_create(JPC_MS_EOC))) { goto error; } if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { jas_eprintf("cannot write EOI marker\n"); goto error; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; if (jas_stream_flush(enc->out)) { goto error; } jpc_enc_destroy(enc); return 0; error: if (cp) { jpc_enc_cp_destroy(cp); } if (enc) { jpc_enc_destroy(enc); } return -1; } /******************************************************************************\ * Option parsing code. \******************************************************************************/ static jpc_enc_cp_t *cp_create(char *optstr, jas_image_t *image) { jpc_enc_cp_t *cp; jas_tvparser_t *tvp; int ret; int numilyrrates; double *ilyrrates; int i; int tagid; jpc_enc_tcp_t *tcp; jpc_enc_tccp_t *tccp; jpc_enc_ccp_t *ccp; int cmptno; uint_fast16_t rlvlno; uint_fast16_t prcwidthexpn; uint_fast16_t prcheightexpn; bool enablemct; uint_fast32_t jp2overhead; uint_fast16_t lyrno; uint_fast32_t hsteplcm; uint_fast32_t vsteplcm; bool mctvalid; tvp = 0; cp = 0; ilyrrates = 0; numilyrrates = 0; if (!(cp = jas_malloc(sizeof(jpc_enc_cp_t)))) { goto error; } prcwidthexpn = 15; prcheightexpn = 15; enablemct = true; jp2overhead = 0; cp->ccps = 0; cp->debug = 0; cp->imgareatlx = UINT_FAST32_MAX; cp->imgareatly = UINT_FAST32_MAX; cp->refgrdwidth = 0; cp->refgrdheight = 0; cp->tilegrdoffx = UINT_FAST32_MAX; cp->tilegrdoffy = UINT_FAST32_MAX; cp->tilewidth = 0; cp->tileheight = 0; cp->numcmpts = jas_image_numcmpts(image); hsteplcm = 1; vsteplcm = 1; for (cmptno = 0; cmptno < jas_image_numcmpts(image); ++cmptno) { if (jas_image_cmptbrx(image, cmptno) + jas_image_cmpthstep(image, cmptno) <= jas_image_brx(image) || jas_image_cmptbry(image, cmptno) + jas_image_cmptvstep(image, cmptno) <= jas_image_bry(image)) { jas_eprintf("unsupported image type\n"); goto error; } /* Note: We ought to be calculating the LCMs here. Fix some day. */ hsteplcm *= jas_image_cmpthstep(image, cmptno); vsteplcm *= jas_image_cmptvstep(image, cmptno); } if (!(cp->ccps = jas_malloc(cp->numcmpts * sizeof(jpc_enc_ccp_t)))) { goto error; } for (cmptno = 0, ccp = cp->ccps; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno, ++ccp) { ccp->sampgrdstepx = jas_image_cmpthstep(image, cmptno); ccp->sampgrdstepy = jas_image_cmptvstep(image, cmptno); /* XXX - this isn't quite correct for more general image */ ccp->sampgrdsubstepx = 0; ccp->sampgrdsubstepx = 0; ccp->prec = jas_image_cmptprec(image, cmptno); ccp->sgnd = jas_image_cmptsgnd(image, cmptno); ccp->numstepsizes = 0; memset(ccp->stepsizes, 0, sizeof(ccp->stepsizes)); } cp->rawsize = jas_image_rawsize(image); cp->totalsize = UINT_FAST32_MAX; tcp = &cp->tcp; tcp->csty = 0; tcp->intmode = true; tcp->prg = JPC_COD_LRCPPRG; tcp->numlyrs = 1; tcp->ilyrrates = 0; tccp = &cp->tccp; tccp->csty = 0; tccp->maxrlvls = 6; tccp->cblkwidthexpn = 6; tccp->cblkheightexpn = 6; tccp->cblksty = 0; tccp->numgbits = 2; if (!(tvp = jas_tvparser_create(optstr ? optstr : ""))) { goto error; } while (!(ret = jas_tvparser_next(tvp))) { switch (jas_taginfo_nonull(jas_taginfos_lookup(encopts, jas_tvparser_gettag(tvp)))->id) { case OPT_DEBUG: cp->debug = atoi(jas_tvparser_getval(tvp)); break; case OPT_IMGAREAOFFX: cp->imgareatlx = atoi(jas_tvparser_getval(tvp)); break; case OPT_IMGAREAOFFY: cp->imgareatly = atoi(jas_tvparser_getval(tvp)); break; case OPT_TILEGRDOFFX: cp->tilegrdoffx = atoi(jas_tvparser_getval(tvp)); break; case OPT_TILEGRDOFFY: cp->tilegrdoffy = atoi(jas_tvparser_getval(tvp)); break; case OPT_TILEWIDTH: cp->tilewidth = atoi(jas_tvparser_getval(tvp)); break; case OPT_TILEHEIGHT: cp->tileheight = atoi(jas_tvparser_getval(tvp)); break; case OPT_PRCWIDTH: prcwidthexpn = jpc_floorlog2(atoi(jas_tvparser_getval(tvp))); break; case OPT_PRCHEIGHT: prcheightexpn = jpc_floorlog2(atoi(jas_tvparser_getval(tvp))); break; case OPT_CBLKWIDTH: tccp->cblkwidthexpn = jpc_floorlog2(atoi(jas_tvparser_getval(tvp))); break; case OPT_CBLKHEIGHT: tccp->cblkheightexpn = jpc_floorlog2(atoi(jas_tvparser_getval(tvp))); break; case OPT_MODE: if ((tagid = jas_taginfo_nonull(jas_taginfos_lookup(modetab, jas_tvparser_getval(tvp)))->id) < 0) { jas_eprintf("ignoring invalid mode %s\n", jas_tvparser_getval(tvp)); } else { tcp->intmode = (tagid == MODE_INT); } break; case OPT_PRG: if ((tagid = jas_taginfo_nonull(jas_taginfos_lookup(prgordtab, jas_tvparser_getval(tvp)))->id) < 0) { jas_eprintf("ignoring invalid progression order %s\n", jas_tvparser_getval(tvp)); } else { tcp->prg = tagid; } break; case OPT_NOMCT: enablemct = false; break; case OPT_MAXRLVLS: tccp->maxrlvls = atoi(jas_tvparser_getval(tvp)); break; case OPT_SOP: cp->tcp.csty |= JPC_COD_SOP; break; case OPT_EPH: cp->tcp.csty |= JPC_COD_EPH; break; case OPT_LAZY: tccp->cblksty |= JPC_COX_LAZY; break; case OPT_TERMALL: tccp->cblksty |= JPC_COX_TERMALL; break; case OPT_SEGSYM: tccp->cblksty |= JPC_COX_SEGSYM; break; case OPT_VCAUSAL: tccp->cblksty |= JPC_COX_VSC; break; case OPT_RESET: tccp->cblksty |= JPC_COX_RESET; break; case OPT_PTERM: tccp->cblksty |= JPC_COX_PTERM; break; case OPT_NUMGBITS: cp->tccp.numgbits = atoi(jas_tvparser_getval(tvp)); break; case OPT_RATE: if (ratestrtosize(jas_tvparser_getval(tvp), cp->rawsize, &cp->totalsize)) { jas_eprintf("ignoring bad rate specifier %s\n", jas_tvparser_getval(tvp)); } break; case OPT_ILYRRATES: if (jpc_atoaf(jas_tvparser_getval(tvp), &numilyrrates, &ilyrrates)) { jas_eprintf("warning: invalid intermediate layer rates specifier ignored (%s)\n", jas_tvparser_getval(tvp)); } break; case OPT_JP2OVERHEAD: jp2overhead = atoi(jas_tvparser_getval(tvp)); break; default: jas_eprintf("warning: ignoring invalid option %s\n", jas_tvparser_gettag(tvp)); break; } } jas_tvparser_destroy(tvp); tvp = 0; if (cp->totalsize != UINT_FAST32_MAX) { cp->totalsize = (cp->totalsize > jp2overhead) ? (cp->totalsize - jp2overhead) : 0; } if (cp->imgareatlx == UINT_FAST32_MAX) { cp->imgareatlx = 0; } else { if (hsteplcm != 1) { jas_eprintf("warning: overriding imgareatlx value\n"); } cp->imgareatlx *= hsteplcm; } if (cp->imgareatly == UINT_FAST32_MAX) { cp->imgareatly = 0; } else { if (vsteplcm != 1) { jas_eprintf("warning: overriding imgareatly value\n"); } cp->imgareatly *= vsteplcm; } cp->refgrdwidth = cp->imgareatlx + jas_image_width(image); cp->refgrdheight = cp->imgareatly + jas_image_height(image); if (cp->tilegrdoffx == UINT_FAST32_MAX) { cp->tilegrdoffx = cp->imgareatlx; } if (cp->tilegrdoffy == UINT_FAST32_MAX) { cp->tilegrdoffy = cp->imgareatly; } if (!cp->tilewidth) { cp->tilewidth = cp->refgrdwidth - cp->tilegrdoffx; } if (!cp->tileheight) { cp->tileheight = cp->refgrdheight - cp->tilegrdoffy; } if (cp->numcmpts == 3) { mctvalid = true; for (cmptno = 0; cmptno < jas_image_numcmpts(image); ++cmptno) { if (jas_image_cmptprec(image, cmptno) != jas_image_cmptprec(image, 0) || jas_image_cmptsgnd(image, cmptno) != jas_image_cmptsgnd(image, 0) || jas_image_cmptwidth(image, cmptno) != jas_image_cmptwidth(image, 0) || jas_image_cmptheight(image, cmptno) != jas_image_cmptheight(image, 0)) { mctvalid = false; } } } else { mctvalid = false; } if (mctvalid && enablemct && jas_clrspc_fam(jas_image_clrspc(image)) != JAS_CLRSPC_FAM_RGB) { jas_eprintf("warning: color space apparently not RGB\n"); } if (mctvalid && enablemct && jas_clrspc_fam(jas_image_clrspc(image)) == JAS_CLRSPC_FAM_RGB) { tcp->mctid = (tcp->intmode) ? (JPC_MCT_RCT) : (JPC_MCT_ICT); } else { tcp->mctid = JPC_MCT_NONE; } tccp->qmfbid = (tcp->intmode) ? (JPC_COX_RFT) : (JPC_COX_INS); for (rlvlno = 0; rlvlno < tccp->maxrlvls; ++rlvlno) { tccp->prcwidthexpns[rlvlno] = prcwidthexpn; tccp->prcheightexpns[rlvlno] = prcheightexpn; } if (prcwidthexpn != 15 || prcheightexpn != 15) { tccp->csty |= JPC_COX_PRT; } /* Ensure that the tile width and height is valid. */ if (!cp->tilewidth) { jas_eprintf("invalid tile width %lu\n", (unsigned long) cp->tilewidth); goto error; } if (!cp->tileheight) { jas_eprintf("invalid tile height %lu\n", (unsigned long) cp->tileheight); goto error; } /* Ensure that the tile grid offset is valid. */ if (cp->tilegrdoffx > cp->imgareatlx || cp->tilegrdoffy > cp->imgareatly || cp->tilegrdoffx + cp->tilewidth < cp->imgareatlx || cp->tilegrdoffy + cp->tileheight < cp->imgareatly) { jas_eprintf("invalid tile grid offset (%lu, %lu)\n", (unsigned long) cp->tilegrdoffx, (unsigned long) cp->tilegrdoffy); goto error; } cp->numhtiles = JPC_CEILDIV(cp->refgrdwidth - cp->tilegrdoffx, cp->tilewidth); cp->numvtiles = JPC_CEILDIV(cp->refgrdheight - cp->tilegrdoffy, cp->tileheight); cp->numtiles = cp->numhtiles * cp->numvtiles; if (ilyrrates && numilyrrates > 0) { tcp->numlyrs = numilyrrates + 1; if (!(tcp->ilyrrates = jas_malloc((tcp->numlyrs - 1) * sizeof(jpc_fix_t)))) { goto error; } for (i = 0; i < JAS_CAST(int, tcp->numlyrs - 1); ++i) { tcp->ilyrrates[i] = jpc_dbltofix(ilyrrates[i]); } } /* Ensure that the integer mode is used in the case of lossless coding. */ if (cp->totalsize == UINT_FAST32_MAX && (!cp->tcp.intmode)) { jas_eprintf("cannot use real mode for lossless coding\n"); goto error; } /* Ensure that the precinct width is valid. */ if (prcwidthexpn > 15) { jas_eprintf("invalid precinct width\n"); goto error; } /* Ensure that the precinct height is valid. */ if (prcheightexpn > 15) { jas_eprintf("invalid precinct height\n"); goto error; } /* Ensure that the code block width is valid. */ if (cp->tccp.cblkwidthexpn < 2 || cp->tccp.cblkwidthexpn > 12) { jas_eprintf("invalid code block width %d\n", JPC_POW2(cp->tccp.cblkwidthexpn)); goto error; } /* Ensure that the code block height is valid. */ if (cp->tccp.cblkheightexpn < 2 || cp->tccp.cblkheightexpn > 12) { jas_eprintf("invalid code block height %d\n", JPC_POW2(cp->tccp.cblkheightexpn)); goto error; } /* Ensure that the code block size is not too large. */ if (cp->tccp.cblkwidthexpn + cp->tccp.cblkheightexpn > 12) { jas_eprintf("code block size too large\n"); goto error; } /* Ensure that the number of layers is valid. */ if (cp->tcp.numlyrs > 16384) { jas_eprintf("too many layers\n"); goto error; } /* There must be at least one resolution level. */ if (cp->tccp.maxrlvls < 1) { jas_eprintf("must be at least one resolution level\n"); goto error; } /* Ensure that the number of guard bits is valid. */ if (cp->tccp.numgbits > 8) { jas_eprintf("invalid number of guard bits\n"); goto error; } /* Ensure that the rate is within the legal range. */ if (cp->totalsize != UINT_FAST32_MAX && cp->totalsize > cp->rawsize) { jas_eprintf("warning: specified rate is unreasonably large (%lu > %lu)\n", (unsigned long) cp->totalsize, (unsigned long) cp->rawsize); } /* Ensure that the intermediate layer rates are valid. */ if (tcp->numlyrs > 1) { /* The intermediate layers rates must increase monotonically. */ for (lyrno = 0; lyrno + 2 < tcp->numlyrs; ++lyrno) { if (tcp->ilyrrates[lyrno] >= tcp->ilyrrates[lyrno + 1]) { jas_eprintf("intermediate layer rates must increase monotonically\n"); goto error; } } /* The intermediate layer rates must be less than the overall rate. */ if (cp->totalsize != UINT_FAST32_MAX) { for (lyrno = 0; lyrno < tcp->numlyrs - 1; ++lyrno) { if (jpc_fixtodbl(tcp->ilyrrates[lyrno]) > ((double) cp->totalsize) / cp->rawsize) { jas_eprintf("warning: intermediate layer rates must be less than overall rate\n"); goto error; } } } } if (ilyrrates) { jas_free(ilyrrates); } return cp; error: if (ilyrrates) { jas_free(ilyrrates); } if (tvp) { jas_tvparser_destroy(tvp); } if (cp) { jpc_enc_cp_destroy(cp); } return 0; } void jpc_enc_cp_destroy(jpc_enc_cp_t *cp) { if (cp->ccps) { if (cp->tcp.ilyrrates) { jas_free(cp->tcp.ilyrrates); } jas_free(cp->ccps); } jas_free(cp); } int ratestrtosize(char *s, uint_fast32_t rawsize, uint_fast32_t *size) { char *cp; jpc_flt_t f; /* Note: This function must not modify output size on failure. */ if ((cp = strchr(s, 'B'))) { *size = atoi(s); } else { f = atof(s); if (f < 0) { *size = 0; } else if (f > 1.0) { *size = rawsize + 1; } else { *size = f * rawsize; } } return 0; } /******************************************************************************\ * Encoder constructor and destructor. \******************************************************************************/ jpc_enc_t *jpc_enc_create(jpc_enc_cp_t *cp, jas_stream_t *out, jas_image_t *image) { jpc_enc_t *enc; enc = 0; if (!(enc = jas_malloc(sizeof(jpc_enc_t)))) { goto error; } enc->image = image; enc->out = out; enc->cp = cp; enc->cstate = 0; enc->tmpstream = 0; enc->mrk = 0; enc->curtile = 0; if (!(enc->cstate = jpc_cstate_create())) { goto error; } enc->len = 0; enc->mainbodysize = 0; return enc; error: if (enc) { jpc_enc_destroy(enc); } return 0; } void jpc_enc_destroy(jpc_enc_t *enc) { /* The image object (i.e., enc->image) and output stream object (i.e., enc->out) are created outside of the encoder. Therefore, they must not be destroyed here. */ if (enc->curtile) { jpc_enc_tile_destroy(enc->curtile); } if (enc->cp) { jpc_enc_cp_destroy(enc->cp); } if (enc->cstate) { jpc_cstate_destroy(enc->cstate); } if (enc->tmpstream) { jas_stream_close(enc->tmpstream); } jas_free(enc); } /******************************************************************************\ * Code. \******************************************************************************/ static int jpc_calcssmant(jpc_fix_t stepsize) { int n; int e; int m; n = jpc_firstone(stepsize); e = n - JPC_FIX_FRACBITS; if (n >= 11) { m = (stepsize >> (n - 11)) & 0x7ff; } else { m = (stepsize & ((1 << n) - 1)) << (11 - n); } return m; } static int jpc_calcssexp(jpc_fix_t stepsize) { return jpc_firstone(stepsize) - JPC_FIX_FRACBITS; } static int jpc_enc_encodemainhdr(jpc_enc_t *enc) { jpc_siz_t *siz; jpc_cod_t *cod; jpc_qcd_t *qcd; int i; long startoff; long mainhdrlen; jpc_enc_cp_t *cp; jpc_qcc_t *qcc; jpc_enc_tccp_t *tccp; uint_fast16_t cmptno; jpc_tsfb_band_t bandinfos[JPC_MAXBANDS]; jpc_fix_t mctsynweight; jpc_enc_tcp_t *tcp; jpc_tsfb_t *tsfb; jpc_tsfb_band_t *bandinfo; uint_fast16_t numbands; uint_fast16_t bandno; uint_fast16_t rlvlno; uint_fast16_t analgain; jpc_fix_t absstepsize; char buf[1024]; jpc_com_t *com; cp = enc->cp; startoff = jas_stream_getrwcount(enc->out); /* Write SOC marker segment. */ if (!(enc->mrk = jpc_ms_create(JPC_MS_SOC))) { return -1; } if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { jas_eprintf("cannot write SOC marker\n"); return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; /* Write SIZ marker segment. */ if (!(enc->mrk = jpc_ms_create(JPC_MS_SIZ))) { return -1; } siz = &enc->mrk->parms.siz; siz->caps = 0; siz->xoff = cp->imgareatlx; siz->yoff = cp->imgareatly; siz->width = cp->refgrdwidth; siz->height = cp->refgrdheight; siz->tilexoff = cp->tilegrdoffx; siz->tileyoff = cp->tilegrdoffy; siz->tilewidth = cp->tilewidth; siz->tileheight = cp->tileheight; siz->numcomps = cp->numcmpts; siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)); assert(siz->comps); for (i = 0; i < JAS_CAST(int, cp->numcmpts); ++i) { siz->comps[i].prec = cp->ccps[i].prec; siz->comps[i].sgnd = cp->ccps[i].sgnd; siz->comps[i].hsamp = cp->ccps[i].sampgrdstepx; siz->comps[i].vsamp = cp->ccps[i].sampgrdstepy; } if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { jas_eprintf("cannot write SIZ marker\n"); return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; if (!(enc->mrk = jpc_ms_create(JPC_MS_COM))) { return -1; } sprintf(buf, "Creator: JasPer Version %s", jas_getversion()); com = &enc->mrk->parms.com; com->len = strlen(buf); com->regid = JPC_COM_LATIN; if (!(com->data = JAS_CAST(uchar *, jas_strdup(buf)))) { abort(); } if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { jas_eprintf("cannot write COM marker\n"); return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; #if 0 if (!(enc->mrk = jpc_ms_create(JPC_MS_CRG))) { return -1; } crg = &enc->mrk->parms.crg; crg->comps = jas_malloc(crg->numcomps * sizeof(jpc_crgcomp_t)); if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { jas_eprintf("cannot write CRG marker\n"); return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; #endif tcp = &cp->tcp; tccp = &cp->tccp; for (cmptno = 0; cmptno < cp->numcmpts; ++cmptno) { tsfb = jpc_cod_gettsfb(tccp->qmfbid, tccp->maxrlvls - 1); jpc_tsfb_getbands(tsfb, 0, 0, 1 << tccp->maxrlvls, 1 << tccp->maxrlvls, bandinfos); jpc_tsfb_destroy(tsfb); mctsynweight = jpc_mct_getsynweight(tcp->mctid, cmptno); numbands = 3 * tccp->maxrlvls - 2; for (bandno = 0, bandinfo = bandinfos; bandno < numbands; ++bandno, ++bandinfo) { rlvlno = (bandno) ? ((bandno - 1) / 3 + 1) : 0; analgain = JPC_NOMINALGAIN(tccp->qmfbid, tccp->maxrlvls, rlvlno, bandinfo->orient); if (!tcp->intmode) { absstepsize = jpc_fix_div(jpc_inttofix(1 << (analgain + 1)), bandinfo->synenergywt); } else { absstepsize = jpc_inttofix(1); } cp->ccps[cmptno].stepsizes[bandno] = jpc_abstorelstepsize(absstepsize, cp->ccps[cmptno].prec + analgain); } cp->ccps[cmptno].numstepsizes = numbands; } if (!(enc->mrk = jpc_ms_create(JPC_MS_COD))) { return -1; } cod = &enc->mrk->parms.cod; cod->csty = cp->tccp.csty | cp->tcp.csty; cod->compparms.csty = cp->tccp.csty | cp->tcp.csty; cod->compparms.numdlvls = cp->tccp.maxrlvls - 1; cod->compparms.numrlvls = cp->tccp.maxrlvls; cod->prg = cp->tcp.prg; cod->numlyrs = cp->tcp.numlyrs; cod->compparms.cblkwidthval = JPC_COX_CBLKSIZEEXPN(cp->tccp.cblkwidthexpn); cod->compparms.cblkheightval = JPC_COX_CBLKSIZEEXPN(cp->tccp.cblkheightexpn); cod->compparms.cblksty = cp->tccp.cblksty; cod->compparms.qmfbid = cp->tccp.qmfbid; cod->mctrans = (cp->tcp.mctid != JPC_MCT_NONE); if (tccp->csty & JPC_COX_PRT) { for (rlvlno = 0; rlvlno < tccp->maxrlvls; ++rlvlno) { cod->compparms.rlvls[rlvlno].parwidthval = tccp->prcwidthexpns[rlvlno]; cod->compparms.rlvls[rlvlno].parheightval = tccp->prcheightexpns[rlvlno]; } } if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { jas_eprintf("cannot write COD marker\n"); return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; if (!(enc->mrk = jpc_ms_create(JPC_MS_QCD))) { return -1; } qcd = &enc->mrk->parms.qcd; qcd->compparms.qntsty = (tccp->qmfbid == JPC_COX_INS) ? JPC_QCX_SEQNT : JPC_QCX_NOQNT; qcd->compparms.numstepsizes = cp->ccps[0].numstepsizes; qcd->compparms.numguard = cp->tccp.numgbits; qcd->compparms.stepsizes = cp->ccps[0].stepsizes; if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { return -1; } /* We do not want the step size array to be freed! */ qcd->compparms.stepsizes = 0; jpc_ms_destroy(enc->mrk); enc->mrk = 0; tccp = &cp->tccp; for (cmptno = 1; cmptno < cp->numcmpts; ++cmptno) { if (!(enc->mrk = jpc_ms_create(JPC_MS_QCC))) { return -1; } qcc = &enc->mrk->parms.qcc; qcc->compno = cmptno; qcc->compparms.qntsty = (tccp->qmfbid == JPC_COX_INS) ? JPC_QCX_SEQNT : JPC_QCX_NOQNT; qcc->compparms.numstepsizes = cp->ccps[cmptno].numstepsizes; qcc->compparms.numguard = cp->tccp.numgbits; qcc->compparms.stepsizes = cp->ccps[cmptno].stepsizes; if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { return -1; } /* We do not want the step size array to be freed! */ qcc->compparms.stepsizes = 0; jpc_ms_destroy(enc->mrk); enc->mrk = 0; } #define MAINTLRLEN 2 mainhdrlen = jas_stream_getrwcount(enc->out) - startoff; enc->len += mainhdrlen; if (enc->cp->totalsize != UINT_FAST32_MAX) { uint_fast32_t overhead; overhead = mainhdrlen + MAINTLRLEN; enc->mainbodysize = (enc->cp->totalsize >= overhead) ? (enc->cp->totalsize - overhead) : 0; } else { enc->mainbodysize = UINT_FAST32_MAX; } return 0; } static int jpc_enc_encodemainbody(jpc_enc_t *enc) { int tileno; int tilex; int tiley; int i; jpc_sot_t *sot; jpc_enc_tcmpt_t *comp; jpc_enc_tcmpt_t *endcomps; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_rlvl_t *lvl; int rlvlno; jpc_qcc_t *qcc; jpc_cod_t *cod; int adjust; int j; int absbandno; long numbytes; long tilehdrlen; long tilelen; jpc_enc_tile_t *tile; jpc_enc_cp_t *cp; double rho; int lyrno; int cmptno; int samestepsizes; jpc_enc_ccp_t *ccps; jpc_enc_tccp_t *tccp; int bandno; uint_fast32_t x; uint_fast32_t y; int mingbits; int actualnumbps; jpc_fix_t mxmag; jpc_fix_t mag; int numgbits; cp = enc->cp; /* Avoid compile warnings. */ numbytes = 0; for (tileno = 0; tileno < JAS_CAST(int, cp->numtiles); ++tileno) { tilex = tileno % cp->numhtiles; tiley = tileno / cp->numhtiles; if (!(enc->curtile = jpc_enc_tile_create(enc->cp, enc->image, tileno))) { abort(); } tile = enc->curtile; if (jas_getdbglevel() >= 10) { jpc_enc_dump(enc); } endcomps = &tile->tcmpts[tile->numtcmpts]; for (cmptno = 0, comp = tile->tcmpts; cmptno < tile->numtcmpts; ++cmptno, ++comp) { if (!cp->ccps[cmptno].sgnd) { adjust = 1 << (cp->ccps[cmptno].prec - 1); for (i = 0; i < jas_matrix_numrows(comp->data); ++i) { for (j = 0; j < jas_matrix_numcols(comp->data); ++j) { *jas_matrix_getref(comp->data, i, j) -= adjust; } } } } if (!tile->intmode) { endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { jas_matrix_asl(comp->data, JPC_FIX_FRACBITS); } } switch (tile->mctid) { case JPC_MCT_RCT: assert(jas_image_numcmpts(enc->image) == 3); jpc_rct(tile->tcmpts[0].data, tile->tcmpts[1].data, tile->tcmpts[2].data); break; case JPC_MCT_ICT: assert(jas_image_numcmpts(enc->image) == 3); jpc_ict(tile->tcmpts[0].data, tile->tcmpts[1].data, tile->tcmpts[2].data); break; default: break; } for (i = 0; i < jas_image_numcmpts(enc->image); ++i) { comp = &tile->tcmpts[i]; jpc_tsfb_analyze(comp->tsfb, comp->data); } endcomps = &tile->tcmpts[tile->numtcmpts]; for (cmptno = 0, comp = tile->tcmpts; comp != endcomps; ++cmptno, ++comp) { mingbits = 0; absbandno = 0; /* All bands must have a corresponding quantizer step size, even if they contain no samples and are never coded. */ /* Some bands may not be hit by the loop below, so we must initialize all of the step sizes to a sane value. */ memset(comp->stepsizes, 0, sizeof(comp->stepsizes)); for (rlvlno = 0, lvl = comp->rlvls; rlvlno < comp->numrlvls; ++rlvlno, ++lvl) { if (!lvl->bands) { absbandno += rlvlno ? 3 : 1; continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { ++absbandno; continue; } actualnumbps = 0; mxmag = 0; for (y = 0; y < JAS_CAST(uint_fast32_t, jas_matrix_numrows(band->data)); ++y) { for (x = 0; x < JAS_CAST(uint_fast32_t, jas_matrix_numcols(band->data)); ++x) { mag = abs(jas_matrix_get(band->data, y, x)); if (mag > mxmag) { mxmag = mag; } } } if (tile->intmode) { actualnumbps = jpc_firstone(mxmag) + 1; } else { actualnumbps = jpc_firstone(mxmag) + 1 - JPC_FIX_FRACBITS; } numgbits = actualnumbps - (cp->ccps[cmptno].prec - 1 + band->analgain); #if 0 jas_eprintf("%d %d mag=%d actual=%d numgbits=%d\n", cp->ccps[cmptno].prec, band->analgain, mxmag, actualnumbps, numgbits); #endif if (numgbits > mingbits) { mingbits = numgbits; } if (!tile->intmode) { band->absstepsize = jpc_fix_div(jpc_inttofix(1 << (band->analgain + 1)), band->synweight); } else { band->absstepsize = jpc_inttofix(1); } band->stepsize = jpc_abstorelstepsize( band->absstepsize, cp->ccps[cmptno].prec + band->analgain); band->numbps = cp->tccp.numgbits + JPC_QCX_GETEXPN(band->stepsize) - 1; if ((!tile->intmode) && band->data) { jpc_quantize(band->data, band->absstepsize); } comp->stepsizes[absbandno] = band->stepsize; ++absbandno; } } assert(JPC_FIX_FRACBITS >= JPC_NUMEXTRABITS); if (!tile->intmode) { jas_matrix_divpow2(comp->data, JPC_FIX_FRACBITS - JPC_NUMEXTRABITS); } else { jas_matrix_asl(comp->data, JPC_NUMEXTRABITS); } #if 0 jas_eprintf("mingbits %d\n", mingbits); #endif if (mingbits > cp->tccp.numgbits) { jas_eprintf("error: too few guard bits (need at least %d)\n", mingbits); return -1; } } if (!(enc->tmpstream = jas_stream_memopen(0, 0))) { jas_eprintf("cannot open tmp file\n"); return -1; } /* Write the tile header. */ if (!(enc->mrk = jpc_ms_create(JPC_MS_SOT))) { return -1; } sot = &enc->mrk->parms.sot; sot->len = 0; sot->tileno = tileno; sot->partno = 0; sot->numparts = 1; if (jpc_putms(enc->tmpstream, enc->cstate, enc->mrk)) { jas_eprintf("cannot write SOT marker\n"); return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; /************************************************************************/ /************************************************************************/ /************************************************************************/ tccp = &cp->tccp; for (cmptno = 0; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno) { comp = &tile->tcmpts[cmptno]; if (comp->numrlvls != tccp->maxrlvls) { if (!(enc->mrk = jpc_ms_create(JPC_MS_COD))) { return -1; } /* XXX = this is not really correct. we are using comp #0's precint sizes and other characteristics */ comp = &tile->tcmpts[0]; cod = &enc->mrk->parms.cod; cod->compparms.csty = 0; cod->compparms.numdlvls = comp->numrlvls - 1; cod->prg = tile->prg; cod->numlyrs = tile->numlyrs; cod->compparms.cblkwidthval = JPC_COX_CBLKSIZEEXPN(comp->cblkwidthexpn); cod->compparms.cblkheightval = JPC_COX_CBLKSIZEEXPN(comp->cblkheightexpn); cod->compparms.cblksty = comp->cblksty; cod->compparms.qmfbid = comp->qmfbid; cod->mctrans = (tile->mctid != JPC_MCT_NONE); for (i = 0; i < comp->numrlvls; ++i) { cod->compparms.rlvls[i].parwidthval = comp->rlvls[i].prcwidthexpn; cod->compparms.rlvls[i].parheightval = comp->rlvls[i].prcheightexpn; } if (jpc_putms(enc->tmpstream, enc->cstate, enc->mrk)) { return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; } } for (cmptno = 0, comp = tile->tcmpts; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno, ++comp) { ccps = &cp->ccps[cmptno]; if (JAS_CAST(int, ccps->numstepsizes) == comp->numstepsizes) { samestepsizes = 1; for (bandno = 0; bandno < JAS_CAST(int, ccps->numstepsizes); ++bandno) { if (ccps->stepsizes[bandno] != comp->stepsizes[bandno]) { samestepsizes = 0; break; } } } else { samestepsizes = 0; } if (!samestepsizes) { if (!(enc->mrk = jpc_ms_create(JPC_MS_QCC))) { return -1; } qcc = &enc->mrk->parms.qcc; qcc->compno = cmptno; qcc->compparms.numguard = cp->tccp.numgbits; qcc->compparms.qntsty = (comp->qmfbid == JPC_COX_INS) ? JPC_QCX_SEQNT : JPC_QCX_NOQNT; qcc->compparms.numstepsizes = comp->numstepsizes; qcc->compparms.stepsizes = comp->stepsizes; if (jpc_putms(enc->tmpstream, enc->cstate, enc->mrk)) { return -1; } qcc->compparms.stepsizes = 0; jpc_ms_destroy(enc->mrk); enc->mrk = 0; } } /* Write a SOD marker to indicate the end of the tile header. */ if (!(enc->mrk = jpc_ms_create(JPC_MS_SOD))) { return -1; } if (jpc_putms(enc->tmpstream, enc->cstate, enc->mrk)) { jas_eprintf("cannot write SOD marker\n"); return -1; } jpc_ms_destroy(enc->mrk); enc->mrk = 0; tilehdrlen = jas_stream_getrwcount(enc->tmpstream); /************************************************************************/ /************************************************************************/ /************************************************************************/ if (jpc_enc_enccblks(enc)) { abort(); return -1; } cp = enc->cp; rho = (double) (tile->brx - tile->tlx) * (tile->bry - tile->tly) / ((cp->refgrdwidth - cp->imgareatlx) * (cp->refgrdheight - cp->imgareatly)); tile->rawsize = cp->rawsize * rho; for (lyrno = 0; lyrno < tile->numlyrs - 1; ++lyrno) { tile->lyrsizes[lyrno] = tile->rawsize * jpc_fixtodbl( cp->tcp.ilyrrates[lyrno]); } tile->lyrsizes[tile->numlyrs - 1] = (cp->totalsize != UINT_FAST32_MAX) ? (rho * enc->mainbodysize) : UINT_FAST32_MAX; for (lyrno = 0; lyrno < tile->numlyrs; ++lyrno) { if (tile->lyrsizes[lyrno] != UINT_FAST32_MAX) { if (tilehdrlen <= JAS_CAST(long, tile->lyrsizes[lyrno])) { tile->lyrsizes[lyrno] -= tilehdrlen; } else { tile->lyrsizes[lyrno] = 0; } } } if (rateallocate(enc, tile->numlyrs, tile->lyrsizes)) { return -1; } #if 0 jas_eprintf("ENCODE TILE DATA\n"); #endif if (jpc_enc_encodetiledata(enc)) { jas_eprintf("dotile failed\n"); return -1; } /************************************************************************/ /************************************************************************/ /************************************************************************/ /************************************************************************/ /************************************************************************/ /************************************************************************/ tilelen = jas_stream_tell(enc->tmpstream); if (jas_stream_seek(enc->tmpstream, 6, SEEK_SET) < 0) { return -1; } jpc_putuint32(enc->tmpstream, tilelen); if (jas_stream_seek(enc->tmpstream, 0, SEEK_SET) < 0) { return -1; } if (jpc_putdata(enc->out, enc->tmpstream, -1)) { return -1; } enc->len += tilelen; jas_stream_close(enc->tmpstream); enc->tmpstream = 0; jpc_enc_tile_destroy(enc->curtile); enc->curtile = 0; } return 0; } int jpc_enc_encodetiledata(jpc_enc_t *enc) { assert(enc->tmpstream); if (jpc_enc_encpkts(enc, enc->tmpstream)) { return -1; } return 0; } int dump_passes(jpc_enc_pass_t *passes, int numpasses, jpc_enc_cblk_t *cblk) { jpc_enc_pass_t *pass; int i; jas_stream_memobj_t *smo; smo = cblk->stream->obj_; pass = passes; for (i = 0; i < numpasses; ++i) { jas_eprintf("start=%d end=%d type=%d term=%d lyrno=%d firstchar=%02x size=%ld pos=%ld\n", (int)pass->start, (int)pass->end, (int)pass->type, (int)pass->term, (int)pass->lyrno, smo->buf_[pass->start], (long)smo->len_, (long)smo->pos_); #if 0 jas_memdump(stderr, &smo->buf_[pass->start], pass->end - pass->start); #endif ++pass; } return 0; } void jpc_quantize(jas_matrix_t *data, jpc_fix_t stepsize) { int i; int j; jpc_fix_t t; if (stepsize == jpc_inttofix(1)) { return; } for (i = 0; i < jas_matrix_numrows(data); ++i) { for (j = 0; j < jas_matrix_numcols(data); ++j) { t = jas_matrix_get(data, i, j); { if (t < 0) { t = jpc_fix_neg(jpc_fix_div(jpc_fix_neg(t), stepsize)); } else { t = jpc_fix_div(t, stepsize); } } jas_matrix_set(data, i, j, t); } } } void calcrdslopes(jpc_enc_cblk_t *cblk) { jpc_enc_pass_t *endpasses; jpc_enc_pass_t *pass0; jpc_enc_pass_t *pass1; jpc_enc_pass_t *pass2; jpc_flt_t slope0; jpc_flt_t slope; jpc_flt_t dd; long dr; endpasses = &cblk->passes[cblk->numpasses]; pass2 = cblk->passes; slope0 = 0; while (pass2 != endpasses) { pass0 = 0; for (pass1 = cblk->passes; pass1 != endpasses; ++pass1) { dd = pass1->cumwmsedec; dr = pass1->end; if (pass0) { dd -= pass0->cumwmsedec; dr -= pass0->end; } if (dd <= 0) { pass1->rdslope = JPC_BADRDSLOPE; if (pass1 >= pass2) { pass2 = &pass1[1]; } continue; } if (pass1 < pass2 && pass1->rdslope <= 0) { continue; } if (!dr) { assert(pass0); pass0->rdslope = 0; break; } slope = dd / dr; if (pass0 && slope >= slope0) { pass0->rdslope = 0; break; } pass1->rdslope = slope; if (pass1 >= pass2) { pass2 = &pass1[1]; } pass0 = pass1; slope0 = slope; } } #if 0 for (pass0 = cblk->passes; pass0 != endpasses; ++pass0) { if (pass0->rdslope > 0.0) { jas_eprintf("pass %02d nmsedec=%lf dec=%lf end=%d %lf\n", pass0 - cblk->passes, fixtodbl(pass0->nmsedec), pass0->wmsedec, pass0->end, pass0->rdslope); } } #endif } void dump_layeringinfo(jpc_enc_t *enc) { jpc_enc_tcmpt_t *tcmpt; int tcmptno; jpc_enc_rlvl_t *rlvl; int rlvlno; jpc_enc_band_t *band; int bandno; jpc_enc_prc_t *prc; int prcno; jpc_enc_cblk_t *cblk; int cblkno; jpc_enc_pass_t *pass; int passno; int lyrno; jpc_enc_tile_t *tile; tile = enc->curtile; for (lyrno = 0; lyrno < tile->numlyrs; ++lyrno) { jas_eprintf("lyrno = %02d\n", lyrno); for (tcmptno = 0, tcmpt = tile->tcmpts; tcmptno < tile->numtcmpts; ++tcmptno, ++tcmpt) { for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls; ++rlvlno, ++rlvl) { if (!rlvl->bands) { continue; } for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { for (passno = 0, pass = cblk->passes; passno < cblk->numpasses && pass->lyrno == lyrno; ++passno, ++pass) { jas_eprintf("lyrno=%02d cmptno=%02d rlvlno=%02d bandno=%02d prcno=%02d cblkno=%03d passno=%03d\n", lyrno, tcmptno, rlvlno, bandno, prcno, cblkno, passno); } } } } } } } } int rateallocate(jpc_enc_t *enc, int numlyrs, uint_fast32_t *cumlens) { jpc_flt_t lo; jpc_flt_t hi; jas_stream_t *out; long cumlen; int lyrno; jpc_flt_t thresh; jpc_flt_t goodthresh; int success; long pos; long oldpos; int numiters; jpc_enc_tcmpt_t *comp; jpc_enc_tcmpt_t *endcomps; jpc_enc_rlvl_t *lvl; jpc_enc_rlvl_t *endlvls; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_cblk_t *cblk; jpc_enc_cblk_t *endcblks; jpc_enc_pass_t *pass; jpc_enc_pass_t *endpasses; jpc_enc_pass_t *pass1; jpc_flt_t mxrdslope; jpc_flt_t mnrdslope; jpc_enc_tile_t *tile; jpc_enc_prc_t *prc; int prcno; tile = enc->curtile; for (lyrno = 1; lyrno < numlyrs - 1; ++lyrno) { if (cumlens[lyrno - 1] > cumlens[lyrno]) { abort(); } } if (!(out = jas_stream_memopen(0, 0))) { return -1; } /* Find minimum and maximum R-D slope values. */ mnrdslope = DBL_MAX; mxrdslope = 0; endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < lvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { calcrdslopes(cblk); endpasses = &cblk->passes[cblk->numpasses]; for (pass = cblk->passes; pass != endpasses; ++pass) { if (pass->rdslope > 0) { if (pass->rdslope < mnrdslope) { mnrdslope = pass->rdslope; } if (pass->rdslope > mxrdslope) { mxrdslope = pass->rdslope; } } } } } } } } if (jas_getdbglevel()) { jas_eprintf("min rdslope = %f max rdslope = %f\n", mnrdslope, mxrdslope); } jpc_init_t2state(enc, 1); for (lyrno = 0; lyrno < numlyrs; ++lyrno) { lo = mnrdslope; hi = mxrdslope; success = 0; goodthresh = 0; numiters = 0; do { cumlen = cumlens[lyrno]; if (cumlen == UINT_FAST32_MAX) { /* Only the last layer can be free of a rate constraint (e.g., for lossless coding). */ assert(lyrno == numlyrs - 1); goodthresh = -1; success = 1; break; } thresh = (lo + hi) / 2; /* Save the tier 2 coding state. */ jpc_save_t2state(enc); oldpos = jas_stream_tell(out); assert(oldpos >= 0); /* Assign all passes with R-D slopes greater than or equal to the current threshold to this layer. */ endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < lvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { if (cblk->curpass) { endpasses = &cblk->passes[cblk->numpasses]; pass1 = cblk->curpass; for (pass = cblk->curpass; pass != endpasses; ++pass) { if (pass->rdslope >= thresh) { pass1 = &pass[1]; } } for (pass = cblk->curpass; pass != pass1; ++pass) { pass->lyrno = lyrno; } for (; pass != endpasses; ++pass) { pass->lyrno = -1; } } } } } } } /* Perform tier 2 coding. */ endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } for (prcno = 0; prcno < lvl->numprcs; ++prcno) { if (jpc_enc_encpkt(enc, out, comp - tile->tcmpts, lvl - comp->rlvls, prcno, lyrno)) { return -1; } } } } pos = jas_stream_tell(out); /* Check the rate constraint. */ assert(pos >= 0); if (pos > cumlen) { /* The rate is too high. */ lo = thresh; } else if (pos <= cumlen) { /* The rate is low enough, so try higher. */ hi = thresh; if (!success || thresh < goodthresh) { goodthresh = thresh; success = 1; } } /* Save the tier 2 coding state. */ jpc_restore_t2state(enc); if (jas_stream_seek(out, oldpos, SEEK_SET) < 0) { abort(); } if (jas_getdbglevel()) { jas_eprintf("maxlen=%08ld actuallen=%08ld thresh=%f\n", cumlen, pos, thresh); } ++numiters; } while (lo < hi - 1e-3 && numiters < 32); if (!success) { jas_eprintf("warning: empty layer generated\n"); } if (jas_getdbglevel()) { jas_eprintf("success %d goodthresh %f\n", success, goodthresh); } /* Assign all passes with R-D slopes greater than or equal to the selected threshold to this layer. */ endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < lvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { if (cblk->curpass) { endpasses = &cblk->passes[cblk->numpasses]; pass1 = cblk->curpass; if (success) { for (pass = cblk->curpass; pass != endpasses; ++pass) { if (pass->rdslope >= goodthresh) { pass1 = &pass[1]; } } } for (pass = cblk->curpass; pass != pass1; ++pass) { pass->lyrno = lyrno; } for (; pass != endpasses; ++pass) { pass->lyrno = -1; } } } } } } } /* Perform tier 2 coding. */ endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } for (prcno = 0; prcno < lvl->numprcs; ++prcno) { if (jpc_enc_encpkt(enc, out, comp - tile->tcmpts, lvl - comp->rlvls, prcno, lyrno)) { return -1; } } } } } if (jas_getdbglevel() >= 5) { dump_layeringinfo(enc); } jas_stream_close(out); JAS_DBGLOG(10, ("done doing rateallocation\n")); #if 0 jas_eprintf("DONE RATE ALLOCATE\n"); #endif return 0; } /******************************************************************************\ * Tile constructors and destructors. \******************************************************************************/ jpc_enc_tile_t *jpc_enc_tile_create(jpc_enc_cp_t *cp, jas_image_t *image, int tileno) { jpc_enc_tile_t *tile; uint_fast32_t htileno; uint_fast32_t vtileno; uint_fast16_t lyrno; uint_fast16_t cmptno; jpc_enc_tcmpt_t *tcmpt; if (!(tile = jas_malloc(sizeof(jpc_enc_tile_t)))) { goto error; } /* Initialize a few members used in error recovery. */ tile->tcmpts = 0; tile->lyrsizes = 0; tile->numtcmpts = cp->numcmpts; tile->pi = 0; tile->tileno = tileno; htileno = tileno % cp->numhtiles; vtileno = tileno / cp->numhtiles; /* Calculate the coordinates of the top-left and bottom-right corners of the tile. */ tile->tlx = JAS_MAX(cp->tilegrdoffx + htileno * cp->tilewidth, cp->imgareatlx); tile->tly = JAS_MAX(cp->tilegrdoffy + vtileno * cp->tileheight, cp->imgareatly); tile->brx = JAS_MIN(cp->tilegrdoffx + (htileno + 1) * cp->tilewidth, cp->refgrdwidth); tile->bry = JAS_MIN(cp->tilegrdoffy + (vtileno + 1) * cp->tileheight, cp->refgrdheight); /* Initialize some tile coding parameters. */ tile->intmode = cp->tcp.intmode; tile->csty = cp->tcp.csty; tile->prg = cp->tcp.prg; tile->mctid = cp->tcp.mctid; tile->numlyrs = cp->tcp.numlyrs; if (!(tile->lyrsizes = jas_malloc(tile->numlyrs * sizeof(uint_fast32_t)))) { goto error; } for (lyrno = 0; lyrno < tile->numlyrs; ++lyrno) { tile->lyrsizes[lyrno] = 0; } /* Allocate an array for the per-tile-component information. */ if (!(tile->tcmpts = jas_malloc(cp->numcmpts * sizeof(jpc_enc_tcmpt_t)))) { goto error; } /* Initialize a few members critical for error recovery. */ for (cmptno = 0, tcmpt = tile->tcmpts; cmptno < cp->numcmpts; ++cmptno, ++tcmpt) { tcmpt->rlvls = 0; tcmpt->tsfb = 0; tcmpt->data = 0; } /* Initialize the per-tile-component information. */ for (cmptno = 0, tcmpt = tile->tcmpts; cmptno < cp->numcmpts; ++cmptno, ++tcmpt) { if (!tcmpt_create(tcmpt, cp, image, tile)) { goto error; } } /* Initialize the synthesis weights for the MCT. */ switch (tile->mctid) { case JPC_MCT_RCT: tile->tcmpts[0].synweight = jpc_dbltofix(sqrt(3.0)); tile->tcmpts[1].synweight = jpc_dbltofix(sqrt(0.6875)); tile->tcmpts[2].synweight = jpc_dbltofix(sqrt(0.6875)); break; case JPC_MCT_ICT: tile->tcmpts[0].synweight = jpc_dbltofix(sqrt(3.0000)); tile->tcmpts[1].synweight = jpc_dbltofix(sqrt(3.2584)); tile->tcmpts[2].synweight = jpc_dbltofix(sqrt(2.4755)); break; default: case JPC_MCT_NONE: for (cmptno = 0, tcmpt = tile->tcmpts; cmptno < cp->numcmpts; ++cmptno, ++tcmpt) { tcmpt->synweight = JPC_FIX_ONE; } break; } if (!(tile->pi = jpc_enc_pi_create(cp, tile))) { goto error; } return tile; error: if (tile) { jpc_enc_tile_destroy(tile); } return 0; } void jpc_enc_tile_destroy(jpc_enc_tile_t *tile) { jpc_enc_tcmpt_t *tcmpt; uint_fast16_t cmptno; if (tile->tcmpts) { for (cmptno = 0, tcmpt = tile->tcmpts; cmptno < tile->numtcmpts; ++cmptno, ++tcmpt) { tcmpt_destroy(tcmpt); } jas_free(tile->tcmpts); } if (tile->lyrsizes) { jas_free(tile->lyrsizes); } if (tile->pi) { jpc_pi_destroy(tile->pi); } jas_free(tile); } static jpc_enc_tcmpt_t *tcmpt_create(jpc_enc_tcmpt_t *tcmpt, jpc_enc_cp_t *cp, jas_image_t *image, jpc_enc_tile_t *tile) { uint_fast16_t cmptno; uint_fast16_t rlvlno; jpc_enc_rlvl_t *rlvl; uint_fast32_t tlx; uint_fast32_t tly; uint_fast32_t brx; uint_fast32_t bry; uint_fast32_t cmpttlx; uint_fast32_t cmpttly; jpc_enc_ccp_t *ccp; jpc_tsfb_band_t bandinfos[JPC_MAXBANDS]; tcmpt->tile = tile; tcmpt->tsfb = 0; tcmpt->data = 0; tcmpt->rlvls = 0; /* Deduce the component number. */ cmptno = tcmpt - tile->tcmpts; ccp = &cp->ccps[cmptno]; /* Compute the coordinates of the top-left and bottom-right corners of this tile-component. */ tlx = JPC_CEILDIV(tile->tlx, ccp->sampgrdstepx); tly = JPC_CEILDIV(tile->tly, ccp->sampgrdstepy); brx = JPC_CEILDIV(tile->brx, ccp->sampgrdstepx); bry = JPC_CEILDIV(tile->bry, ccp->sampgrdstepy); /* Create a sequence to hold the tile-component sample data. */ if (!(tcmpt->data = jas_seq2d_create(tlx, tly, brx, bry))) { goto error; } /* Get the image data associated with this tile-component. */ cmpttlx = JPC_CEILDIV(cp->imgareatlx, ccp->sampgrdstepx); cmpttly = JPC_CEILDIV(cp->imgareatly, ccp->sampgrdstepy); if (jas_image_readcmpt(image, cmptno, tlx - cmpttlx, tly - cmpttly, brx - tlx, bry - tly, tcmpt->data)) { goto error; } tcmpt->synweight = 0; tcmpt->qmfbid = cp->tccp.qmfbid; tcmpt->numrlvls = cp->tccp.maxrlvls; tcmpt->numbands = 3 * tcmpt->numrlvls - 2; if (!(tcmpt->tsfb = jpc_cod_gettsfb(tcmpt->qmfbid, tcmpt->numrlvls - 1))) { goto error; } for (rlvlno = 0; rlvlno < tcmpt->numrlvls; ++rlvlno) { tcmpt->prcwidthexpns[rlvlno] = cp->tccp.prcwidthexpns[rlvlno]; tcmpt->prcheightexpns[rlvlno] = cp->tccp.prcheightexpns[rlvlno]; } tcmpt->cblkwidthexpn = cp->tccp.cblkwidthexpn; tcmpt->cblkheightexpn = cp->tccp.cblkheightexpn; tcmpt->cblksty = cp->tccp.cblksty; tcmpt->csty = cp->tccp.csty; tcmpt->numstepsizes = tcmpt->numbands; assert(tcmpt->numstepsizes <= JPC_MAXBANDS); memset(tcmpt->stepsizes, 0, sizeof(tcmpt->numstepsizes * sizeof(uint_fast16_t))); /* Retrieve information about the various bands. */ jpc_tsfb_getbands(tcmpt->tsfb, jas_seq2d_xstart(tcmpt->data), jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data), jas_seq2d_yend(tcmpt->data), bandinfos); if (!(tcmpt->rlvls = jas_malloc(tcmpt->numrlvls * sizeof(jpc_enc_rlvl_t)))) { goto error; } for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls; ++rlvlno, ++rlvl) { rlvl->bands = 0; rlvl->tcmpt = tcmpt; } for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls; ++rlvlno, ++rlvl) { if (!rlvl_create(rlvl, cp, tcmpt, bandinfos)) { goto error; } } return tcmpt; error: tcmpt_destroy(tcmpt); return 0; } static void tcmpt_destroy(jpc_enc_tcmpt_t *tcmpt) { jpc_enc_rlvl_t *rlvl; uint_fast16_t rlvlno; if (tcmpt->rlvls) { for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls; ++rlvlno, ++rlvl) { rlvl_destroy(rlvl); } jas_free(tcmpt->rlvls); } if (tcmpt->data) { jas_seq2d_destroy(tcmpt->data); } if (tcmpt->tsfb) { jpc_tsfb_destroy(tcmpt->tsfb); } } static jpc_enc_rlvl_t *rlvl_create(jpc_enc_rlvl_t *rlvl, jpc_enc_cp_t *cp, jpc_enc_tcmpt_t *tcmpt, jpc_tsfb_band_t *bandinfos) { uint_fast16_t rlvlno; uint_fast32_t tlprctlx; uint_fast32_t tlprctly; uint_fast32_t brprcbrx; uint_fast32_t brprcbry; uint_fast16_t bandno; jpc_enc_band_t *band; /* Deduce the resolution level. */ rlvlno = rlvl - tcmpt->rlvls; /* Initialize members required for error recovery. */ rlvl->bands = 0; rlvl->tcmpt = tcmpt; /* Compute the coordinates of the top-left and bottom-right corners of the tile-component at this resolution. */ rlvl->tlx = JPC_CEILDIVPOW2(jas_seq2d_xstart(tcmpt->data), tcmpt->numrlvls - 1 - rlvlno); rlvl->tly = JPC_CEILDIVPOW2(jas_seq2d_ystart(tcmpt->data), tcmpt->numrlvls - 1 - rlvlno); rlvl->brx = JPC_CEILDIVPOW2(jas_seq2d_xend(tcmpt->data), tcmpt->numrlvls - 1 - rlvlno); rlvl->bry = JPC_CEILDIVPOW2(jas_seq2d_yend(tcmpt->data), tcmpt->numrlvls - 1 - rlvlno); if (rlvl->tlx >= rlvl->brx || rlvl->tly >= rlvl->bry) { rlvl->numhprcs = 0; rlvl->numvprcs = 0; rlvl->numprcs = 0; return rlvl; } rlvl->numbands = (!rlvlno) ? 1 : 3; rlvl->prcwidthexpn = cp->tccp.prcwidthexpns[rlvlno]; rlvl->prcheightexpn = cp->tccp.prcheightexpns[rlvlno]; if (!rlvlno) { rlvl->cbgwidthexpn = rlvl->prcwidthexpn; rlvl->cbgheightexpn = rlvl->prcheightexpn; } else { rlvl->cbgwidthexpn = rlvl->prcwidthexpn - 1; rlvl->cbgheightexpn = rlvl->prcheightexpn - 1; } rlvl->cblkwidthexpn = JAS_MIN(cp->tccp.cblkwidthexpn, rlvl->cbgwidthexpn); rlvl->cblkheightexpn = JAS_MIN(cp->tccp.cblkheightexpn, rlvl->cbgheightexpn); /* Compute the number of precincts. */ tlprctlx = JPC_FLOORTOMULTPOW2(rlvl->tlx, rlvl->prcwidthexpn); tlprctly = JPC_FLOORTOMULTPOW2(rlvl->tly, rlvl->prcheightexpn); brprcbrx = JPC_CEILTOMULTPOW2(rlvl->brx, rlvl->prcwidthexpn); brprcbry = JPC_CEILTOMULTPOW2(rlvl->bry, rlvl->prcheightexpn); rlvl->numhprcs = JPC_FLOORDIVPOW2(brprcbrx - tlprctlx, rlvl->prcwidthexpn); rlvl->numvprcs = JPC_FLOORDIVPOW2(brprcbry - tlprctly, rlvl->prcheightexpn); rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs; if (!(rlvl->bands = jas_malloc(rlvl->numbands * sizeof(jpc_enc_band_t)))) { goto error; } for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { band->prcs = 0; band->data = 0; band->rlvl = rlvl; } for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { if (!band_create(band, cp, rlvl, bandinfos)) { goto error; } } return rlvl; error: rlvl_destroy(rlvl); return 0; } static void rlvl_destroy(jpc_enc_rlvl_t *rlvl) { jpc_enc_band_t *band; uint_fast16_t bandno; if (rlvl->bands) { for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { band_destroy(band); } jas_free(rlvl->bands); } } static jpc_enc_band_t *band_create(jpc_enc_band_t *band, jpc_enc_cp_t *cp, jpc_enc_rlvl_t *rlvl, jpc_tsfb_band_t *bandinfos) { uint_fast16_t bandno; uint_fast16_t gblbandno; uint_fast16_t rlvlno; jpc_tsfb_band_t *bandinfo; jpc_enc_tcmpt_t *tcmpt; uint_fast32_t prcno; jpc_enc_prc_t *prc; tcmpt = rlvl->tcmpt; band->data = 0; band->prcs = 0; band->rlvl = rlvl; /* Deduce the resolution level and band number. */ rlvlno = rlvl - rlvl->tcmpt->rlvls; bandno = band - rlvl->bands; gblbandno = (!rlvlno) ? 0 : (3 * (rlvlno - 1) + bandno + 1); bandinfo = &bandinfos[gblbandno]; if (bandinfo->xstart != bandinfo->xend && bandinfo->ystart != bandinfo->yend) { if (!(band->data = jas_seq2d_create(0, 0, 0, 0))) { goto error; } jas_seq2d_bindsub(band->data, tcmpt->data, bandinfo->locxstart, bandinfo->locystart, bandinfo->locxend, bandinfo->locyend); jas_seq2d_setshift(band->data, bandinfo->xstart, bandinfo->ystart); } band->orient = bandinfo->orient; band->analgain = JPC_NOMINALGAIN(cp->tccp.qmfbid, tcmpt->numrlvls, rlvlno, band->orient); band->numbps = 0; band->absstepsize = 0; band->stepsize = 0; band->synweight = bandinfo->synenergywt; if (band->data) { if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_enc_prc_t)))) { goto error; } for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, ++prc) { prc->cblks = 0; prc->incltree = 0; prc->nlibtree = 0; prc->savincltree = 0; prc->savnlibtree = 0; prc->band = band; } for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, ++prc) { if (!prc_create(prc, cp, band)) { goto error; } } } return band; error: band_destroy(band); return 0; } static void band_destroy(jpc_enc_band_t *band) { jpc_enc_prc_t *prc; jpc_enc_rlvl_t *rlvl; uint_fast32_t prcno; if (band->prcs) { rlvl = band->rlvl; for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, ++prc) { prc_destroy(prc); } jas_free(band->prcs); } if (band->data) { jas_seq2d_destroy(band->data); } } static jpc_enc_prc_t *prc_create(jpc_enc_prc_t *prc, jpc_enc_cp_t *cp, jpc_enc_band_t *band) { uint_fast32_t prcno; uint_fast32_t prcxind; uint_fast32_t prcyind; uint_fast32_t cbgtlx; uint_fast32_t cbgtly; uint_fast32_t tlprctlx; uint_fast32_t tlprctly; uint_fast32_t tlcbgtlx; uint_fast32_t tlcbgtly; uint_fast16_t rlvlno; jpc_enc_rlvl_t *rlvl; uint_fast32_t tlcblktlx; uint_fast32_t tlcblktly; uint_fast32_t brcblkbrx; uint_fast32_t brcblkbry; uint_fast32_t cblkno; jpc_enc_cblk_t *cblk; jpc_enc_tcmpt_t *tcmpt; prc->cblks = 0; prc->incltree = 0; prc->savincltree = 0; prc->nlibtree = 0; prc->savnlibtree = 0; rlvl = band->rlvl; tcmpt = rlvl->tcmpt; rlvlno = rlvl - tcmpt->rlvls; prcno = prc - band->prcs; prcxind = prcno % rlvl->numhprcs; prcyind = prcno / rlvl->numhprcs; prc->band = band; tlprctlx = JPC_FLOORTOMULTPOW2(rlvl->tlx, rlvl->prcwidthexpn); tlprctly = JPC_FLOORTOMULTPOW2(rlvl->tly, rlvl->prcheightexpn); if (!rlvlno) { tlcbgtlx = tlprctlx; tlcbgtly = tlprctly; } else { tlcbgtlx = JPC_CEILDIVPOW2(tlprctlx, 1); tlcbgtly = JPC_CEILDIVPOW2(tlprctly, 1); } /* Compute the coordinates of the top-left and bottom-right corners of the precinct. */ cbgtlx = tlcbgtlx + (prcxind << rlvl->cbgwidthexpn); cbgtly = tlcbgtly + (prcyind << rlvl->cbgheightexpn); prc->tlx = JAS_MAX(jas_seq2d_xstart(band->data), cbgtlx); prc->tly = JAS_MAX(jas_seq2d_ystart(band->data), cbgtly); prc->brx = JAS_MIN(jas_seq2d_xend(band->data), cbgtlx + (1 << rlvl->cbgwidthexpn)); prc->bry = JAS_MIN(jas_seq2d_yend(band->data), cbgtly + (1 << rlvl->cbgheightexpn)); if (prc->tlx < prc->brx && prc->tly < prc->bry) { /* The precinct contains at least one code block. */ tlcblktlx = JPC_FLOORTOMULTPOW2(prc->tlx, rlvl->cblkwidthexpn); tlcblktly = JPC_FLOORTOMULTPOW2(prc->tly, rlvl->cblkheightexpn); brcblkbrx = JPC_CEILTOMULTPOW2(prc->brx, rlvl->cblkwidthexpn); brcblkbry = JPC_CEILTOMULTPOW2(prc->bry, rlvl->cblkheightexpn); prc->numhcblks = JPC_FLOORDIVPOW2(brcblkbrx - tlcblktlx, rlvl->cblkwidthexpn); prc->numvcblks = JPC_FLOORDIVPOW2(brcblkbry - tlcblktly, rlvl->cblkheightexpn); prc->numcblks = prc->numhcblks * prc->numvcblks; if (!(prc->incltree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { goto error; } if (!(prc->nlibtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { goto error; } if (!(prc->savincltree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { goto error; } if (!(prc->savnlibtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { goto error; } if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_enc_cblk_t)))) { goto error; } for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { cblk->passes = 0; cblk->stream = 0; cblk->mqenc = 0; cblk->data = 0; cblk->flags = 0; cblk->prc = prc; } for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { if (!cblk_create(cblk, cp, prc)) { goto error; } } } else { /* The precinct does not contain any code blocks. */ prc->tlx = prc->brx; prc->tly = prc->bry; prc->numcblks = 0; prc->numhcblks = 0; prc->numvcblks = 0; prc->cblks = 0; prc->incltree = 0; prc->nlibtree = 0; prc->savincltree = 0; prc->savnlibtree = 0; } return prc; error: prc_destroy(prc); return 0; } static void prc_destroy(jpc_enc_prc_t *prc) { jpc_enc_cblk_t *cblk; uint_fast32_t cblkno; if (prc->cblks) { for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { cblk_destroy(cblk); } jas_free(prc->cblks); } if (prc->incltree) { jpc_tagtree_destroy(prc->incltree); } if (prc->nlibtree) { jpc_tagtree_destroy(prc->nlibtree); } if (prc->savincltree) { jpc_tagtree_destroy(prc->savincltree); } if (prc->savnlibtree) { jpc_tagtree_destroy(prc->savnlibtree); } } static jpc_enc_cblk_t *cblk_create(jpc_enc_cblk_t *cblk, jpc_enc_cp_t *cp, jpc_enc_prc_t *prc) { jpc_enc_band_t *band; uint_fast32_t cblktlx; uint_fast32_t cblktly; uint_fast32_t cblkbrx; uint_fast32_t cblkbry; jpc_enc_rlvl_t *rlvl; uint_fast32_t cblkxind; uint_fast32_t cblkyind; uint_fast32_t cblkno; uint_fast32_t tlcblktlx; uint_fast32_t tlcblktly; cblkno = cblk - prc->cblks; cblkxind = cblkno % prc->numhcblks; cblkyind = cblkno / prc->numhcblks; rlvl = prc->band->rlvl; cblk->prc = prc; cblk->numpasses = 0; cblk->passes = 0; cblk->numencpasses = 0; cblk->numimsbs = 0; cblk->numlenbits = 0; cblk->stream = 0; cblk->mqenc = 0; cblk->flags = 0; cblk->numbps = 0; cblk->curpass = 0; cblk->data = 0; cblk->savedcurpass = 0; cblk->savednumlenbits = 0; cblk->savednumencpasses = 0; band = prc->band; tlcblktlx = JPC_FLOORTOMULTPOW2(prc->tlx, rlvl->cblkwidthexpn); tlcblktly = JPC_FLOORTOMULTPOW2(prc->tly, rlvl->cblkheightexpn); cblktlx = JAS_MAX(tlcblktlx + (cblkxind << rlvl->cblkwidthexpn), prc->tlx); cblktly = JAS_MAX(tlcblktly + (cblkyind << rlvl->cblkheightexpn), prc->tly); cblkbrx = JAS_MIN(tlcblktlx + ((cblkxind + 1) << rlvl->cblkwidthexpn), prc->brx); cblkbry = JAS_MIN(tlcblktly + ((cblkyind + 1) << rlvl->cblkheightexpn), prc->bry); assert(cblktlx < cblkbrx && cblktly < cblkbry); if (!(cblk->data = jas_seq2d_create(0, 0, 0, 0))) { goto error; } jas_seq2d_bindsub(cblk->data, band->data, cblktlx, cblktly, cblkbrx, cblkbry); return cblk; error: cblk_destroy(cblk); return 0; } static void cblk_destroy(jpc_enc_cblk_t *cblk) { uint_fast16_t passno; jpc_enc_pass_t *pass; if (cblk->passes) { for (passno = 0, pass = cblk->passes; passno < cblk->numpasses; ++passno, ++pass) { pass_destroy(pass); } jas_free(cblk->passes); } if (cblk->stream) { jas_stream_close(cblk->stream); } if (cblk->mqenc) { jpc_mqenc_destroy(cblk->mqenc); } if (cblk->data) { jas_seq2d_destroy(cblk->data); } if (cblk->flags) { jas_seq2d_destroy(cblk->flags); } } static void pass_destroy(jpc_enc_pass_t *pass) { /* XXX - need to free resources here */ } void jpc_enc_dump(jpc_enc_t *enc) { jpc_enc_tile_t *tile; jpc_enc_tcmpt_t *tcmpt; jpc_enc_rlvl_t *rlvl; jpc_enc_band_t *band; jpc_enc_prc_t *prc; jpc_enc_cblk_t *cblk; uint_fast16_t cmptno; uint_fast16_t rlvlno; uint_fast16_t bandno; uint_fast32_t prcno; uint_fast32_t cblkno; tile = enc->curtile; for (cmptno = 0, tcmpt = tile->tcmpts; cmptno < tile->numtcmpts; ++cmptno, ++tcmpt) { jas_eprintf(" tcmpt %5d %5d %5d %5d\n", jas_seq2d_xstart(tcmpt->data), jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data), jas_seq2d_yend(tcmpt->data)); for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls; ++rlvlno, ++rlvl) { jas_eprintf(" rlvl %5d %5d %5d %5d\n", rlvl->tlx, rlvl->tly, rlvl->brx, rlvl->bry); for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { if (!band->data) { continue; } jas_eprintf(" band %5d %5d %5d %5d\n", jas_seq2d_xstart(band->data), jas_seq2d_ystart(band->data), jas_seq2d_xend(band->data), jas_seq2d_yend(band->data)); for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, ++prc) { jas_eprintf(" prc %5d %5d %5d %5d (%5d %5d)\n", prc->tlx, prc->tly, prc->brx, prc->bry, prc->brx - prc->tlx, prc->bry - prc->tly); if (!prc->cblks) { continue; } for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; ++cblkno, ++cblk) { jas_eprintf(" cblk %5d %5d %5d %5d\n", jas_seq2d_xstart(cblk->data), jas_seq2d_ystart(cblk->data), jas_seq2d_xend(cblk->data), jas_seq2d_yend(cblk->data)); } } } } } } jasper-1.900.1/src/libjasper/jpc/jpc_flt.h0000644000175000017500000000656610554235553017270 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Floating-Point Class * * $Id$ */ #ifndef JPC_FLT_H #define JPC_FLT_H #include /* The code ought to be modified so this type is not used at all. */ /* Very few places in the code rely on floating-point arithmetic, aside from conversions in printf's. */ typedef double jpc_flt_t; #endif jasper-1.900.1/src/libjasper/jpc/Makefile.am0000644000175000017500000000715410554235553017524 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ # AM_CFLAGS = -funroll-loops noinst_LTLIBRARIES = libjpc.la libjpc_la_SOURCES = \ jpc_bs.h \ jpc_cod.h \ jpc_cs.h \ jpc_dec.h \ jpc_enc.h \ jpc_fix.h \ jpc_flt.h \ jpc_math.h \ jpc_mct.h \ jpc_mqcod.h \ jpc_mqdec.h \ jpc_mqenc.h \ jpc_qmfb.h \ jpc_tagtree.h \ jpc_t1cod.h \ jpc_t1dec.h \ jpc_t1enc.h \ jpc_tsfb.h \ jpc_t2cod.h \ jpc_t2dec.h \ jpc_t2enc.h \ jpc_util.h \ jpc_bs.c \ jpc_cs.c \ jpc_dec.c \ jpc_enc.c \ jpc_math.c \ jpc_mct.c \ jpc_mqcod.c \ jpc_mqdec.c \ jpc_mqenc.c \ jpc_qmfb.c \ jpc_tagtree.c \ jpc_t1cod.c \ jpc_t1dec.c \ jpc_t1enc.c \ jpc_tsfb.c \ jpc_t2cod.c \ jpc_t2dec.c \ jpc_t2enc.c \ jpc_util.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c0000644000175000017500000006216710554235553017507 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 1 Encoder * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_fix.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jpc_t1enc.h" #include "jpc_t1cod.h" #include "jpc_enc.h" #include "jpc_cod.h" #include "jpc_math.h" static int jpc_encsigpass(jpc_mqenc_t *mqenc, int bitpos, int orient, int, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec); static int jpc_encrefpass(jpc_mqenc_t *mqenc, int bitpos, int, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec); static int jpc_encclnpass(jpc_mqenc_t *mqenc, int bitpos, int orient, int, int, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec); static int jpc_encrawsigpass(jpc_bitstream_t *out, int bitpos, int, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec); static int jpc_encrawrefpass(jpc_bitstream_t *out, int bitpos, int, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec); /******************************************************************************\ * Code for encoding code blocks. \******************************************************************************/ /* Encode all of the code blocks associated with the current tile. */ int jpc_enc_enccblks(jpc_enc_t *enc) { jpc_enc_tcmpt_t *tcmpt; jpc_enc_tcmpt_t *endcomps; jpc_enc_rlvl_t *lvl; jpc_enc_rlvl_t *endlvls; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_cblk_t *cblk; jpc_enc_cblk_t *endcblks; int i; int j; int mx; int bmx; int v; jpc_enc_tile_t *tile; uint_fast32_t prcno; jpc_enc_prc_t *prc; tile = enc->curtile; endcomps = &tile->tcmpts[tile->numtcmpts]; for (tcmpt = tile->tcmpts; tcmpt != endcomps; ++tcmpt) { endlvls = &tcmpt->rlvls[tcmpt->numrlvls]; for (lvl = tcmpt->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < lvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } bmx = 0; endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { mx = 0; for (i = 0; i < jas_matrix_numrows(cblk->data); ++i) { for (j = 0; j < jas_matrix_numcols(cblk->data); ++j) { v = abs(jas_matrix_get(cblk->data, i, j)); if (v > mx) { mx = v; } } } if (mx > bmx) { bmx = mx; } cblk->numbps = JAS_MAX(jpc_firstone(mx) + 1 - JPC_NUMEXTRABITS, 0); } for (cblk = prc->cblks; cblk != endcblks; ++cblk) { cblk->numimsbs = band->numbps - cblk->numbps; assert(cblk->numimsbs >= 0); } for (cblk = prc->cblks; cblk != endcblks; ++cblk) { if (jpc_enc_enccblk(enc, cblk->stream, tcmpt, band, cblk)) { return -1; } } } } } } return 0; } int getthebyte(jas_stream_t *in, long off) { int c; long oldpos; oldpos = jas_stream_tell(in); assert(oldpos >= 0); jas_stream_seek(in, off, SEEK_SET); c = jas_stream_peekc(in); jas_stream_seek(in, oldpos, SEEK_SET); return c; } /* Encode a single code block. */ int jpc_enc_enccblk(jpc_enc_t *enc, jas_stream_t *out, jpc_enc_tcmpt_t *tcmpt, jpc_enc_band_t *band, jpc_enc_cblk_t *cblk) { jpc_enc_pass_t *pass; jpc_enc_pass_t *endpasses; int bitpos; int n; int adjust; int ret; int passtype; int t; jpc_bitstream_t *bout; jpc_enc_pass_t *termpass; jpc_enc_rlvl_t *rlvl; int vcausal; int segsym; int termmode; int c; bout = 0; rlvl = band->rlvl; cblk->stream = jas_stream_memopen(0, 0); assert(cblk->stream); cblk->mqenc = jpc_mqenc_create(JPC_NUMCTXS, cblk->stream); assert(cblk->mqenc); jpc_mqenc_setctxs(cblk->mqenc, JPC_NUMCTXS, jpc_mqctxs); cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0; if (cblk->numpasses > 0) { cblk->passes = jas_malloc(cblk->numpasses * sizeof(jpc_enc_pass_t)); assert(cblk->passes); } else { cblk->passes = 0; } endpasses = &cblk->passes[cblk->numpasses]; for (pass = cblk->passes; pass != endpasses; ++pass) { pass->start = 0; pass->end = 0; pass->term = JPC_ISTERMINATED(pass - cblk->passes, 0, cblk->numpasses, (tcmpt->cblksty & JPC_COX_TERMALL) != 0, (tcmpt->cblksty & JPC_COX_LAZY) != 0); pass->type = JPC_SEGTYPE(pass - cblk->passes, 0, (tcmpt->cblksty & JPC_COX_LAZY) != 0); pass->lyrno = -1; if (pass == endpasses - 1) { assert(pass->term == 1); pass->term = 1; } } cblk->flags = jas_matrix_create(jas_matrix_numrows(cblk->data) + 2, jas_matrix_numcols(cblk->data) + 2); assert(cblk->flags); bitpos = cblk->numbps - 1; pass = cblk->passes; n = cblk->numpasses; while (--n >= 0) { if (pass->type == JPC_SEG_MQ) { /* NOP */ } else { assert(pass->type == JPC_SEG_RAW); if (!bout) { bout = jpc_bitstream_sopen(cblk->stream, "w"); assert(bout); } } #if 1 passtype = (pass - cblk->passes + 2) % 3; #else passtype = JPC_PASSTYPE(pass - cblk->passes + 2); #endif pass->start = jas_stream_tell(cblk->stream); #if 0 assert(jas_stream_tell(cblk->stream) == jas_stream_getrwcount(cblk->stream)); #endif assert(bitpos >= 0); vcausal = (tcmpt->cblksty & JPC_COX_VSC) != 0; segsym = (tcmpt->cblksty & JPC_COX_SEGSYM) != 0; if (pass->term) { termmode = ((tcmpt->cblksty & JPC_COX_PTERM) ? JPC_MQENC_PTERM : JPC_MQENC_DEFTERM) + 1; } else { termmode = 0; } switch (passtype) { case JPC_SIGPASS: ret = (pass->type == JPC_SEG_MQ) ? jpc_encsigpass(cblk->mqenc, bitpos, band->orient, vcausal, cblk->flags, cblk->data, termmode, &pass->nmsedec) : jpc_encrawsigpass(bout, bitpos, vcausal, cblk->flags, cblk->data, termmode, &pass->nmsedec); break; case JPC_REFPASS: ret = (pass->type == JPC_SEG_MQ) ? jpc_encrefpass(cblk->mqenc, bitpos, vcausal, cblk->flags, cblk->data, termmode, &pass->nmsedec) : jpc_encrawrefpass(bout, bitpos, vcausal, cblk->flags, cblk->data, termmode, &pass->nmsedec); break; case JPC_CLNPASS: assert(pass->type == JPC_SEG_MQ); ret = jpc_encclnpass(cblk->mqenc, bitpos, band->orient, vcausal, segsym, cblk->flags, cblk->data, termmode, &pass->nmsedec); break; default: assert(0); break; } if (pass->type == JPC_SEG_MQ) { if (pass->term) { jpc_mqenc_init(cblk->mqenc); } jpc_mqenc_getstate(cblk->mqenc, &pass->mqencstate); pass->end = jas_stream_tell(cblk->stream); if (tcmpt->cblksty & JPC_COX_RESET) { jpc_mqenc_setctxs(cblk->mqenc, JPC_NUMCTXS, jpc_mqctxs); } } else { if (pass->term) { if (jpc_bitstream_pending(bout)) { jpc_bitstream_outalign(bout, 0x2a); } jpc_bitstream_close(bout); bout = 0; pass->end = jas_stream_tell(cblk->stream); } else { pass->end = jas_stream_tell(cblk->stream) + jpc_bitstream_pending(bout); /* NOTE - This will not work. need to adjust by # of pending output bytes */ } } #if 0 /* XXX - This assertion fails sometimes when various coding modes are used. This seems to be harmless, but why does it happen at all? */ assert(jas_stream_tell(cblk->stream) == jas_stream_getrwcount(cblk->stream)); #endif pass->wmsedec = jpc_fixtodbl(band->rlvl->tcmpt->synweight) * jpc_fixtodbl(band->rlvl->tcmpt->synweight) * jpc_fixtodbl(band->synweight) * jpc_fixtodbl(band->synweight) * jpc_fixtodbl(band->absstepsize) * jpc_fixtodbl(band->absstepsize) * ((double) (1 << bitpos)) * ((double)(1 << bitpos)) * jpc_fixtodbl(pass->nmsedec); pass->cumwmsedec = pass->wmsedec; if (pass != cblk->passes) { pass->cumwmsedec += pass[-1].cumwmsedec; } if (passtype == JPC_CLNPASS) { --bitpos; } ++pass; } #if 0 dump_passes(cblk->passes, cblk->numpasses, cblk); #endif n = 0; endpasses = &cblk->passes[cblk->numpasses]; for (pass = cblk->passes; pass != endpasses; ++pass) { if (pass->start < n) { pass->start = n; } if (pass->end < n) { pass->end = n; } if (!pass->term) { termpass = pass; while (termpass - pass < cblk->numpasses && !termpass->term) { ++termpass; } if (pass->type == JPC_SEG_MQ) { t = (pass->mqencstate.lastbyte == 0xff) ? 1 : 0; if (pass->mqencstate.ctreg >= 5) { adjust = 4 + t; } else { adjust = 5 + t; } pass->end += adjust; } if (pass->end > termpass->end) { pass->end = termpass->end; } if ((c = getthebyte(cblk->stream, pass->end - 1)) == EOF) { abort(); } if (c == 0xff) { ++pass->end; } n = JAS_MAX(n, pass->end); } else { n = JAS_MAX(n, pass->end); } } #if 0 dump_passes(cblk->passes, cblk->numpasses, cblk); #endif if (bout) { jpc_bitstream_close(bout); } return 0; } /******************************************************************************\ * Code for significance pass. \******************************************************************************/ #define sigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, orient, mqenc, vcausalflag) \ { \ int f; \ int v; \ f = *(fp); \ if ((f & JPC_OTHSIGMSK) && !(f & (JPC_SIG | JPC_VISIT))) { \ v = (abs(*(dp)) & (one)) ? 1 : 0; \ jpc_mqenc_setcurctx(mqenc, JPC_GETZCCTXNO(f, (orient))); \ jpc_mqenc_putbit(mqenc, v); \ if (v) { \ *(nmsedec) += JPC_GETSIGNMSEDEC(abs(*(dp)), (bitpos) + JPC_NUMEXTRABITS); \ v = ((*(dp) < 0) ? 1 : 0); \ jpc_mqenc_setcurctx(mqenc, JPC_GETSCCTXNO(f)); \ jpc_mqenc_putbit(mqenc, v ^ JPC_GETSPB(f)); \ JPC_UPDATEFLAGS4(fp, frowstep, v, vcausalflag); \ *(fp) |= JPC_SIG; \ } \ *(fp) |= JPC_VISIT; \ } \ } static int jpc_encsigpass(jpc_mqenc_t *mqenc, int bitpos, int orient, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec) { int i; int j; int one; int vscanlen; int width; int height; int frowstep; int drowstep; int fstripestep; int dstripestep; jpc_fix_t *fstripestart; jpc_fix_t *dstripestart; jpc_fix_t *fp; jpc_fix_t *dp; jpc_fix_t *fvscanstart; jpc_fix_t *dvscanstart; int k; *nmsedec = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << (bitpos + JPC_NUMEXTRABITS); fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; sigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, orient, mqenc, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; sigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, orient, mqenc, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; sigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, orient, mqenc, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; sigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, orient, mqenc, 0); } } if (term) { jpc_mqenc_flush(mqenc, term - 1); } return jpc_mqenc_error(mqenc) ? (-1) : 0; } #define rawsigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, out, vcausalflag) \ { \ jpc_fix_t f = *(fp); \ jpc_fix_t v; \ if ((f & JPC_OTHSIGMSK) && !(f & (JPC_SIG | JPC_VISIT))) { \ v = (abs(*(dp)) & (one)) ? 1 : 0; \ if ((jpc_bitstream_putbit((out), v)) == EOF) { \ return -1; \ } \ if (v) { \ *(nmsedec) += JPC_GETSIGNMSEDEC(abs(*(dp)), (bitpos) + JPC_NUMEXTRABITS); \ v = ((*(dp) < 0) ? 1 : 0); \ if (jpc_bitstream_putbit(out, v) == EOF) { \ return -1; \ } \ JPC_UPDATEFLAGS4(fp, frowstep, v, vcausalflag); \ *(fp) |= JPC_SIG; \ } \ *(fp) |= JPC_VISIT; \ } \ } static int jpc_encrawsigpass(jpc_bitstream_t *out, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec) { int i; int j; int k; int one; int vscanlen; int width; int height; int frowstep; int drowstep; int fstripestep; int dstripestep; jpc_fix_t *fstripestart; jpc_fix_t *dstripestart; jpc_fix_t *fp; jpc_fix_t *dp; jpc_fix_t *fvscanstart; jpc_fix_t *dvscanstart; *nmsedec = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << (bitpos + JPC_NUMEXTRABITS); fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; rawsigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, out, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; rawsigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, out, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; rawsigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, out, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; rawsigpass_step(fp, frowstep, dp, bitpos, one, nmsedec, out, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; } } if (term) { jpc_bitstream_outalign(out, 0x2a); } return 0; } /******************************************************************************\ * Code for refinement pass. \******************************************************************************/ #define refpass_step(fp, dp, bitpos, one, nmsedec, mqenc, vcausalflag) \ { \ int v; \ if (((*(fp)) & (JPC_SIG | JPC_VISIT)) == JPC_SIG) { \ (d) = *(dp); \ *(nmsedec) += JPC_GETREFNMSEDEC(abs(d), (bitpos) + JPC_NUMEXTRABITS); \ jpc_mqenc_setcurctx((mqenc), JPC_GETMAGCTXNO(*(fp))); \ v = (abs(d) & (one)) ? 1 : 0; \ jpc_mqenc_putbit((mqenc), v); \ *(fp) |= JPC_REFINE; \ } \ } static int jpc_encrefpass(jpc_mqenc_t *mqenc, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec) { int i; int j; int one; int vscanlen; int d; int width; int height; int frowstep; int drowstep; int fstripestep; int dstripestep; jpc_fix_t *fstripestart; jpc_fix_t *dstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dvscanstart; jpc_fix_t *dp; jpc_fix_t *fp; int k; *nmsedec = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << (bitpos + JPC_NUMEXTRABITS); fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; refpass_step(fp, dp, bitpos, one, nmsedec, mqenc, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; refpass_step(fp, dp, bitpos, one, nmsedec, mqenc, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; refpass_step(fp, dp, bitpos, one, nmsedec, mqenc, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; refpass_step(fp, dp, bitpos, one, nmsedec, mqenc, 0); } } if (term) { jpc_mqenc_flush(mqenc, term - 1); } return jpc_mqenc_error(mqenc) ? (-1) : 0; } #define rawrefpass_step(fp, dp, bitpos, one, nmsedec, out, vcausalflag) \ { \ jpc_fix_t d; \ jpc_fix_t v; \ if (((*(fp)) & (JPC_SIG | JPC_VISIT)) == JPC_SIG) { \ d = *(dp); \ *(nmsedec) += JPC_GETREFNMSEDEC(abs(d), (bitpos) + JPC_NUMEXTRABITS); \ v = (abs(d) & (one)) ? 1 : 0; \ if (jpc_bitstream_putbit((out), v) == EOF) { \ return -1; \ } \ *(fp) |= JPC_REFINE; \ } \ } static int jpc_encrawrefpass(jpc_bitstream_t *out, int bitpos, int vcausalflag, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec) { int i; int j; int k; int one; int vscanlen; int width; int height; int frowstep; int drowstep; int fstripestep; int dstripestep; jpc_fix_t *fstripestart; jpc_fix_t *dstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dvscanstart; jpc_fix_t *dp; jpc_fix_t *fp; *nmsedec = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << (bitpos + JPC_NUMEXTRABITS); fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; dp = dvscanstart; k = vscanlen; rawrefpass_step(fp, dp, bitpos, one, nmsedec, out, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; rawrefpass_step(fp, dp, bitpos, one, nmsedec, out, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; rawrefpass_step(fp, dp, bitpos, one, nmsedec, out, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; rawrefpass_step(fp, dp, bitpos, one, nmsedec, out, vcausalflag); } } if (term) { jpc_bitstream_outalign(out, 0x2a); } return 0; } /******************************************************************************\ * Code for cleanup pass. \******************************************************************************/ #define clnpass_step(fp, frowstep, dp, bitpos, one, orient, nmsedec, mqenc, label1, label2, vcausalflag) \ { \ int f; \ int v; \ label1 \ f = *(fp); \ if (!(f & (JPC_SIG | JPC_VISIT))) { \ jpc_mqenc_setcurctx(mqenc, JPC_GETZCCTXNO(f, (orient))); \ v = (abs(*(dp)) & (one)) ? 1 : 0; \ jpc_mqenc_putbit((mqenc), v); \ if (v) { \ label2 \ f = *(fp); \ /* Coefficient is significant. */ \ *(nmsedec) += JPC_GETSIGNMSEDEC(abs(*(dp)), (bitpos) + JPC_NUMEXTRABITS); \ jpc_mqenc_setcurctx((mqenc), JPC_GETSCCTXNO(f)); \ v = ((*(dp) < 0) ? 1 : 0); \ jpc_mqenc_putbit((mqenc), v ^ JPC_GETSPB(f)); \ JPC_UPDATEFLAGS4((fp), (frowstep), v, vcausalflag); \ *(fp) |= JPC_SIG; \ } \ } \ *(fp) &= ~JPC_VISIT; \ } static int jpc_encclnpass(jpc_mqenc_t *mqenc, int bitpos, int orient, int vcausalflag, int segsymflag, jas_matrix_t *flags, jas_matrix_t *data, int term, long *nmsedec) { int i; int j; int k; int vscanlen; int v; int runlen; jpc_fix_t *fp; int width; int height; jpc_fix_t *dp; int one; int frowstep; int drowstep; int fstripestep; int dstripestep; jpc_fix_t *fstripestart; jpc_fix_t *dstripestart; jpc_fix_t *fvscanstart; jpc_fix_t *dvscanstart; *nmsedec = 0; width = jas_matrix_numcols(data); height = jas_matrix_numrows(data); frowstep = jas_matrix_rowstep(flags); drowstep = jas_matrix_rowstep(data); fstripestep = frowstep << 2; dstripestep = drowstep << 2; one = 1 << (bitpos + JPC_NUMEXTRABITS); fstripestart = jas_matrix_getref(flags, 1, 1); dstripestart = jas_matrix_getref(data, 0, 0); for (i = height; i > 0; i -= 4, fstripestart += fstripestep, dstripestart += dstripestep) { fvscanstart = fstripestart; dvscanstart = dstripestart; vscanlen = JAS_MIN(i, 4); for (j = width; j > 0; --j, ++fvscanstart, ++dvscanstart) { fp = fvscanstart; if (vscanlen >= 4 && !((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK)) && (fp += frowstep, !((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK))) && (fp += frowstep, !((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK))) && (fp += frowstep, !((*fp) & (JPC_SIG | JPC_VISIT | JPC_OTHSIGMSK)))) { dp = dvscanstart; for (k = 0; k < vscanlen; ++k) { v = (abs(*dp) & one) ? 1 : 0; if (v) { break; } dp += drowstep; } runlen = k; if (runlen >= 4) { jpc_mqenc_setcurctx(mqenc, JPC_AGGCTXNO); jpc_mqenc_putbit(mqenc, 0); continue; } jpc_mqenc_setcurctx(mqenc, JPC_AGGCTXNO); jpc_mqenc_putbit(mqenc, 1); jpc_mqenc_setcurctx(mqenc, JPC_UCTXNO); jpc_mqenc_putbit(mqenc, runlen >> 1); jpc_mqenc_putbit(mqenc, runlen & 1); fp = fvscanstart + frowstep * runlen; dp = dvscanstart + drowstep * runlen; k = vscanlen - runlen; switch (runlen) { case 0: goto clnpass_partial0; break; case 1: goto clnpass_partial1; break; case 2: goto clnpass_partial2; break; case 3: goto clnpass_partial3; break; } } else { runlen = 0; fp = fvscanstart; dp = dvscanstart; k = vscanlen; goto clnpass_full0; } clnpass_step(fp, frowstep, dp, bitpos, one, orient, nmsedec, mqenc, clnpass_full0:, clnpass_partial0:, vcausalflag); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; clnpass_step(fp, frowstep, dp, bitpos, one, orient, nmsedec, mqenc, ;, clnpass_partial1:, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; clnpass_step(fp, frowstep, dp, bitpos, one, orient, nmsedec, mqenc, ;, clnpass_partial2:, 0); if (--k <= 0) { continue; } fp += frowstep; dp += drowstep; clnpass_step(fp, frowstep, dp, bitpos, one, orient, nmsedec, mqenc, ;, clnpass_partial3:, 0); } } if (segsymflag) { jpc_mqenc_setcurctx(mqenc, JPC_UCTXNO); jpc_mqenc_putbit(mqenc, 1); jpc_mqenc_putbit(mqenc, 0); jpc_mqenc_putbit(mqenc, 1); jpc_mqenc_putbit(mqenc, 0); } if (term) { jpc_mqenc_flush(mqenc, term - 1); } return jpc_mqenc_error(mqenc) ? (-1) : 0; } jasper-1.900.1/src/libjasper/jpc/jpc_math.c0000644000175000017500000001026510554235553017416 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Math Library * * $Id$ */ /******************************************************************************\ * Includes \******************************************************************************/ #include #include #include #include #include #include #include "jpc_math.h" /******************************************************************************\ * Miscellaneous Functions \******************************************************************************/ /* Calculate the integer quantity floor(log2(x)), where x is a positive integer. */ int jpc_floorlog2(int x) { int y; /* The argument must be positive. */ assert(x > 0); y = 0; while (x > 1) { x >>= 1; ++y; } return y; } /* Calculate the bit position of the first leading one in a nonnegative integer. */ /* This function is the basically the same as ceillog2(x), except that the allowable range for x is slightly different. */ int jpc_firstone(int x) { int n; /* The argument must be nonnegative. */ assert(x >= 0); n = -1; while (x > 0) { x >>= 1; ++n; } return n; } jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c0000644000175000017500000004230410554235553017477 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tier 2 Encoder * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_fix.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" #include "jasper/jas_debug.h" #include "jpc_flt.h" #include "jpc_t2enc.h" #include "jpc_t2cod.h" #include "jpc_tagtree.h" #include "jpc_enc.h" #include "jpc_math.h" /******************************************************************************\ * Code. \******************************************************************************/ static int jpc_putcommacode(jpc_bitstream_t *out, int n) { assert(n >= 0); while (--n >= 0) { if (jpc_bitstream_putbit(out, 1) == EOF) { return -1; } } if (jpc_bitstream_putbit(out, 0) == EOF) { return -1; } return 0; } static int jpc_putnumnewpasses(jpc_bitstream_t *out, int n) { int ret; if (n <= 0) { return -1; } else if (n == 1) { ret = jpc_bitstream_putbit(out, 0); } else if (n == 2) { ret = jpc_bitstream_putbits(out, 2, 2); } else if (n <= 5) { ret = jpc_bitstream_putbits(out, 4, 0xc | (n - 3)); } else if (n <= 36) { ret = jpc_bitstream_putbits(out, 9, 0x1e0 | (n - 6)); } else if (n <= 164) { ret = jpc_bitstream_putbits(out, 16, 0xff80 | (n - 37)); } else { /* The standard has no provision for encoding a larger value. In practice, however, it is highly unlikely that this limitation will ever be encountered. */ return -1; } return (ret != EOF) ? 0 : (-1); } int jpc_enc_encpkts(jpc_enc_t *enc, jas_stream_t *out) { jpc_enc_tile_t *tile; jpc_pi_t *pi; tile = enc->curtile; jpc_init_t2state(enc, 0); pi = tile->pi; jpc_pi_init(pi); if (!jpc_pi_next(pi)) { for (;;) { if (jpc_enc_encpkt(enc, out, jpc_pi_cmptno(pi), jpc_pi_rlvlno(pi), jpc_pi_prcno(pi), jpc_pi_lyrno(pi))) { return -1; } if (jpc_pi_next(pi)) { break; } } } return 0; } int jpc_enc_encpkt(jpc_enc_t *enc, jas_stream_t *out, int compno, int lvlno, int prcno, int lyrno) { jpc_enc_tcmpt_t *comp; jpc_enc_rlvl_t *lvl; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_cblk_t *cblk; jpc_enc_cblk_t *endcblks; jpc_bitstream_t *outb; jpc_enc_pass_t *pass; jpc_enc_pass_t *startpass; jpc_enc_pass_t *lastpass; jpc_enc_pass_t *endpass; jpc_enc_pass_t *endpasses; int i; int included; int ret; jpc_tagtreenode_t *leaf; int n; int t1; int t2; int adjust; int maxadjust; int datalen; int numnewpasses; int passcount; jpc_enc_tile_t *tile; jpc_enc_prc_t *prc; jpc_enc_cp_t *cp; jpc_ms_t *ms; tile = enc->curtile; cp = enc->cp; if (cp->tcp.csty & JPC_COD_SOP) { if (!(ms = jpc_ms_create(JPC_MS_SOP))) { return -1; } ms->parms.sop.seqno = jpc_pi_getind(tile->pi); if (jpc_putms(out, enc->cstate, ms)) { return -1; } jpc_ms_destroy(ms); } outb = jpc_bitstream_sopen(out, "w+"); assert(outb); if (jpc_bitstream_putbit(outb, 1) == EOF) { return -1; } JAS_DBGLOG(10, ("\n")); JAS_DBGLOG(10, ("present. ")); comp = &tile->tcmpts[compno]; lvl = &comp->rlvls[lvlno]; endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } prc = &band->prcs[prcno]; if (!prc->cblks) { continue; } endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { if (!lyrno) { leaf = jpc_tagtree_getleaf(prc->nlibtree, cblk - prc->cblks); jpc_tagtree_setvalue(prc->nlibtree, leaf, cblk->numimsbs); } pass = cblk->curpass; included = (pass && pass->lyrno == lyrno); if (included && (!cblk->numencpasses)) { assert(pass->lyrno == lyrno); leaf = jpc_tagtree_getleaf(prc->incltree, cblk - prc->cblks); jpc_tagtree_setvalue(prc->incltree, leaf, pass->lyrno); } } endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { pass = cblk->curpass; included = (pass && pass->lyrno == lyrno); if (!cblk->numencpasses) { leaf = jpc_tagtree_getleaf(prc->incltree, cblk - prc->cblks); if (jpc_tagtree_encode(prc->incltree, leaf, lyrno + 1, outb) < 0) { return -1; } } else { if (jpc_bitstream_putbit(outb, included) == EOF) { return -1; } } JAS_DBGLOG(10, ("included=%d ", included)); if (!included) { continue; } if (!cblk->numencpasses) { i = 1; leaf = jpc_tagtree_getleaf(prc->nlibtree, cblk - prc->cblks); for (;;) { if ((ret = jpc_tagtree_encode(prc->nlibtree, leaf, i, outb)) < 0) { return -1; } if (ret) { break; } ++i; } assert(leaf->known_ && i == leaf->value_ + 1); } endpasses = &cblk->passes[cblk->numpasses]; startpass = pass; endpass = startpass; while (endpass != endpasses && endpass->lyrno == lyrno){ ++endpass; } numnewpasses = endpass - startpass; if (jpc_putnumnewpasses(outb, numnewpasses)) { return -1; } JAS_DBGLOG(10, ("numnewpasses=%d ", numnewpasses)); lastpass = endpass - 1; n = startpass->start; passcount = 1; maxadjust = 0; for (pass = startpass; pass != endpass; ++pass) { if (pass->term || pass == lastpass) { datalen = pass->end - n; t1 = jpc_firstone(datalen) + 1; t2 = cblk->numlenbits + jpc_floorlog2(passcount); adjust = JAS_MAX(t1 - t2, 0); maxadjust = JAS_MAX(adjust, maxadjust); n += datalen; passcount = 1; } else { ++passcount; } } if (jpc_putcommacode(outb, maxadjust)) { return -1; } cblk->numlenbits += maxadjust; lastpass = endpass - 1; n = startpass->start; passcount = 1; for (pass = startpass; pass != endpass; ++pass) { if (pass->term || pass == lastpass) { datalen = pass->end - n; assert(jpc_firstone(datalen) < cblk->numlenbits + jpc_floorlog2(passcount)); if (jpc_bitstream_putbits(outb, cblk->numlenbits + jpc_floorlog2(passcount), datalen) == EOF) { return -1; } n += datalen; passcount = 1; } else { ++passcount; } } } } jpc_bitstream_outalign(outb, 0); jpc_bitstream_close(outb); if (cp->tcp.csty & JPC_COD_EPH) { if (!(ms = jpc_ms_create(JPC_MS_EPH))) { return -1; } jpc_putms(out, enc->cstate, ms); jpc_ms_destroy(ms); } comp = &tile->tcmpts[compno]; lvl = &comp->rlvls[lvlno]; endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } prc = &band->prcs[prcno]; if (!prc->cblks) { continue; } endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { pass = cblk->curpass; if (!pass) { continue; } if (pass->lyrno != lyrno) { assert(pass->lyrno < 0 || pass->lyrno > lyrno); continue; } endpasses = &cblk->passes[cblk->numpasses]; startpass = pass; endpass = startpass; while (endpass != endpasses && endpass->lyrno == lyrno){ ++endpass; } lastpass = endpass - 1; numnewpasses = endpass - startpass; jas_stream_seek(cblk->stream, startpass->start, SEEK_SET); assert(jas_stream_tell(cblk->stream) == startpass->start); if (jas_stream_copy(out, cblk->stream, lastpass->end - startpass->start)) { return -1; } cblk->curpass = (endpass != endpasses) ? endpass : 0; cblk->numencpasses += numnewpasses; } } return 0; } void jpc_save_t2state(jpc_enc_t *enc) { /* stream pos in embedded T1 stream may be wrong since not saved/restored! */ jpc_enc_tcmpt_t *comp; jpc_enc_tcmpt_t *endcomps; jpc_enc_rlvl_t *lvl; jpc_enc_rlvl_t *endlvls; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_cblk_t *cblk; jpc_enc_cblk_t *endcblks; jpc_enc_tile_t *tile; int prcno; jpc_enc_prc_t *prc; tile = enc->curtile; endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < lvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } jpc_tagtree_copy(prc->savincltree, prc->incltree); jpc_tagtree_copy(prc->savnlibtree, prc->nlibtree); endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { cblk->savedcurpass = cblk->curpass; cblk->savednumencpasses = cblk->numencpasses; cblk->savednumlenbits = cblk->numlenbits; } } } } } } void jpc_restore_t2state(jpc_enc_t *enc) { jpc_enc_tcmpt_t *comp; jpc_enc_tcmpt_t *endcomps; jpc_enc_rlvl_t *lvl; jpc_enc_rlvl_t *endlvls; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_cblk_t *cblk; jpc_enc_cblk_t *endcblks; jpc_enc_tile_t *tile; int prcno; jpc_enc_prc_t *prc; tile = enc->curtile; endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < lvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } jpc_tagtree_copy(prc->incltree, prc->savincltree); jpc_tagtree_copy(prc->nlibtree, prc->savnlibtree); endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { cblk->curpass = cblk->savedcurpass; cblk->numencpasses = cblk->savednumencpasses; cblk->numlenbits = cblk->savednumlenbits; } } } } } } void jpc_init_t2state(jpc_enc_t *enc, int raflag) { /* It is assumed that band->numbps and cblk->numbps precomputed */ jpc_enc_tcmpt_t *comp; jpc_enc_tcmpt_t *endcomps; jpc_enc_rlvl_t *lvl; jpc_enc_rlvl_t *endlvls; jpc_enc_band_t *band; jpc_enc_band_t *endbands; jpc_enc_cblk_t *cblk; jpc_enc_cblk_t *endcblks; jpc_enc_pass_t *pass; jpc_enc_pass_t *endpasses; jpc_tagtreenode_t *leaf; jpc_enc_tile_t *tile; int prcno; jpc_enc_prc_t *prc; tile = enc->curtile; endcomps = &tile->tcmpts[tile->numtcmpts]; for (comp = tile->tcmpts; comp != endcomps; ++comp) { endlvls = &comp->rlvls[comp->numrlvls]; for (lvl = comp->rlvls; lvl != endlvls; ++lvl) { if (!lvl->bands) { continue; } endbands = &lvl->bands[lvl->numbands]; for (band = lvl->bands; band != endbands; ++band) { if (!band->data) { continue; } for (prcno = 0, prc = band->prcs; prcno < lvl->numprcs; ++prcno, ++prc) { if (!prc->cblks) { continue; } jpc_tagtree_reset(prc->incltree); jpc_tagtree_reset(prc->nlibtree); endcblks = &prc->cblks[prc->numcblks]; for (cblk = prc->cblks; cblk != endcblks; ++cblk) { if (jas_stream_rewind(cblk->stream)) { assert(0); } cblk->curpass = (cblk->numpasses > 0) ? cblk->passes : 0; cblk->numencpasses = 0; cblk->numlenbits = 3; cblk->numimsbs = band->numbps - cblk->numbps; assert(cblk->numimsbs >= 0); leaf = jpc_tagtree_getleaf(prc->nlibtree, cblk - prc->cblks); jpc_tagtree_setvalue(prc->nlibtree, leaf, cblk->numimsbs); if (raflag) { endpasses = &cblk->passes[cblk->numpasses]; for (pass = cblk->passes; pass != endpasses; ++pass) { pass->lyrno = -1; pass->lyrno = 0; } } } } } } } } jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile) { jpc_pi_t *pi; int compno; jpc_picomp_t *picomp; jpc_pirlvl_t *pirlvl; jpc_enc_tcmpt_t *tcomp; int rlvlno; jpc_enc_rlvl_t *rlvl; int prcno; int *prclyrno; if (!(pi = jpc_pi_create0())) { return 0; } pi->pktno = -1; pi->numcomps = cp->numcmpts; if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) { jpc_pi_destroy(pi); return 0; } for (compno = 0, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++picomp) { picomp->pirlvls = 0; } for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++tcomp, ++picomp) { picomp->numrlvls = tcomp->numrlvls; if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls * sizeof(jpc_pirlvl_t)))) { jpc_pi_destroy(pi); return 0; } for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl) { pirlvl->prclyrnos = 0; } for (rlvlno = 0, pirlvl = picomp->pirlvls, rlvl = tcomp->rlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) { /* XXX sizeof(long) should be sizeof different type */ pirlvl->numprcs = rlvl->numprcs; if (rlvl->numprcs) { if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs * sizeof(long)))) { jpc_pi_destroy(pi); return 0; } } else { pirlvl->prclyrnos = 0; } } } pi->maxrlvls = 0; for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps; compno < pi->numcomps; ++compno, ++tcomp, ++picomp) { picomp->hsamp = cp->ccps[compno].sampgrdstepx; picomp->vsamp = cp->ccps[compno].sampgrdstepy; for (rlvlno = 0, pirlvl = picomp->pirlvls, rlvl = tcomp->rlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) { pirlvl->prcwidthexpn = rlvl->prcwidthexpn; pirlvl->prcheightexpn = rlvl->prcheightexpn; for (prcno = 0, prclyrno = pirlvl->prclyrnos; prcno < pirlvl->numprcs; ++prcno, ++prclyrno) { *prclyrno = 0; } pirlvl->numhprcs = rlvl->numhprcs; } if (pi->maxrlvls < tcomp->numrlvls) { pi->maxrlvls = tcomp->numrlvls; } } pi->numlyrs = tile->numlyrs; pi->xstart = tile->tlx; pi->ystart = tile->tly; pi->xend = tile->brx; pi->yend = tile->bry; pi->picomp = 0; pi->pirlvl = 0; pi->x = 0; pi->y = 0; pi->compno = 0; pi->rlvlno = 0; pi->prcno = 0; pi->lyrno = 0; pi->xstep = 0; pi->ystep = 0; pi->pchgno = -1; pi->defaultpchg.prgord = tile->prg; pi->defaultpchg.compnostart = 0; pi->defaultpchg.compnoend = pi->numcomps; pi->defaultpchg.rlvlnostart = 0; pi->defaultpchg.rlvlnoend = pi->maxrlvls; pi->defaultpchg.lyrnoend = pi->numlyrs; pi->pchg = 0; pi->valid = 0; return pi; } jasper-1.900.1/src/libjasper/ras/0000755000175000017500000000000010554237065015472 5ustar ernieerniejasper-1.900.1/src/libjasper/ras/Makefile.in0000644000175000017500000004105110554237047017540 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/ras DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libras_la_LIBADD = am_libras_la_OBJECTS = ras_cod.lo ras_dec.lo ras_enc.lo libras_la_OBJECTS = $(am_libras_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libras_la_SOURCES) DIST_SOURCES = $(libras_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ noinst_LTLIBRARIES = libras.la libras_la_SOURCES = \ ras_cod.h \ ras_enc.h \ ras_cod.c \ ras_dec.c \ ras_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/ras/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libras.la: $(libras_la_OBJECTS) $(libras_la_DEPENDENCIES) $(LINK) $(libras_la_LDFLAGS) $(libras_la_OBJECTS) $(libras_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ras_cod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ras_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ras_enc.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/ras/ras_cod.h0000644000175000017500000001253510554235550017260 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Sun Rasterfile Library * * $Id$ */ /******************************************************************************\ * Sun Rasterfile \******************************************************************************/ #ifndef RAS_COD_H #define RAS_COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" /******************************************************************************\ * Constants. \******************************************************************************/ #define RAS_MAGIC 0x59a66a95 #define RAS_MAGICLEN 4 #define RAS_TYPE_OLD 0 #define RAS_TYPE_STD 1 #define RAS_TYPE_RLE 2 #define RAS_MT_NONE 0 #define RAS_MT_EQUALRGB 1 #define RAS_MT_RAW 2 /******************************************************************************\ * Types. \******************************************************************************/ /* Sun Rasterfile header. */ typedef struct { int_fast32_t magic; /* signature */ int_fast32_t width; /* width of image (in pixels) */ int_fast32_t height; /* height of image (in pixels) */ int_fast32_t depth; /* number of bits per pixel */ int_fast32_t length; /* length of image data (in bytes) */ int_fast32_t type; /* format of image data */ int_fast32_t maptype; /* colormap type */ int_fast32_t maplength; /* length of colormap data (in bytes) */ } ras_hdr_t; #define RAS_CMAP_MAXSIZ 256 /* Color map. */ typedef struct { int len; /* The number of entries in the color map. */ int data[RAS_CMAP_MAXSIZ]; /* The color map data. */ } ras_cmap_t; /******************************************************************************\ * Macros. \******************************************************************************/ #define RAS_GETBLUE(x) (((x) >> 16) & 0xff) #define RAS_GETGREEN(x) (((x) >> 8) & 0xff) #define RAS_GETRED(x) ((x) & 0xff) #define RAS_BLUE(x) (((x) & 0xff) << 16) #define RAS_GREEN(x) (((x) & 0xff) << 8) #define RAS_RED(x) ((x) & 0xff) #define RAS_ROWSIZE(hdr) \ ((((hdr)->width * (hdr)->depth + 15) / 16) * 2) #define RAS_ISRGB(hdr) \ ((hdr)->depth == 24 || (hdr)->depth == 32) #define RAS_ONES(n) \ (((n) == 32) ? 0xffffffffUL : ((1UL << (n)) - 1)) #endif jasper-1.900.1/src/libjasper/ras/ras_dec.c0000644000175000017500000002460410554235550017241 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Sun Rasterfile Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_debug.h" #include "ras_cod.h" /******************************************************************************\ * Prototypes. \******************************************************************************/ static int ras_gethdr(jas_stream_t *in, ras_hdr_t *hdr); static int ras_getint(jas_stream_t *in, int_fast32_t *val); static int ras_getdata(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap, jas_image_t *image); static int ras_getdatastd(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap, jas_image_t *image); static int ras_getcmap(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap); /******************************************************************************\ * Code. \******************************************************************************/ jas_image_t *ras_decode(jas_stream_t *in, char *optstr) { ras_hdr_t hdr; ras_cmap_t cmap; jas_image_t *image; jas_image_cmptparm_t cmptparms[3]; jas_image_cmptparm_t *cmptparm; int clrspc; int numcmpts; int i; if (optstr) { jas_eprintf("warning: ignoring RAS decoder options\n"); } /* Read the header. */ if (ras_gethdr(in, &hdr)) { return 0; } /* Does the header information look reasonably sane? */ if (hdr.magic != RAS_MAGIC || hdr.width <= 0 || hdr.height <= 0 || hdr.depth <= 0 || hdr.depth > 32) { return 0; } /* In the case of the old format, do not rely on the length field being properly specified. Calculate the quantity from scratch. */ if (hdr.type == RAS_TYPE_OLD) { hdr.length = RAS_ROWSIZE(&hdr) * hdr.height; } /* Calculate some quantities needed for creation of the image object. */ if (RAS_ISRGB(&hdr)) { clrspc = JAS_CLRSPC_SRGB; numcmpts = 3; } else { clrspc = JAS_CLRSPC_SGRAY; numcmpts = 1; } for (i = 0, cmptparm = cmptparms; i < numcmpts; ++i, ++cmptparm) { cmptparm->tlx = 0; cmptparm->tly = 0; cmptparm->hstep = 1; cmptparm->vstep = 1; cmptparm->width = hdr.width; cmptparm->height = hdr.height; cmptparm->prec = RAS_ISRGB(&hdr) ? 8 : hdr.depth; cmptparm->sgnd = false; } /* Create the image object. */ if (!(image = jas_image_create(numcmpts, cmptparms, JAS_CLRSPC_UNKNOWN))) { return 0; } /* Read the color map (if there is one). */ if (ras_getcmap(in, &hdr, &cmap)) { jas_image_destroy(image); return 0; } /* Read the pixel data. */ if (ras_getdata(in, &hdr, &cmap, image)) { jas_image_destroy(image); return 0; } jas_image_setclrspc(image, clrspc); if (clrspc == JAS_CLRSPC_SRGB) { jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); jas_image_setcmpttype(image, 1, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); jas_image_setcmpttype(image, 2, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); } else { jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); } return image; } int ras_validate(jas_stream_t *in) { uchar buf[RAS_MAGICLEN]; int i; int n; uint_fast32_t magic; assert(JAS_STREAM_MAXPUTBACK >= RAS_MAGICLEN); /* Read the validation data (i.e., the data used for detecting the format). */ if ((n = jas_stream_read(in, buf, RAS_MAGICLEN)) < 0) { return -1; } /* Put the validation data back onto the stream, so that the stream position will not be changed. */ for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } /* Did we read enough data? */ if (n < RAS_MAGICLEN) { return -1; } magic = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; /* Is the signature correct for the Sun Rasterfile format? */ if (magic != RAS_MAGIC) { return -1; } return 0; } static int ras_getdata(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap, jas_image_t *image) { int ret; switch (hdr->type) { case RAS_TYPE_OLD: case RAS_TYPE_STD: ret = ras_getdatastd(in, hdr, cmap, image); break; case RAS_TYPE_RLE: jas_eprintf("error: RLE encoding method not supported\n"); ret = -1; break; default: jas_eprintf("error: encoding method not supported\n"); ret = -1; break; } return ret; } static int ras_getdatastd(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap, jas_image_t *image) { int pad; int nz; int z; int c; int y; int x; int v; int i; jas_matrix_t *data[3]; /* Note: This function does not properly handle images with a colormap. */ /* Avoid compiler warnings about unused parameters. */ cmap = 0; for (i = 0; i < jas_image_numcmpts(image); ++i) { data[i] = jas_matrix_create(1, jas_image_width(image)); assert(data[i]); } pad = RAS_ROWSIZE(hdr) - (hdr->width * hdr->depth + 7) / 8; for (y = 0; y < hdr->height; y++) { nz = 0; z = 0; for (x = 0; x < hdr->width; x++) { while (nz < hdr->depth) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } z = (z << 8) | c; nz += 8; } v = (z >> (nz - hdr->depth)) & RAS_ONES(hdr->depth); z &= RAS_ONES(nz - hdr->depth); nz -= hdr->depth; if (jas_image_numcmpts(image) == 3) { jas_matrix_setv(data[0], x, (RAS_GETRED(v))); jas_matrix_setv(data[1], x, (RAS_GETGREEN(v))); jas_matrix_setv(data[2], x, (RAS_GETBLUE(v))); } else { jas_matrix_setv(data[0], x, (v)); } } if (pad) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } } for (i = 0; i < jas_image_numcmpts(image); ++i) { if (jas_image_writecmpt(image, i, 0, y, hdr->width, 1, data[i])) { return -1; } } } for (i = 0; i < jas_image_numcmpts(image); ++i) { jas_matrix_destroy(data[i]); } return 0; } static int ras_getcmap(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap) { int i; int j; int x; int c; int numcolors; int actualnumcolors; switch (hdr->maptype) { case RAS_MT_NONE: break; case RAS_MT_EQUALRGB: { jas_eprintf("warning: palettized images not fully supported\n"); numcolors = 1 << hdr->depth; assert(numcolors <= RAS_CMAP_MAXSIZ); actualnumcolors = hdr->maplength / 3; for (i = 0; i < numcolors; i++) { cmap->data[i] = 0; } if ((hdr->maplength % 3) || hdr->maplength < 0 || hdr->maplength > 3 * numcolors) { return -1; } for (i = 0; i < 3; i++) { for (j = 0; j < actualnumcolors; j++) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } x = 0; switch (i) { case 0: x = RAS_RED(c); break; case 1: x = RAS_GREEN(c); break; case 2: x = RAS_BLUE(c); break; } cmap->data[j] |= x; } } } break; default: return -1; break; } return 0; } static int ras_gethdr(jas_stream_t *in, ras_hdr_t *hdr) { if (ras_getint(in, &hdr->magic) || ras_getint(in, &hdr->width) || ras_getint(in, &hdr->height) || ras_getint(in, &hdr->depth) || ras_getint(in, &hdr->length) || ras_getint(in, &hdr->type) || ras_getint(in, &hdr->maptype) || ras_getint(in, &hdr->maplength)) { return -1; } if (hdr->magic != RAS_MAGIC) { return -1; } return 0; } static int ras_getint(jas_stream_t *in, int_fast32_t *val) { int x; int c; int i; x = 0; for (i = 0; i < 4; i++) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } x = (x << 8) | (c & 0xff); } *val = x; return 0; } jasper-1.900.1/src/libjasper/ras/ras_cod.c0000644000175000017500000000636510554235550017257 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Sun Rasterfile Library * * $Id$ */ /* Note: There is not currently any code common to both the encoder and decoder. */ /* Keep picky compilers happy. */ int ras_dummy; jasper-1.900.1/src/libjasper/ras/ras_enc.h0000644000175000017500000000611210554235550017252 0ustar ernieernie/* * Copyright (c) 2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef RAS_ENC_H #define RAS_ENC_H typedef struct { int numcmpts; int cmpts[4]; } ras_enc_t; #endif jasper-1.900.1/src/libjasper/ras/Makefile.am0000644000175000017500000000611210554235550017523 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ noinst_LTLIBRARIES = libras.la libras_la_SOURCES = \ ras_cod.h \ ras_enc.h \ ras_cod.c \ ras_dec.c \ ras_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/ras/ras_enc.c0000644000175000017500000002231610554235550017251 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Sun Rasterfile Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_image.h" #include "jasper/jas_stream.h" #include "jasper/jas_debug.h" #include "ras_cod.h" #include "ras_enc.h" /******************************************************************************\ * Prototypes. \******************************************************************************/ static int ras_puthdr(jas_stream_t *out, ras_hdr_t *hdr); static int ras_putint(jas_stream_t *out, int val); static int ras_putdata(jas_stream_t *out, ras_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts); static int ras_putdatastd(jas_stream_t *out, ras_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts); /******************************************************************************\ * Code. \******************************************************************************/ int ras_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { int_fast32_t width; int_fast32_t height; int_fast32_t depth; int cmptno; #if 0 uint_fast16_t numcmpts; #endif int i; ras_hdr_t hdr; int rowsize; ras_enc_t encbuf; ras_enc_t *enc = &encbuf; if (optstr) { jas_eprintf("warning: ignoring RAS encoder options\n"); } switch (jas_clrspc_fam(jas_image_clrspc(image))) { case JAS_CLRSPC_FAM_RGB: if (jas_image_clrspc(image) != JAS_CLRSPC_SRGB) jas_eprintf("warning: inaccurate color\n"); enc->numcmpts = 3; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R))) < 0 || (enc->cmpts[1] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G))) < 0 || (enc->cmpts[2] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B))) < 0) { jas_eprintf("error: missing color component\n"); return -1; } break; case JAS_CLRSPC_FAM_GRAY: if (jas_image_clrspc(image) != JAS_CLRSPC_SGRAY) jas_eprintf("warning: inaccurate color\n"); enc->numcmpts = 1; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y))) < 0) { jas_eprintf("error: missing color component\n"); return -1; } break; default: jas_eprintf("error: unsupported color space\n"); return -1; break; } width = jas_image_cmptwidth(image, enc->cmpts[0]); height = jas_image_cmptheight(image, enc->cmpts[0]); depth = jas_image_cmptprec(image, enc->cmpts[0]); for (cmptno = 0; cmptno < enc->numcmpts; ++cmptno) { if (jas_image_cmptwidth(image, enc->cmpts[cmptno]) != width || jas_image_cmptheight(image, enc->cmpts[cmptno]) != height || jas_image_cmptprec(image, enc->cmpts[cmptno]) != depth || jas_image_cmptsgnd(image, enc->cmpts[cmptno]) != false || jas_image_cmpttlx(image, enc->cmpts[cmptno]) != 0 || jas_image_cmpttly(image, enc->cmpts[cmptno]) != 0) { jas_eprintf("The RAS format cannot be used to represent an image with this geometry.\n"); return -1; } } /* Ensure that the image can be encoded in the desired format. */ if (enc->numcmpts == 3) { /* All three components must have the same subsampling factor and have a precision of eight bits. */ if (enc->numcmpts > 1) { for (i = 0; i < enc->numcmpts; ++i) { if (jas_image_cmptprec(image, enc->cmpts[i]) != 8) { return -1; } } } } else if (enc->numcmpts == 1) { /* NOP */ } else { return -1; } hdr.magic = RAS_MAGIC; hdr.width = width; hdr.height = height; hdr.depth = (enc->numcmpts == 3) ? 24 : depth; rowsize = RAS_ROWSIZE(&hdr); hdr.length = rowsize * hdr.height; hdr.type = RAS_TYPE_STD; hdr.maptype = RAS_MT_NONE; hdr.maplength = 0; if (ras_puthdr(out, &hdr)) { return -1; } if (ras_putdata(out, &hdr, image, enc->numcmpts, enc->cmpts)) { return -1; } return 0; } static int ras_putdata(jas_stream_t *out, ras_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts) { int ret; switch (hdr->type) { case RAS_TYPE_STD: ret = ras_putdatastd(out, hdr, image, numcmpts, cmpts); break; default: ret = -1; break; } return ret; } static int ras_putdatastd(jas_stream_t *out, ras_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts) { int rowsize; int pad; unsigned int z; int nz; int c; int x; int y; int v; jas_matrix_t *data[3]; int i; for (i = 0; i < numcmpts; ++i) { data[i] = jas_matrix_create(jas_image_height(image), jas_image_width(image)); assert(data[i]); } rowsize = RAS_ROWSIZE(hdr); pad = rowsize - (hdr->width * hdr->depth + 7) / 8; hdr->length = hdr->height * rowsize; for (y = 0; y < hdr->height; y++) { for (i = 0; i < numcmpts; ++i) { jas_image_readcmpt(image, cmpts[i], 0, y, jas_image_width(image), 1, data[i]); } z = 0; nz = 0; for (x = 0; x < hdr->width; x++) { z <<= hdr->depth; if (RAS_ISRGB(hdr)) { v = RAS_RED((jas_matrix_getv(data[0], x))) | RAS_GREEN((jas_matrix_getv(data[1], x))) | RAS_BLUE((jas_matrix_getv(data[2], x))); } else { v = (jas_matrix_getv(data[0], x)); } z |= v & RAS_ONES(hdr->depth); nz += hdr->depth; while (nz >= 8) { c = (z >> (nz - 8)) & 0xff; if (jas_stream_putc(out, c) == EOF) { return -1; } nz -= 8; z &= RAS_ONES(nz); } } if (nz > 0) { c = (z >> (8 - nz)) & RAS_ONES(nz); if (jas_stream_putc(out, c) == EOF) { return -1; } } if (pad % 2) { if (jas_stream_putc(out, 0) == EOF) { return -1; } } } for (i = 0; i < numcmpts; ++i) { jas_matrix_destroy(data[i]); } return 0; } static int ras_puthdr(jas_stream_t *out, ras_hdr_t *hdr) { if (ras_putint(out, RAS_MAGIC) || ras_putint(out, hdr->width) || ras_putint(out, hdr->height) || ras_putint(out, hdr->depth) || ras_putint(out, hdr->length) || ras_putint(out, hdr->type) || ras_putint(out, hdr->maptype) || ras_putint(out, hdr->maplength)) { return -1; } return 0; } static int ras_putint(jas_stream_t *out, int val) { int x; int i; int c; x = val; for (i = 0; i < 4; i++) { c = (x >> 24) & 0xff; if (jas_stream_putc(out, c) == EOF) { return -1; } x <<= 8; } return 0; } jasper-1.900.1/src/libjasper/base/0000755000175000017500000000000010554237065015617 5ustar ernieerniejasper-1.900.1/src/libjasper/base/jas_tmr.c0000644000175000017500000001112010554235551017413 0ustar ernieernie/* * Copyright (c) 2004 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Timing Routines * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_tmr.h" /******************************************************************************\ * Code. \******************************************************************************/ #if defined(HAVE_GETTIMEOFDAY) void jas_tmr_start(jas_tmr_t *tmr) { if (gettimeofday(&tmr->start, 0)) { abort(); } } void jas_tmr_stop(jas_tmr_t *tmr) { if (gettimeofday(&tmr->stop, 0)) { abort(); } } double jas_tmr_get(jas_tmr_t *tmr) { double t0; double t1; t0 = ((double) tmr->start.tv_sec) + ((double) tmr->start.tv_usec) / 1e6; t1 = ((double) tmr->stop.tv_sec) + ((double) tmr->stop.tv_usec) / 1e6; return t1 - t0; } #elif defined(HAVE_GETRUSAGE) void jas_tmr_start(jas_tmr_t *tmr) { if (getrusage(RUSAGE_SELF, &tmr->start) < 0) { abort(); } } void jas_tmr_stop(jas_tmr_t *tmr) { if (getrusage(RUSAGE_SELF, &tmr->stop) < 0) { abort(); } } double jas_tmr_get(jas_tmr_t *tmr) { double t; t = ((tmr->stop.ru_utime.tv_sec * 1e6 + tmr->stop.ru_utime.tv_usec) - (tmr->start.ru_utime.tv_sec * 1e6 + tmr->start.ru_utime.tv_usec)) / 1e6; t += ((tmr->stop.ru_stime.tv_sec * 1e6 + tmr->stop.ru_stime.tv_usec) - (tmr->start.ru_stime.tv_sec * 1e6 + tmr->start.ru_stime.tv_usec)) / 1e6; return t; } #else void jas_tmr_start(jas_tmr_t *tmr) { } void jas_tmr_stop(jas_tmr_t *tmr) { } double jas_tmr_get(jas_tmr_t *tmr) { return 0.0; } #endif jasper-1.900.1/src/libjasper/base/jas_seq.c0000644000175000017500000002716010554235551017414 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Sequence/Matrix Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_seq.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" /******************************************************************************\ * Constructors and destructors. \******************************************************************************/ jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend) { jas_matrix_t *matrix; assert(xstart <= xend && ystart <= yend); if (!(matrix = jas_matrix_create(yend - ystart, xend - xstart))) { return 0; } matrix->xstart_ = xstart; matrix->ystart_ = ystart; matrix->xend_ = xend; matrix->yend_ = yend; return matrix; } jas_matrix_t *jas_matrix_create(int numrows, int numcols) { jas_matrix_t *matrix; int i; if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) { return 0; } matrix->flags_ = 0; matrix->numrows_ = numrows; matrix->numcols_ = numcols; matrix->rows_ = 0; matrix->maxrows_ = numrows; matrix->data_ = 0; matrix->datasize_ = numrows * numcols; if (matrix->maxrows_ > 0) { if (!(matrix->rows_ = jas_malloc(matrix->maxrows_ * sizeof(jas_seqent_t *)))) { jas_matrix_destroy(matrix); return 0; } } if (matrix->datasize_ > 0) { if (!(matrix->data_ = jas_malloc(matrix->datasize_ * sizeof(jas_seqent_t)))) { jas_matrix_destroy(matrix); return 0; } } for (i = 0; i < numrows; ++i) { matrix->rows_[i] = &matrix->data_[i * matrix->numcols_]; } for (i = 0; i < matrix->datasize_; ++i) { matrix->data_[i] = 0; } matrix->xstart_ = 0; matrix->ystart_ = 0; matrix->xend_ = matrix->numcols_; matrix->yend_ = matrix->numrows_; return matrix; } void jas_matrix_destroy(jas_matrix_t *matrix) { if (matrix->data_) { assert(!(matrix->flags_ & JAS_MATRIX_REF)); jas_free(matrix->data_); matrix->data_ = 0; } if (matrix->rows_) { jas_free(matrix->rows_); matrix->rows_ = 0; } jas_free(matrix); } jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x) { jas_matrix_t *y; int i; int j; y = jas_seq2d_create(jas_seq2d_xstart(x), jas_seq2d_ystart(x), jas_seq2d_xend(x), jas_seq2d_yend(x)); assert(y); for (i = 0; i < x->numrows_; ++i) { for (j = 0; j < x->numcols_; ++j) { *jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j); } } return y; } jas_matrix_t *jas_matrix_copy(jas_matrix_t *x) { jas_matrix_t *y; int i; int j; y = jas_matrix_create(x->numrows_, x->numcols_); for (i = 0; i < x->numrows_; ++i) { for (j = 0; j < x->numcols_; ++j) { *jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j); } } return y; } /******************************************************************************\ * Bind operations. \******************************************************************************/ void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart, int ystart, int xend, int yend) { jas_matrix_bindsub(s, s1, ystart - s1->ystart_, xstart - s1->xstart_, yend - s1->ystart_ - 1, xend - s1->xstart_ - 1); } void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0, int r1, int c1) { int i; if (mat0->data_) { if (!(mat0->flags_ & JAS_MATRIX_REF)) { jas_free(mat0->data_); } mat0->data_ = 0; mat0->datasize_ = 0; } if (mat0->rows_) { jas_free(mat0->rows_); mat0->rows_ = 0; } mat0->flags_ |= JAS_MATRIX_REF; mat0->numrows_ = r1 - r0 + 1; mat0->numcols_ = c1 - c0 + 1; mat0->maxrows_ = mat0->numrows_; mat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *)); for (i = 0; i < mat0->numrows_; ++i) { mat0->rows_[i] = mat1->rows_[r0 + i] + c0; } mat0->xstart_ = mat1->xstart_ + c0; mat0->ystart_ = mat1->ystart_ + r0; mat0->xend_ = mat0->xstart_ + mat0->numcols_; mat0->yend_ = mat0->ystart_ + mat0->numrows_; } /******************************************************************************\ * Arithmetic operations. \******************************************************************************/ int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1) { int i; int j; if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ != mat1->numcols_) { return 1; } for (i = 0; i < mat0->numrows_; i++) { for (j = 0; j < mat0->numcols_; j++) { if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) { return 1; } } } return 0; } void jas_matrix_divpow2(jas_matrix_t *matrix, int n) { int i; int j; jas_seqent_t *rowstart; int rowstep; jas_seqent_t *data; rowstep = jas_matrix_rowstep(matrix); for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, rowstart += rowstep) { for (j = matrix->numcols_, data = rowstart; j > 0; --j, ++data) { *data = (*data >= 0) ? ((*data) >> n) : (-((-(*data)) >> n)); } } } void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval, jas_seqent_t maxval) { int i; int j; jas_seqent_t v; jas_seqent_t *rowstart; jas_seqent_t *data; int rowstep; rowstep = jas_matrix_rowstep(matrix); for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, rowstart += rowstep) { data = rowstart; for (j = matrix->numcols_, data = rowstart; j > 0; --j, ++data) { v = *data; if (v < minval) { *data = minval; } else if (v > maxval) { *data = maxval; } } } } void jas_matrix_asr(jas_matrix_t *matrix, int n) { int i; int j; jas_seqent_t *rowstart; int rowstep; jas_seqent_t *data; assert(n >= 0); rowstep = jas_matrix_rowstep(matrix); for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, rowstart += rowstep) { for (j = matrix->numcols_, data = rowstart; j > 0; --j, ++data) { *data >>= n; } } } void jas_matrix_asl(jas_matrix_t *matrix, int n) { int i; int j; jas_seqent_t *rowstart; int rowstep; jas_seqent_t *data; rowstep = jas_matrix_rowstep(matrix); for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, rowstart += rowstep) { for (j = matrix->numcols_, data = rowstart; j > 0; --j, ++data) { *data <<= n; } } } /******************************************************************************\ * Code. \******************************************************************************/ int jas_matrix_resize(jas_matrix_t *matrix, int numrows, int numcols) { int size; int i; size = numrows * numcols; if (size > matrix->datasize_ || numrows > matrix->maxrows_) { return -1; } matrix->numrows_ = numrows; matrix->numcols_ = numcols; for (i = 0; i < numrows; ++i) { matrix->rows_[i] = &matrix->data_[numcols * i]; } return 0; } void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val) { int i; int j; jas_seqent_t *rowstart; int rowstep; jas_seqent_t *data; rowstep = jas_matrix_rowstep(matrix); for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, rowstart += rowstep) { for (j = matrix->numcols_, data = rowstart; j > 0; --j, ++data) { *data = val; } } } jas_matrix_t *jas_seq2d_input(FILE *in) { jas_matrix_t *matrix; int i; int j; long x; int numrows; int numcols; int xoff; int yoff; if (fscanf(in, "%d %d", &xoff, &yoff) != 2) return 0; if (fscanf(in, "%d %d", &numcols, &numrows) != 2) return 0; if (!(matrix = jas_seq2d_create(xoff, yoff, xoff + numcols, yoff + numrows))) return 0; if (jas_matrix_numrows(matrix) != numrows || jas_matrix_numcols(matrix) != numcols) { abort(); } /* Get matrix data. */ for (i = 0; i < jas_matrix_numrows(matrix); i++) { for (j = 0; j < jas_matrix_numcols(matrix); j++) { if (fscanf(in, "%ld", &x) != 1) { jas_matrix_destroy(matrix); return 0; } jas_matrix_set(matrix, i, j, JAS_CAST(jas_seqent_t, x)); } } return matrix; } int jas_seq2d_output(jas_matrix_t *matrix, FILE *out) { #define MAXLINELEN 80 int i; int j; jas_seqent_t x; char buf[MAXLINELEN + 1]; char sbuf[MAXLINELEN + 1]; int n; fprintf(out, "%d %d\n", jas_seq2d_xstart(matrix), jas_seq2d_ystart(matrix)); fprintf(out, "%d %d\n", jas_matrix_numcols(matrix), jas_matrix_numrows(matrix)); buf[0] = '\0'; for (i = 0; i < jas_matrix_numrows(matrix); ++i) { for (j = 0; j < jas_matrix_numcols(matrix); ++j) { x = jas_matrix_get(matrix, i, j); sprintf(sbuf, "%s%4ld", (strlen(buf) > 0) ? " " : "", JAS_CAST(long, x)); n = strlen(buf); if (n + strlen(sbuf) > MAXLINELEN) { fputs(buf, out); fputs("\n", out); buf[0] = '\0'; } strcat(buf, sbuf); if (j == jas_matrix_numcols(matrix) - 1) { fputs(buf, out); fputs("\n", out); buf[0] = '\0'; } } } fputs(buf, out); return 0; } jasper-1.900.1/src/libjasper/base/Makefile.in0000644000175000017500000004322210554237045017665 0ustar ernieernie# 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@ # Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/base DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbase_la_LIBADD = am_libbase_la_OBJECTS = jas_cm.lo jas_debug.lo jas_getopt.lo \ jas_image.lo jas_icc.lo jas_iccdata.lo jas_init.lo \ jas_malloc.lo jas_seq.lo jas_stream.lo jas_string.lo \ jas_tmr.lo jas_tvp.lo jas_version.lo libbase_la_OBJECTS = $(am_libbase_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libbase_la_SOURCES) DIST_SOURCES = $(libbase_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ noinst_LTLIBRARIES = libbase.la libbase_la_SOURCES = \ jas_cm.c \ jas_debug.c \ jas_getopt.c \ jas_image.c \ jas_icc.c \ jas_iccdata.c \ jas_init.c \ jas_malloc.c \ jas_seq.c \ jas_stream.c \ jas_string.c \ jas_tmr.c \ jas_tvp.c \ jas_version.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/base/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/base/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES) $(LINK) $(libbase_la_LDFLAGS) $(libbase_la_OBJECTS) $(libbase_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_cm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_getopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_icc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_iccdata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_seq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_tmr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_tvp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jas_version.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/base/jas_malloc.c0000644000175000017500000001037110554235551020067 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Memory Allocator * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include /* We need the prototype for memset. */ #include #include "jasper/jas_malloc.h" /******************************************************************************\ * Code. \******************************************************************************/ #if defined(DEBUG_MEMALLOC) #include "../../../local/src/memalloc.c" #endif #if !defined(DEBUG_MEMALLOC) #define MEMALLOC_ALIGNMENT 32 #define MEMALLOC_ALIGN2 #undef MEMALLOC_ALIGN2 void *jas_malloc(size_t size) { #if defined(MEMALLOC_ALIGN2) void *ptr; abort(); if (posix_memalign(&ptr, MEMALLOC_ALIGNMENT, size)) { return 0; } return ptr; #endif return malloc(size); } void jas_free(void *ptr) { free(ptr); } void *jas_realloc(void *ptr, size_t size) { return realloc(ptr, size); } void *jas_calloc(size_t nmemb, size_t size) { void *ptr; size_t n; n = nmemb * size; if (!(ptr = jas_malloc(n * sizeof(char)))) { return 0; } memset(ptr, 0, n); return ptr; } #endif jasper-1.900.1/src/libjasper/base/jas_stream.c0000644000175000017500000007074110554235551020122 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * I/O Stream Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #if defined(HAVE_FCNTL_H) #include #endif #include #include #include #include #if defined(HAVE_UNISTD_H) #include #endif #if defined(WIN32) || defined(HAVE_IO_H) #include #endif #include "jasper/jas_types.h" #include "jasper/jas_stream.h" #include "jasper/jas_malloc.h" #include "jasper/jas_math.h" /******************************************************************************\ * Local function prototypes. \******************************************************************************/ static int jas_strtoopenmode(const char *s); static void jas_stream_destroy(jas_stream_t *stream); static jas_stream_t *jas_stream_create(void); static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf, int bufsize); static int mem_read(jas_stream_obj_t *obj, char *buf, int cnt); static int mem_write(jas_stream_obj_t *obj, char *buf, int cnt); static long mem_seek(jas_stream_obj_t *obj, long offset, int origin); static int mem_close(jas_stream_obj_t *obj); static int sfile_read(jas_stream_obj_t *obj, char *buf, int cnt); static int sfile_write(jas_stream_obj_t *obj, char *buf, int cnt); static long sfile_seek(jas_stream_obj_t *obj, long offset, int origin); static int sfile_close(jas_stream_obj_t *obj); static int file_read(jas_stream_obj_t *obj, char *buf, int cnt); static int file_write(jas_stream_obj_t *obj, char *buf, int cnt); static long file_seek(jas_stream_obj_t *obj, long offset, int origin); static int file_close(jas_stream_obj_t *obj); /******************************************************************************\ * Local data. \******************************************************************************/ static jas_stream_ops_t jas_stream_fileops = { file_read, file_write, file_seek, file_close }; static jas_stream_ops_t jas_stream_sfileops = { sfile_read, sfile_write, sfile_seek, sfile_close }; static jas_stream_ops_t jas_stream_memops = { mem_read, mem_write, mem_seek, mem_close }; /******************************************************************************\ * Code for opening and closing streams. \******************************************************************************/ static jas_stream_t *jas_stream_create() { jas_stream_t *stream; if (!(stream = jas_malloc(sizeof(jas_stream_t)))) { return 0; } stream->openmode_ = 0; stream->bufmode_ = 0; stream->flags_ = 0; stream->bufbase_ = 0; stream->bufstart_ = 0; stream->bufsize_ = 0; stream->ptr_ = 0; stream->cnt_ = 0; stream->ops_ = 0; stream->obj_ = 0; stream->rwcnt_ = 0; stream->rwlimit_ = -1; return stream; } jas_stream_t *jas_stream_memopen(char *buf, int bufsize) { jas_stream_t *stream; jas_stream_memobj_t *obj; if (!(stream = jas_stream_create())) { return 0; } /* A stream associated with a memory buffer is always opened for both reading and writing in binary mode. */ stream->openmode_ = JAS_STREAM_READ | JAS_STREAM_WRITE | JAS_STREAM_BINARY; /* Since the stream data is already resident in memory, buffering is not necessary. */ /* But... It still may be faster to use buffering anyways. */ jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); /* Select the operations for a memory stream. */ stream->ops_ = &jas_stream_memops; /* Allocate memory for the underlying memory stream object. */ if (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) { jas_stream_destroy(stream); return 0; } stream->obj_ = (void *) obj; /* Initialize a few important members of the memory stream object. */ obj->myalloc_ = 0; obj->buf_ = 0; /* If the buffer size specified is nonpositive, then the buffer is allocated internally and automatically grown as needed. */ if (bufsize <= 0) { obj->bufsize_ = 1024; obj->growable_ = 1; } else { obj->bufsize_ = bufsize; obj->growable_ = 0; } if (buf) { obj->buf_ = (unsigned char *) buf; } else { obj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char)); obj->myalloc_ = 1; } if (!obj->buf_) { jas_stream_close(stream); return 0; } if (bufsize > 0 && buf) { /* If a buffer was supplied by the caller and its length is positive, make the associated buffer data appear in the stream initially. */ obj->len_ = bufsize; } else { /* The stream is initially empty. */ obj->len_ = 0; } obj->pos_ = 0; return stream; } jas_stream_t *jas_stream_fopen(const char *filename, const char *mode) { jas_stream_t *stream; jas_stream_fileobj_t *obj; int openflags; /* Allocate a stream object. */ if (!(stream = jas_stream_create())) { return 0; } /* Parse the mode string. */ stream->openmode_ = jas_strtoopenmode(mode); /* Determine the correct flags to use for opening the file. */ if ((stream->openmode_ & JAS_STREAM_READ) && (stream->openmode_ & JAS_STREAM_WRITE)) { openflags = O_RDWR; } else if (stream->openmode_ & JAS_STREAM_READ) { openflags = O_RDONLY; } else if (stream->openmode_ & JAS_STREAM_WRITE) { openflags = O_WRONLY; } else { openflags = 0; } if (stream->openmode_ & JAS_STREAM_APPEND) { openflags |= O_APPEND; } if (stream->openmode_ & JAS_STREAM_BINARY) { openflags |= O_BINARY; } if (stream->openmode_ & JAS_STREAM_CREATE) { openflags |= O_CREAT | O_TRUNC; } /* Allocate space for the underlying file stream object. */ if (!(obj = jas_malloc(sizeof(jas_stream_fileobj_t)))) { jas_stream_destroy(stream); return 0; } obj->fd = -1; obj->flags = 0; obj->pathname[0] = '\0'; stream->obj_ = (void *) obj; /* Select the operations for a file stream object. */ stream->ops_ = &jas_stream_fileops; /* Open the underlying file. */ if ((obj->fd = open(filename, openflags, JAS_STREAM_PERMS)) < 0) { jas_stream_destroy(stream); return 0; } /* By default, use full buffering for this type of stream. */ jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); return stream; } jas_stream_t *jas_stream_freopen(const char *path, const char *mode, FILE *fp) { jas_stream_t *stream; int openflags; /* Eliminate compiler warning about unused variable. */ path = 0; /* Allocate a stream object. */ if (!(stream = jas_stream_create())) { return 0; } /* Parse the mode string. */ stream->openmode_ = jas_strtoopenmode(mode); /* Determine the correct flags to use for opening the file. */ if ((stream->openmode_ & JAS_STREAM_READ) && (stream->openmode_ & JAS_STREAM_WRITE)) { openflags = O_RDWR; } else if (stream->openmode_ & JAS_STREAM_READ) { openflags = O_RDONLY; } else if (stream->openmode_ & JAS_STREAM_WRITE) { openflags = O_WRONLY; } else { openflags = 0; } if (stream->openmode_ & JAS_STREAM_APPEND) { openflags |= O_APPEND; } if (stream->openmode_ & JAS_STREAM_BINARY) { openflags |= O_BINARY; } if (stream->openmode_ & JAS_STREAM_CREATE) { openflags |= O_CREAT | O_TRUNC; } stream->obj_ = JAS_CAST(void *, fp); /* Select the operations for a file stream object. */ stream->ops_ = &jas_stream_sfileops; /* By default, use full buffering for this type of stream. */ jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); return stream; } jas_stream_t *jas_stream_tmpfile() { jas_stream_t *stream; jas_stream_fileobj_t *obj; if (!(stream = jas_stream_create())) { return 0; } /* A temporary file stream is always opened for both reading and writing in binary mode. */ stream->openmode_ = JAS_STREAM_READ | JAS_STREAM_WRITE | JAS_STREAM_BINARY; /* Allocate memory for the underlying temporary file object. */ if (!(obj = jas_malloc(sizeof(jas_stream_fileobj_t)))) { jas_stream_destroy(stream); return 0; } obj->fd = -1; obj->flags = 0; obj->pathname[0] = '\0'; stream->obj_ = obj; /* Choose a file name. */ tmpnam(obj->pathname); /* Open the underlying file. */ if ((obj->fd = open(obj->pathname, O_CREAT | O_EXCL | O_RDWR | O_TRUNC | O_BINARY, JAS_STREAM_PERMS)) < 0) { jas_stream_destroy(stream); return 0; } /* Unlink the file so that it will disappear if the program terminates abnormally. */ /* Under UNIX, one can unlink an open file and continue to do I/O on it. Not all operating systems support this functionality, however. For example, under Microsoft Windows the unlink operation will fail, since the file is open. */ if (unlink(obj->pathname)) { /* We will try unlinking the file again after it is closed. */ obj->flags |= JAS_STREAM_FILEOBJ_DELONCLOSE; } /* Use full buffering. */ jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); stream->ops_ = &jas_stream_fileops; return stream; } jas_stream_t *jas_stream_fdopen(int fd, const char *mode) { jas_stream_t *stream; jas_stream_fileobj_t *obj; /* Allocate a stream object. */ if (!(stream = jas_stream_create())) { return 0; } /* Parse the mode string. */ stream->openmode_ = jas_strtoopenmode(mode); #if defined(WIN32) /* Argh!!! Someone ought to banish text mode (i.e., O_TEXT) to the greatest depths of purgatory! */ /* Ensure that the file descriptor is in binary mode, if the caller has specified the binary mode flag. Arguably, the caller ought to take care of this, but text mode is a ugly wart anyways, so we save the caller some grief by handling this within the stream library. */ /* This ugliness is mainly for the benefit of those who run the JasPer software under Windows from shells that insist on opening files in text mode. For example, in the Cygwin environment, shells often open files in text mode when I/O redirection is used. Grr... */ if (stream->openmode_ & JAS_STREAM_BINARY) { setmode(fd, O_BINARY); } #endif /* Allocate space for the underlying file stream object. */ if (!(obj = jas_malloc(sizeof(jas_stream_fileobj_t)))) { jas_stream_destroy(stream); return 0; } obj->fd = fd; obj->flags = 0; obj->pathname[0] = '\0'; stream->obj_ = (void *) obj; /* Do not close the underlying file descriptor when the stream is closed. */ obj->flags |= JAS_STREAM_FILEOBJ_NOCLOSE; /* By default, use full buffering for this type of stream. */ jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); /* Select the operations for a file stream object. */ stream->ops_ = &jas_stream_fileops; return stream; } static void jas_stream_destroy(jas_stream_t *stream) { /* If the memory for the buffer was allocated with malloc, free this memory. */ if ((stream->bufmode_ & JAS_STREAM_FREEBUF) && stream->bufbase_) { jas_free(stream->bufbase_); stream->bufbase_ = 0; } jas_free(stream); } int jas_stream_close(jas_stream_t *stream) { /* Flush buffer if necessary. */ jas_stream_flush(stream); /* Close the underlying stream object. */ (*stream->ops_->close_)(stream->obj_); jas_stream_destroy(stream); return 0; } /******************************************************************************\ * Code for reading and writing streams. \******************************************************************************/ int jas_stream_getc_func(jas_stream_t *stream) { assert(stream->ptr_ - stream->bufbase_ <= stream->bufsize_ + JAS_STREAM_MAXPUTBACK); return jas_stream_getc_macro(stream); } int jas_stream_putc_func(jas_stream_t *stream, int c) { assert(stream->ptr_ - stream->bufstart_ <= stream->bufsize_); return jas_stream_putc_macro(stream, c); } int jas_stream_ungetc(jas_stream_t *stream, int c) { if (!stream->ptr_ || stream->ptr_ == stream->bufbase_) { return -1; } /* Reset the EOF indicator (since we now have at least one character to read). */ stream->flags_ &= ~JAS_STREAM_EOF; --stream->rwcnt_; --stream->ptr_; ++stream->cnt_; *stream->ptr_ = c; return 0; } int jas_stream_read(jas_stream_t *stream, void *buf, int cnt) { int n; int c; char *bufptr; bufptr = buf; n = 0; while (n < cnt) { if ((c = jas_stream_getc(stream)) == EOF) { return n; } *bufptr++ = c; ++n; } return n; } int jas_stream_write(jas_stream_t *stream, const void *buf, int cnt) { int n; const char *bufptr; bufptr = buf; n = 0; while (n < cnt) { if (jas_stream_putc(stream, *bufptr) == EOF) { return n; } ++bufptr; ++n; } return n; } /* Note: This function uses a fixed size buffer. Therefore, it cannot handle invocations that will produce more output than can be held by the buffer. */ int jas_stream_printf(jas_stream_t *stream, const char *fmt, ...) { va_list ap; char buf[4096]; int ret; va_start(ap, fmt); ret = vsprintf(buf, fmt, ap); jas_stream_puts(stream, buf); va_end(ap); return ret; } int jas_stream_puts(jas_stream_t *stream, const char *s) { while (*s != '\0') { if (jas_stream_putc_macro(stream, *s) == EOF) { return -1; } ++s; } return 0; } char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize) { int c; char *bufptr; assert(bufsize > 0); bufptr = buf; while (bufsize > 1) { if ((c = jas_stream_getc(stream)) == EOF) { break; } *bufptr++ = c; --bufsize; if (c == '\n') { break; } } *bufptr = '\0'; return buf; } int jas_stream_gobble(jas_stream_t *stream, int n) { int m; m = n; for (m = n; m > 0; --m) { if (jas_stream_getc(stream) == EOF) { return n - m; } } return n; } int jas_stream_pad(jas_stream_t *stream, int n, int c) { int m; m = n; for (m = n; m > 0; --m) { if (jas_stream_putc(stream, c) == EOF) return n - m; } return n; } /******************************************************************************\ * Code for getting and setting the stream position. \******************************************************************************/ int jas_stream_isseekable(jas_stream_t *stream) { if (stream->ops_ == &jas_stream_memops) { return 1; } else if (stream->ops_ == &jas_stream_fileops) { if ((*stream->ops_->seek_)(stream->obj_, 0, SEEK_CUR) < 0) { return 0; } return 1; } else { return 0; } } int jas_stream_rewind(jas_stream_t *stream) { return jas_stream_seek(stream, 0, SEEK_SET); } long jas_stream_seek(jas_stream_t *stream, long offset, int origin) { long newpos; /* The buffer cannot be in use for both reading and writing. */ assert(!((stream->bufmode_ & JAS_STREAM_RDBUF) && (stream->bufmode_ & JAS_STREAM_WRBUF))); /* Reset the EOF indicator (since we may not be at the EOF anymore). */ stream->flags_ &= ~JAS_STREAM_EOF; if (stream->bufmode_ & JAS_STREAM_RDBUF) { if (origin == SEEK_CUR) { offset -= stream->cnt_; } } else if (stream->bufmode_ & JAS_STREAM_WRBUF) { if (jas_stream_flush(stream)) { return -1; } } stream->cnt_ = 0; stream->ptr_ = stream->bufstart_; stream->bufmode_ &= ~(JAS_STREAM_RDBUF | JAS_STREAM_WRBUF); if ((newpos = (*stream->ops_->seek_)(stream->obj_, offset, origin)) < 0) { return -1; } return newpos; } long jas_stream_tell(jas_stream_t *stream) { int adjust; int offset; if (stream->bufmode_ & JAS_STREAM_RDBUF) { adjust = -stream->cnt_; } else if (stream->bufmode_ & JAS_STREAM_WRBUF) { adjust = stream->ptr_ - stream->bufstart_; } else { adjust = 0; } if ((offset = (*stream->ops_->seek_)(stream->obj_, 0, SEEK_CUR)) < 0) { return -1; } return offset + adjust; } /******************************************************************************\ * Buffer initialization code. \******************************************************************************/ static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf, int bufsize) { /* If this function is being called, the buffer should not have been initialized yet. */ assert(!stream->bufbase_); if (bufmode != JAS_STREAM_UNBUF) { /* The full- or line-buffered mode is being employed. */ if (!buf) { /* The caller has not specified a buffer to employ, so allocate one. */ if ((stream->bufbase_ = jas_malloc(JAS_STREAM_BUFSIZE + JAS_STREAM_MAXPUTBACK))) { stream->bufmode_ |= JAS_STREAM_FREEBUF; stream->bufsize_ = JAS_STREAM_BUFSIZE; } else { /* The buffer allocation has failed. Resort to unbuffered operation. */ stream->bufbase_ = stream->tinybuf_; stream->bufsize_ = 1; } } else { /* The caller has specified a buffer to employ. */ /* The buffer must be large enough to accommodate maximum putback. */ assert(bufsize > JAS_STREAM_MAXPUTBACK); stream->bufbase_ = JAS_CAST(uchar *, buf); stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK; } } else { /* The unbuffered mode is being employed. */ /* A buffer should not have been supplied by the caller. */ assert(!buf); /* Use a trivial one-character buffer. */ stream->bufbase_ = stream->tinybuf_; stream->bufsize_ = 1; } stream->bufstart_ = &stream->bufbase_[JAS_STREAM_MAXPUTBACK]; stream->ptr_ = stream->bufstart_; stream->cnt_ = 0; stream->bufmode_ |= bufmode & JAS_STREAM_BUFMODEMASK; } /******************************************************************************\ * Buffer filling and flushing code. \******************************************************************************/ int jas_stream_flush(jas_stream_t *stream) { if (stream->bufmode_ & JAS_STREAM_RDBUF) { return 0; } return jas_stream_flushbuf(stream, EOF); } int jas_stream_fillbuf(jas_stream_t *stream, int getflag) { int c; /* The stream must not be in an error or EOF state. */ if ((stream->flags_ & (JAS_STREAM_ERRMASK)) != 0) { return EOF; } /* The stream must be open for reading. */ if ((stream->openmode_ & JAS_STREAM_READ) == 0) { return EOF; } /* Make a half-hearted attempt to confirm that the buffer is not currently being used for writing. This check is not intended to be foolproof! */ assert((stream->bufmode_ & JAS_STREAM_WRBUF) == 0); assert(stream->ptr_ - stream->bufstart_ <= stream->bufsize_); /* Mark the buffer as being used for reading. */ stream->bufmode_ |= JAS_STREAM_RDBUF; /* Read new data into the buffer. */ stream->ptr_ = stream->bufstart_; if ((stream->cnt_ = (*stream->ops_->read_)(stream->obj_, (char *) stream->bufstart_, stream->bufsize_)) <= 0) { if (stream->cnt_ < 0) { stream->flags_ |= JAS_STREAM_ERR; } else { stream->flags_ |= JAS_STREAM_EOF; } stream->cnt_ = 0; return EOF; } assert(stream->cnt_ > 0); /* Get or peek at the first character in the buffer. */ c = (getflag) ? jas_stream_getc2(stream) : (*stream->ptr_); return c; } int jas_stream_flushbuf(jas_stream_t *stream, int c) { int len; int n; /* The stream should not be in an error or EOF state. */ if ((stream->flags_ & (JAS_STREAM_ERRMASK)) != 0) { return EOF; } /* The stream must be open for writing. */ if ((stream->openmode_ & (JAS_STREAM_WRITE | JAS_STREAM_APPEND)) == 0) { return EOF; } /* The buffer should not currently be in use for reading. */ assert(!(stream->bufmode_ & JAS_STREAM_RDBUF)); /* Note: Do not use the quantity stream->cnt to determine the number of characters in the buffer! Depending on how this function was called, the stream->cnt value may be "off-by-one". */ len = stream->ptr_ - stream->bufstart_; if (len > 0) { n = (*stream->ops_->write_)(stream->obj_, (char *) stream->bufstart_, len); if (n != len) { stream->flags_ |= JAS_STREAM_ERR; return EOF; } } stream->cnt_ = stream->bufsize_; stream->ptr_ = stream->bufstart_; stream->bufmode_ |= JAS_STREAM_WRBUF; if (c != EOF) { assert(stream->cnt_ > 0); return jas_stream_putc2(stream, c); } return 0; } /******************************************************************************\ * Miscellaneous code. \******************************************************************************/ static int jas_strtoopenmode(const char *s) { int openmode = 0; while (*s != '\0') { switch (*s) { case 'r': openmode |= JAS_STREAM_READ; break; case 'w': openmode |= JAS_STREAM_WRITE | JAS_STREAM_CREATE; break; case 'b': openmode |= JAS_STREAM_BINARY; break; case 'a': openmode |= JAS_STREAM_APPEND; break; case '+': openmode |= JAS_STREAM_READ | JAS_STREAM_WRITE; break; default: break; } ++s; } return openmode; } int jas_stream_copy(jas_stream_t *out, jas_stream_t *in, int n) { int all; int c; int m; all = (n < 0) ? 1 : 0; m = n; while (all || m > 0) { if ((c = jas_stream_getc_macro(in)) == EOF) { /* The next character of input could not be read. */ /* Return with an error if an I/O error occured (not including EOF) or if an explicit copy count was specified. */ return (!all || jas_stream_error(in)) ? (-1) : 0; } if (jas_stream_putc_macro(out, c) == EOF) { return -1; } --m; } return 0; } long jas_stream_setrwcount(jas_stream_t *stream, long rwcnt) { int old; old = stream->rwcnt_; stream->rwcnt_ = rwcnt; return old; } int jas_stream_display(jas_stream_t *stream, FILE *fp, int n) { unsigned char buf[16]; int i; int j; int m; int c; int display; int cnt; cnt = n - (n % 16); display = 1; for (i = 0; i < n; i += 16) { if (n > 16 && i > 0) { display = (i >= cnt) ? 1 : 0; } if (display) { fprintf(fp, "%08x:", i); } m = JAS_MIN(n - i, 16); for (j = 0; j < m; ++j) { if ((c = jas_stream_getc(stream)) == EOF) { abort(); return -1; } buf[j] = c; } if (display) { for (j = 0; j < m; ++j) { fprintf(fp, " %02x", buf[j]); } fputc(' ', fp); for (; j < 16; ++j) { fprintf(fp, " "); } for (j = 0; j < m; ++j) { if (isprint(buf[j])) { fputc(buf[j], fp); } else { fputc(' ', fp); } } fprintf(fp, "\n"); } } return 0; } long jas_stream_length(jas_stream_t *stream) { long oldpos; long pos; if ((oldpos = jas_stream_tell(stream)) < 0) { return -1; } if (jas_stream_seek(stream, 0, SEEK_END) < 0) { return -1; } if ((pos = jas_stream_tell(stream)) < 0) { return -1; } if (jas_stream_seek(stream, oldpos, SEEK_SET) < 0) { return -1; } return pos; } /******************************************************************************\ * Memory stream object. \******************************************************************************/ static int mem_read(jas_stream_obj_t *obj, char *buf, int cnt) { int n; jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj; n = m->len_ - m->pos_; cnt = JAS_MIN(n, cnt); memcpy(buf, &m->buf_[m->pos_], cnt); m->pos_ += cnt; return cnt; } static int mem_resize(jas_stream_memobj_t *m, int bufsize) { unsigned char *buf; assert(m->buf_); if (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) { return -1; } m->buf_ = buf; m->bufsize_ = bufsize; return 0; } static int mem_write(jas_stream_obj_t *obj, char *buf, int cnt) { int n; int ret; jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj; long newbufsize; long newpos; newpos = m->pos_ + cnt; if (newpos > m->bufsize_ && m->growable_) { newbufsize = m->bufsize_; while (newbufsize < newpos) { newbufsize <<= 1; assert(newbufsize >= 0); } if (mem_resize(m, newbufsize)) { return -1; } } if (m->pos_ > m->len_) { /* The current position is beyond the end of the file, so pad the file to the current position with zeros. */ n = JAS_MIN(m->pos_, m->bufsize_) - m->len_; if (n > 0) { memset(&m->buf_[m->len_], 0, n); m->len_ += n; } if (m->pos_ != m->len_) { /* The buffer is not big enough. */ return 0; } } n = m->bufsize_ - m->pos_; ret = JAS_MIN(n, cnt); if (ret > 0) { memcpy(&m->buf_[m->pos_], buf, ret); m->pos_ += ret; } if (m->pos_ > m->len_) { m->len_ = m->pos_; } assert(ret == cnt); return ret; } static long mem_seek(jas_stream_obj_t *obj, long offset, int origin) { jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj; long newpos; switch (origin) { case SEEK_SET: newpos = offset; break; case SEEK_END: newpos = m->len_ - offset; break; case SEEK_CUR: newpos = m->pos_ + offset; break; default: abort(); break; } if (newpos < 0) { return -1; } m->pos_ = newpos; return m->pos_; } static int mem_close(jas_stream_obj_t *obj) { jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj; if (m->myalloc_ && m->buf_) { jas_free(m->buf_); m->buf_ = 0; } jas_free(obj); return 0; } /******************************************************************************\ * File stream object. \******************************************************************************/ static int file_read(jas_stream_obj_t *obj, char *buf, int cnt) { jas_stream_fileobj_t *fileobj = JAS_CAST(jas_stream_fileobj_t *, obj); return read(fileobj->fd, buf, cnt); } static int file_write(jas_stream_obj_t *obj, char *buf, int cnt) { jas_stream_fileobj_t *fileobj = JAS_CAST(jas_stream_fileobj_t *, obj); return write(fileobj->fd, buf, cnt); } static long file_seek(jas_stream_obj_t *obj, long offset, int origin) { jas_stream_fileobj_t *fileobj = JAS_CAST(jas_stream_fileobj_t *, obj); return lseek(fileobj->fd, offset, origin); } static int file_close(jas_stream_obj_t *obj) { jas_stream_fileobj_t *fileobj = JAS_CAST(jas_stream_fileobj_t *, obj); int ret; ret = close(fileobj->fd); if (fileobj->flags & JAS_STREAM_FILEOBJ_DELONCLOSE) { unlink(fileobj->pathname); } jas_free(fileobj); return ret; } /******************************************************************************\ * Stdio file stream object. \******************************************************************************/ static int sfile_read(jas_stream_obj_t *obj, char *buf, int cnt) { FILE *fp; fp = JAS_CAST(FILE *, obj); return fread(buf, 1, cnt, fp); } static int sfile_write(jas_stream_obj_t *obj, char *buf, int cnt) { FILE *fp; fp = JAS_CAST(FILE *, obj); return fwrite(buf, 1, cnt, fp); } static long sfile_seek(jas_stream_obj_t *obj, long offset, int origin) { FILE *fp; fp = JAS_CAST(FILE *, obj); return fseek(fp, offset, origin); } static int sfile_close(jas_stream_obj_t *obj) { FILE *fp; fp = JAS_CAST(FILE *, obj); return fclose(fp); } jasper-1.900.1/src/libjasper/base/jas_debug.c0000644000175000017500000001131010554235551017700 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_types.h" #include "jasper/jas_debug.h" /******************************************************************************\ * Local data. \******************************************************************************/ static int jas_dbglevel = 0; /* The debug level. */ /******************************************************************************\ * Code for getting/setting the debug level. \******************************************************************************/ /* Set the library debug level. */ int jas_setdbglevel(int dbglevel) { int olddbglevel; /* Save the old debug level. */ olddbglevel = jas_dbglevel; /* Change the debug level. */ jas_dbglevel = dbglevel; /* Return the old debug level. */ return olddbglevel; } /* Get the library debug level. */ int jas_getdbglevel() { return jas_dbglevel; } /******************************************************************************\ * Code. \******************************************************************************/ /* Perform formatted output to standard error. */ int jas_eprintf(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vfprintf(stderr, fmt, ap); va_end(ap); return ret; } /* Dump memory to a stream. */ int jas_memdump(FILE *out, void *data, size_t len) { size_t i; size_t j; uchar *dp; dp = data; for (i = 0; i < len; i += 16) { fprintf(out, "%04x:", i); for (j = 0; j < 16; ++j) { if (i + j < len) { fprintf(out, " %02x", dp[i + j]); } } fprintf(out, "\n"); } return 0; } jasper-1.900.1/src/libjasper/base/jas_getopt.c0000644000175000017500000001271410554235551020125 0ustar ernieernie/* * Copyright (c) 1999-2000, Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Command Line Option Parsing Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_getopt.h" #include "jasper/jas_math.h" /******************************************************************************\ * Global data. \******************************************************************************/ int jas_optind = 0; int jas_opterr = 1; char *jas_optarg = 0; /******************************************************************************\ * Code. \******************************************************************************/ static jas_opt_t *jas_optlookup(jas_opt_t *opts, char *name) { jas_opt_t *opt; for (opt = opts; opt->id >= 0 && opt->name; ++opt) { if (!strcmp(opt->name, name)) { return opt; } } return 0; } int jas_getopt(int argc, char **argv, jas_opt_t *opts) { char *cp; int id; int hasarg; jas_opt_t *opt; char *s; if (!jas_optind) { jas_optind = JAS_MIN(1, argc); } while (jas_optind < argc) { s = cp = argv[jas_optind]; if (*cp == '-') { /* We are processing an option. */ ++jas_optind; if (*++cp == '-') { /* We are processing a long option. */ ++cp; if (*cp == '\0') { /* This is the end of the options. */ return JAS_GETOPT_EOF; } if (!(opt = jas_optlookup(opts, cp))) { if (jas_opterr) { jas_eprintf("unknown long option %s\n", s); } return JAS_GETOPT_ERR; } hasarg = (opt->flags & JAS_OPT_HASARG) != 0; id = opt->id; } else { /* We are processing a short option. */ if (strlen(cp) != 1 || !(opt = jas_optlookup(opts, cp))) { if (jas_opterr) { jas_eprintf("unknown short option %s\n", s); } return JAS_GETOPT_ERR; } hasarg = (opt->flags & JAS_OPT_HASARG) != 0; id = opt->id; } if (hasarg) { /* The option has an argument. */ if (jas_optind >= argc) { if (jas_opterr) { jas_eprintf("missing argument for option %s\n", s); } return JAS_GETOPT_ERR; } jas_optarg = argv[jas_optind]; ++jas_optind; } else { /* The option does not have an argument. */ jas_optarg = 0; } return id; } else { /* We are not processing an option. */ return JAS_GETOPT_EOF; } } return JAS_GETOPT_EOF; } jasper-1.900.1/src/libjasper/base/jas_cm.c0000644000175000017500000010373610554235551017227 0ustar ernieernie/* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Color Management * * $Id$ */ #include #include #include #include #include #include #include #include #include #include static jas_cmprof_t *jas_cmprof_create(void); static void jas_cmshapmatlut_cleanup(jas_cmshapmatlut_t *); static jas_cmreal_t jas_cmshapmatlut_lookup(jas_cmshapmatlut_t *lut, jas_cmreal_t x); static void jas_cmpxform_destroy(jas_cmpxform_t *pxform); static jas_cmpxform_t *jas_cmpxform_copy(jas_cmpxform_t *pxform); static void jas_cmshapmat_destroy(jas_cmpxform_t *pxform); static int jas_cmshapmat_apply(jas_cmpxform_t *pxform, jas_cmreal_t *in, jas_cmreal_t *out, int cnt); static int jas_cmputint(long **bufptr, int sgnd, int prec, long val); static int jas_cmgetint(long **bufptr, int sgnd, int prec, long *val); static int jas_cmpxformseq_append(jas_cmpxformseq_t *pxformseq, jas_cmpxformseq_t *othpxformseq); static int jas_cmpxformseq_appendcnvt(jas_cmpxformseq_t *pxformseq, int, int); static int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n); static int mono(jas_iccprof_t *prof, int op, jas_cmpxformseq_t **pxformseq); static int triclr(jas_iccprof_t *prof, int op, jas_cmpxformseq_t **retpxformseq); static void jas_cmpxformseq_destroy(jas_cmpxformseq_t *pxformseq); static int jas_cmpxformseq_delete(jas_cmpxformseq_t *pxformseq, int i); static jas_cmpxformseq_t *jas_cmpxformseq_create(void); static jas_cmpxformseq_t *jas_cmpxformseq_copy(jas_cmpxformseq_t *pxformseq); static int jas_cmshapmat_invmat(jas_cmreal_t out[3][4], jas_cmreal_t in[3][4]); static int jas_cmpxformseq_insertpxform(jas_cmpxformseq_t *pxformseq, int i, jas_cmpxform_t *pxform); #define SEQFWD(intent) (intent) #define SEQREV(intent) (4 + (intent)) #define SEQSIM(intent) (8 + (intent)) #define SEQGAM 12 #define fwdpxformseq(prof, intent) \ (((prof)->pxformseqs[SEQFWD(intent)]) ? \ ((prof)->pxformseqs[SEQFWD(intent)]) : \ ((prof)->pxformseqs[SEQFWD(0)])) #define revpxformseq(prof, intent) \ (((prof)->pxformseqs[SEQREV(intent)]) ? \ ((prof)->pxformseqs[SEQREV(intent)]) : \ ((prof)->pxformseqs[SEQREV(0)])) #define simpxformseq(prof, intent) \ (((prof)->pxformseqs[SEQSIM(intent)]) ? \ ((prof)->pxformseqs[SEQSIM(intent)]) : \ ((prof)->pxformseqs[SEQSIM(0)])) #define gampxformseq(prof) ((prof)->pxformseqs[SEQGAM]) static int icctoclrspc(int iccclrspc, int refflag); static jas_cmpxform_t *jas_cmpxform_create0(void); static jas_cmpxform_t *jas_cmpxform_createshapmat(void); static void jas_cmshapmatlut_init(jas_cmshapmatlut_t *lut); static int jas_cmshapmatlut_set(jas_cmshapmatlut_t *lut, jas_icccurv_t *curv); static jas_cmpxformops_t shapmat_ops = {jas_cmshapmat_destroy, jas_cmshapmat_apply, 0}; static jas_cmprof_t *jas_cmprof_createsycc(void); /******************************************************************************\ * Color profile class. \******************************************************************************/ jas_cmprof_t *jas_cmprof_createfromclrspc(int clrspc) { jas_iccprof_t *iccprof; jas_cmprof_t *prof; iccprof = 0; prof = 0; switch (clrspc) { case JAS_CLRSPC_SYCBCR: if (!(prof = jas_cmprof_createsycc())) goto error; break; default: if (!(iccprof = jas_iccprof_createfromclrspc(clrspc))) goto error; if (!(prof = jas_cmprof_createfromiccprof(iccprof))) goto error; jas_iccprof_destroy(iccprof); iccprof = 0; if (!jas_clrspc_isgeneric(clrspc)) prof->clrspc = clrspc; break; } return prof; error: if (iccprof) jas_iccprof_destroy(iccprof); return 0; } static jas_cmprof_t *jas_cmprof_createsycc() { jas_cmprof_t *prof; jas_cmpxform_t *fwdpxform; jas_cmpxform_t *revpxform; jas_cmshapmat_t *fwdshapmat; jas_cmshapmat_t *revshapmat; int i; int j; if (!(prof = jas_cmprof_createfromclrspc(JAS_CLRSPC_SRGB))) goto error; prof->clrspc = JAS_CLRSPC_SYCBCR; assert(prof->numchans == 3 && prof->numrefchans == 3); assert(prof->refclrspc == JAS_CLRSPC_CIEXYZ); if (!(fwdpxform = jas_cmpxform_createshapmat())) goto error; fwdpxform->numinchans = 3; fwdpxform->numoutchans = 3; fwdshapmat = &fwdpxform->data.shapmat; fwdshapmat->mono = 0; fwdshapmat->order = 0; fwdshapmat->useluts = 0; fwdshapmat->usemat = 1; fwdshapmat->mat[0][0] = 1.0; fwdshapmat->mat[0][1] = 0.0; fwdshapmat->mat[0][2] = 1.402; fwdshapmat->mat[1][0] = 1.0; fwdshapmat->mat[1][1] = -0.34413; fwdshapmat->mat[1][2] = -0.71414; fwdshapmat->mat[2][0] = 1.0; fwdshapmat->mat[2][1] = 1.772; fwdshapmat->mat[2][2] = 0.0; fwdshapmat->mat[0][3] = -0.5 * (1.402); fwdshapmat->mat[1][3] = -0.5 * (-0.34413 - 0.71414); fwdshapmat->mat[2][3] = -0.5 * (1.772); if (!(revpxform = jas_cmpxform_createshapmat())) goto error; revpxform->numinchans = 3; revpxform->numoutchans = 3; revshapmat = &revpxform->data.shapmat; revshapmat->mono = 0; revshapmat->order = 1; revshapmat->useluts = 0; revshapmat->usemat = 1; jas_cmshapmat_invmat(revshapmat->mat, fwdshapmat->mat); for (i = 0; i < JAS_CMXFORM_NUMINTENTS; ++i) { j = SEQFWD(i); if (prof->pxformseqs[j]) { if (jas_cmpxformseq_insertpxform(prof->pxformseqs[j], 0, fwdpxform)) goto error; } j = SEQREV(i); if (prof->pxformseqs[j]) { if (jas_cmpxformseq_insertpxform(prof->pxformseqs[j], -1, revpxform)) goto error; } } jas_cmpxform_destroy(fwdpxform); jas_cmpxform_destroy(revpxform); return prof; error: return 0; } jas_cmprof_t *jas_cmprof_createfromiccprof(jas_iccprof_t *iccprof) { jas_cmprof_t *prof; jas_icchdr_t icchdr; jas_cmpxformseq_t *fwdpxformseq; jas_cmpxformseq_t *revpxformseq; prof = 0; fwdpxformseq = 0; revpxformseq = 0; if (!(prof = jas_cmprof_create())) goto error; jas_iccprof_gethdr(iccprof, &icchdr); if (!(prof->iccprof = jas_iccprof_copy(iccprof))) goto error; prof->clrspc = icctoclrspc(icchdr.colorspc, 0); prof->refclrspc = icctoclrspc(icchdr.refcolorspc, 1); prof->numchans = jas_clrspc_numchans(prof->clrspc); prof->numrefchans = jas_clrspc_numchans(prof->refclrspc); if (prof->numchans == 1) { if (mono(prof->iccprof, 0, &fwdpxformseq)) goto error; if (mono(prof->iccprof, 1, &revpxformseq)) goto error; } else if (prof->numchans == 3) { if (triclr(prof->iccprof, 0, &fwdpxformseq)) goto error; if (triclr(prof->iccprof, 1, &revpxformseq)) goto error; } prof->pxformseqs[SEQFWD(0)] = fwdpxformseq; prof->pxformseqs[SEQREV(0)] = revpxformseq; #if 0 if (prof->numchans > 1) { lut(prof->iccprof, 0, PER, &pxformseq); pxformseqs_set(prof, SEQFWD(PER), pxformseq); lut(prof->iccprof, 1, PER, &pxformseq); pxformseqs_set(prof, SEQREV(PER), pxformseq); lut(prof->iccprof, 0, CLR, &pxformseq); pxformseqs_set(prof, SEQREV(CLR), pxformseq); lut(prof->iccprof, 1, CLR, &pxformseq); pxformseqs_set(prof, SEQREV(CLR), pxformseq); lut(prof->iccprof, 0, SAT, &pxformseq); pxformseqs_set(prof, SEQREV(SAT), pxformseq); lut(prof->iccprof, 1, SAT, &pxformseq); pxformseqs_set(prof, SEQREV(SAT), pxformseq); } #endif return prof; error: if (fwdpxformseq) { jas_cmpxformseq_destroy(fwdpxformseq); } if (revpxformseq) { jas_cmpxformseq_destroy(revpxformseq); } if (prof) { jas_cmprof_destroy(prof); } return 0; } static jas_cmprof_t *jas_cmprof_create() { int i; jas_cmprof_t *prof; if (!(prof = jas_malloc(sizeof(jas_cmprof_t)))) return 0; memset(prof, 0, sizeof(jas_cmprof_t)); prof->iccprof = 0; for (i = 0; i < JAS_CMPROF_NUMPXFORMSEQS; ++i) prof->pxformseqs[i] = 0; return prof; } void jas_cmprof_destroy(jas_cmprof_t *prof) { int i; for (i = 0; i < JAS_CMPROF_NUMPXFORMSEQS; ++i) { if (prof->pxformseqs[i]) { jas_cmpxformseq_destroy(prof->pxformseqs[i]); prof->pxformseqs[i] = 0; } } if (prof->iccprof) jas_iccprof_destroy(prof->iccprof); jas_free(prof); } jas_cmprof_t *jas_cmprof_copy(jas_cmprof_t *prof) { jas_cmprof_t *newprof; int i; if (!(newprof = jas_cmprof_create())) goto error; newprof->clrspc = prof->clrspc; newprof->numchans = prof->numchans; newprof->refclrspc = prof->refclrspc; newprof->numrefchans = prof->numrefchans; newprof->iccprof = jas_iccprof_copy(prof->iccprof); for (i = 0; i < JAS_CMPROF_NUMPXFORMSEQS; ++i) { if (prof->pxformseqs[i]) { if (!(newprof->pxformseqs[i] = jas_cmpxformseq_copy(prof->pxformseqs[i]))) goto error; } } return newprof; error: return 0; } /******************************************************************************\ * Transform class. \******************************************************************************/ jas_cmxform_t *jas_cmxform_create(jas_cmprof_t *inprof, jas_cmprof_t *outprof, jas_cmprof_t *prfprof, int op, int intent, int optimize) { jas_cmxform_t *xform; jas_cmpxformseq_t *inpxformseq; jas_cmpxformseq_t *outpxformseq; jas_cmpxformseq_t *altoutpxformseq; jas_cmpxformseq_t *prfpxformseq; int prfintent; /* Avoid compiler warnings about unused parameters. */ optimize = 0; prfintent = intent; if (!(xform = jas_malloc(sizeof(jas_cmxform_t)))) goto error; if (!(xform->pxformseq = jas_cmpxformseq_create())) goto error; switch (op) { case JAS_CMXFORM_OP_FWD: inpxformseq = fwdpxformseq(inprof, intent); outpxformseq = revpxformseq(outprof, intent); if (!inpxformseq || !outpxformseq) goto error; if (jas_cmpxformseq_append(xform->pxformseq, inpxformseq) || jas_cmpxformseq_appendcnvt(xform->pxformseq, inprof->refclrspc, outprof->refclrspc) || jas_cmpxformseq_append(xform->pxformseq, outpxformseq)) goto error; xform->numinchans = jas_clrspc_numchans(inprof->clrspc); xform->numoutchans = jas_clrspc_numchans(outprof->clrspc); break; case JAS_CMXFORM_OP_REV: outpxformseq = fwdpxformseq(outprof, intent); inpxformseq = revpxformseq(inprof, intent); if (!outpxformseq || !inpxformseq) goto error; if (jas_cmpxformseq_append(xform->pxformseq, outpxformseq) || jas_cmpxformseq_appendcnvt(xform->pxformseq, outprof->refclrspc, inprof->refclrspc) || jas_cmpxformseq_append(xform->pxformseq, inpxformseq)) goto error; xform->numinchans = jas_clrspc_numchans(outprof->clrspc); xform->numoutchans = jas_clrspc_numchans(inprof->clrspc); break; case JAS_CMXFORM_OP_PROOF: assert(prfprof); inpxformseq = fwdpxformseq(inprof, intent); prfpxformseq = fwdpxformseq(prfprof, prfintent); if (!inpxformseq || !prfpxformseq) goto error; outpxformseq = simpxformseq(outprof, intent); altoutpxformseq = 0; if (!outpxformseq) { outpxformseq = revpxformseq(outprof, intent); altoutpxformseq = fwdpxformseq(outprof, intent); if (!outpxformseq || !altoutpxformseq) goto error; } if (jas_cmpxformseq_append(xform->pxformseq, inpxformseq) || jas_cmpxformseq_appendcnvt(xform->pxformseq, inprof->refclrspc, outprof->refclrspc)) goto error; if (altoutpxformseq) { if (jas_cmpxformseq_append(xform->pxformseq, outpxformseq) || jas_cmpxformseq_append(xform->pxformseq, altoutpxformseq)) goto error; } else { if (jas_cmpxformseq_append(xform->pxformseq, outpxformseq)) goto error; } if (jas_cmpxformseq_appendcnvt(xform->pxformseq, outprof->refclrspc, inprof->refclrspc) || jas_cmpxformseq_append(xform->pxformseq, prfpxformseq)) goto error; xform->numinchans = jas_clrspc_numchans(inprof->clrspc); xform->numoutchans = jas_clrspc_numchans(prfprof->clrspc); break; case JAS_CMXFORM_OP_GAMUT: inpxformseq = fwdpxformseq(inprof, intent); outpxformseq = gampxformseq(outprof); if (!inpxformseq || !outpxformseq) goto error; if (jas_cmpxformseq_append(xform->pxformseq, inpxformseq) || jas_cmpxformseq_appendcnvt(xform->pxformseq, inprof->refclrspc, outprof->refclrspc) || jas_cmpxformseq_append(xform->pxformseq, outpxformseq)) goto error; xform->numinchans = jas_clrspc_numchans(inprof->clrspc); xform->numoutchans = 1; break; } return xform; error: return 0; } #define APPLYBUFSIZ 2048 int jas_cmxform_apply(jas_cmxform_t *xform, jas_cmpixmap_t *in, jas_cmpixmap_t *out) { jas_cmcmptfmt_t *fmt; jas_cmreal_t buf[2][APPLYBUFSIZ]; jas_cmpxformseq_t *pxformseq; int i; int j; int width; int height; int total; int n; jas_cmreal_t *inbuf; jas_cmreal_t *outbuf; jas_cmpxform_t *pxform; long *dataptr; int maxchans; int bufmax; int m; int bias; jas_cmreal_t scale; long v; jas_cmreal_t *bufptr; if (xform->numinchans > in->numcmpts || xform->numoutchans > out->numcmpts) goto error; fmt = &in->cmptfmts[0]; width = fmt->width; height = fmt->height; for (i = 1; i < xform->numinchans; ++i) { fmt = &in->cmptfmts[i]; if (fmt->width != width || fmt->height != height) { goto error; } } for (i = 0; i < xform->numoutchans; ++i) { fmt = &out->cmptfmts[i]; if (fmt->width != width || fmt->height != height) { goto error; } } maxchans = 0; pxformseq = xform->pxformseq; for (i = 0; i < pxformseq->numpxforms; ++i) { pxform = pxformseq->pxforms[i]; if (pxform->numinchans > maxchans) { maxchans = pxform->numinchans; } if (pxform->numoutchans > maxchans) { maxchans = pxform->numoutchans; } } bufmax = APPLYBUFSIZ / maxchans; assert(bufmax > 0); total = width * height; n = 0; while (n < total) { inbuf = &buf[0][0]; m = JAS_MIN(total - n, bufmax); for (i = 0; i < xform->numinchans; ++i) { fmt = &in->cmptfmts[i]; scale = (double)((1 << fmt->prec) - 1); bias = fmt->sgnd ? (1 << (fmt->prec - 1)) : 0; dataptr = &fmt->buf[n]; bufptr = &inbuf[i]; for (j = 0; j < m; ++j) { if (jas_cmgetint(&dataptr, fmt->sgnd, fmt->prec, &v)) goto error; *bufptr = (v - bias) / scale; bufptr += xform->numinchans; } } inbuf = &buf[0][0]; outbuf = inbuf; for (i = 0; i < pxformseq->numpxforms; ++i) { pxform = pxformseq->pxforms[i]; if (pxform->numoutchans > pxform->numinchans) { outbuf = (inbuf == &buf[0][0]) ? &buf[1][0] : &buf[0][0]; } else { outbuf = inbuf; } if ((*pxform->ops->apply)(pxform, inbuf, outbuf, m)) goto error; inbuf = outbuf; } for (i = 0; i < xform->numoutchans; ++i) { fmt = &out->cmptfmts[i]; scale = (double)((1 << fmt->prec) - 1); bias = fmt->sgnd ? (1 << (fmt->prec - 1)) : 0; bufptr = &outbuf[i]; dataptr = &fmt->buf[n]; for (j = 0; j < m; ++j) { v = (*bufptr) * scale + bias; bufptr += xform->numoutchans; if (jas_cmputint(&dataptr, fmt->sgnd, fmt->prec, v)) goto error; } } n += m; } return 0; error: return -1; } void jas_cmxform_destroy(jas_cmxform_t *xform) { if (xform->pxformseq) jas_cmpxformseq_destroy(xform->pxformseq); jas_free(xform); } /******************************************************************************\ * Primitive transform sequence class. \******************************************************************************/ static jas_cmpxformseq_t *jas_cmpxformseq_create() { jas_cmpxformseq_t *pxformseq; pxformseq = 0; if (!(pxformseq = jas_malloc(sizeof(jas_cmpxformseq_t)))) goto error; pxformseq->pxforms = 0; pxformseq->numpxforms = 0; pxformseq->maxpxforms = 0; if (jas_cmpxformseq_resize(pxformseq, 16)) goto error; return pxformseq; error: if (pxformseq) jas_cmpxformseq_destroy(pxformseq); return 0; } static jas_cmpxformseq_t *jas_cmpxformseq_copy(jas_cmpxformseq_t *pxformseq) { jas_cmpxformseq_t *newpxformseq; if (!(newpxformseq = jas_cmpxformseq_create())) goto error; if (jas_cmpxformseq_append(newpxformseq, pxformseq)) goto error; return newpxformseq; error: return 0; } static void jas_cmpxformseq_destroy(jas_cmpxformseq_t *pxformseq) { while (pxformseq->numpxforms > 0) jas_cmpxformseq_delete(pxformseq, pxformseq->numpxforms - 1); if (pxformseq->pxforms) jas_free(pxformseq->pxforms); jas_free(pxformseq); } static int jas_cmpxformseq_delete(jas_cmpxformseq_t *pxformseq, int i) { assert(i >= 0 && i < pxformseq->numpxforms); if (i != pxformseq->numpxforms - 1) abort(); jas_cmpxform_destroy(pxformseq->pxforms[i]); pxformseq->pxforms[i] = 0; --pxformseq->numpxforms; return 0; } static int jas_cmpxformseq_appendcnvt(jas_cmpxformseq_t *pxformseq, int dstclrspc, int srcclrspc) { if (dstclrspc == srcclrspc) return 0; abort(); /* Avoid compiler warnings about unused parameters. */ pxformseq = 0; return -1; } static int jas_cmpxformseq_insertpxform(jas_cmpxformseq_t *pxformseq, int i, jas_cmpxform_t *pxform) { jas_cmpxform_t *tmppxform; int n; if (i < 0) i = pxformseq->numpxforms; assert(i >= 0 && i <= pxformseq->numpxforms); if (pxformseq->numpxforms >= pxformseq->maxpxforms) { if (jas_cmpxformseq_resize(pxformseq, pxformseq->numpxforms + 16)) goto error; } assert(pxformseq->numpxforms < pxformseq->maxpxforms); if (!(tmppxform = jas_cmpxform_copy(pxform))) goto error; n = pxformseq->numpxforms - i; if (n > 0) { memmove(&pxformseq->pxforms[i + 1], &pxformseq->pxforms[i], n * sizeof(jas_cmpxform_t *)); } pxformseq->pxforms[i] = tmppxform; ++pxformseq->numpxforms; return 0; error: return -1; } static int jas_cmpxformseq_append(jas_cmpxformseq_t *pxformseq, jas_cmpxformseq_t *othpxformseq) { int n; int i; jas_cmpxform_t *pxform; jas_cmpxform_t *othpxform; n = pxformseq->numpxforms + othpxformseq->numpxforms; if (n > pxformseq->maxpxforms) { if (jas_cmpxformseq_resize(pxformseq, n)) goto error; } for (i = 0; i < othpxformseq->numpxforms; ++i) { othpxform = othpxformseq->pxforms[i]; if (!(pxform = jas_cmpxform_copy(othpxform))) goto error; pxformseq->pxforms[pxformseq->numpxforms] = pxform; ++pxformseq->numpxforms; } return 0; error: return -1; } static int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n) { jas_cmpxform_t **p; assert(n >= pxformseq->numpxforms); p = (!pxformseq->pxforms) ? jas_malloc(n * sizeof(jas_cmpxform_t *)) : jas_realloc(pxformseq->pxforms, n * sizeof(jas_cmpxform_t *)); if (!p) { return -1; } pxformseq->pxforms = p; pxformseq->maxpxforms = n; return 0; } /******************************************************************************\ * Primitive transform class. \******************************************************************************/ static jas_cmpxform_t *jas_cmpxform_create0() { jas_cmpxform_t *pxform; if (!(pxform = jas_malloc(sizeof(jas_cmpxform_t)))) return 0; memset(pxform, 0, sizeof(jas_cmpxform_t)); pxform->refcnt = 0; pxform->ops = 0; return pxform; } static void jas_cmpxform_destroy(jas_cmpxform_t *pxform) { if (--pxform->refcnt <= 0) { (*pxform->ops->destroy)(pxform); jas_free(pxform); } } static jas_cmpxform_t *jas_cmpxform_copy(jas_cmpxform_t *pxform) { ++pxform->refcnt; return pxform; } /******************************************************************************\ * Shaper matrix class. \******************************************************************************/ static jas_cmpxform_t *jas_cmpxform_createshapmat() { int i; int j; jas_cmpxform_t *pxform; jas_cmshapmat_t *shapmat; if (!(pxform = jas_cmpxform_create0())) return 0; pxform->ops = &shapmat_ops; shapmat = &pxform->data.shapmat; shapmat->mono = 0; shapmat->order = 0; shapmat->useluts = 0; shapmat->usemat = 0; for (i = 0; i < 3; ++i) jas_cmshapmatlut_init(&shapmat->luts[i]); for (i = 0; i < 3; ++i) { for (j = 0; j < 4; ++j) shapmat->mat[i][j] = 0.0; } ++pxform->refcnt; return pxform; } static void jas_cmshapmat_destroy(jas_cmpxform_t *pxform) { jas_cmshapmat_t *shapmat = &pxform->data.shapmat; int i; for (i = 0; i < 3; ++i) jas_cmshapmatlut_cleanup(&shapmat->luts[i]); } static int jas_cmshapmat_apply(jas_cmpxform_t *pxform, jas_cmreal_t *in, jas_cmreal_t *out, int cnt) { jas_cmshapmat_t *shapmat = &pxform->data.shapmat; jas_cmreal_t *src; jas_cmreal_t *dst; jas_cmreal_t a0; jas_cmreal_t a1; jas_cmreal_t a2; jas_cmreal_t b0; jas_cmreal_t b1; jas_cmreal_t b2; src = in; dst = out; if (!shapmat->mono) { while (--cnt >= 0) { a0 = *src++; a1 = *src++; a2 = *src++; if (!shapmat->order && shapmat->useluts) { a0 = jas_cmshapmatlut_lookup(&shapmat->luts[0], a0); a1 = jas_cmshapmatlut_lookup(&shapmat->luts[1], a1); a2 = jas_cmshapmatlut_lookup(&shapmat->luts[2], a2); } if (shapmat->usemat) { b0 = shapmat->mat[0][0] * a0 + shapmat->mat[0][1] * a1 + shapmat->mat[0][2] * a2 + shapmat->mat[0][3]; b1 = shapmat->mat[1][0] * a0 + shapmat->mat[1][1] * a1 + shapmat->mat[1][2] * a2 + shapmat->mat[1][3]; b2 = shapmat->mat[2][0] * a0 + shapmat->mat[2][1] * a1 + shapmat->mat[2][2] * a2 + shapmat->mat[2][3]; a0 = b0; a1 = b1; a2 = b2; } if (shapmat->order && shapmat->useluts) { a0 = jas_cmshapmatlut_lookup(&shapmat->luts[0], a0); a1 = jas_cmshapmatlut_lookup(&shapmat->luts[1], a1); a2 = jas_cmshapmatlut_lookup(&shapmat->luts[2], a2); } *dst++ = a0; *dst++ = a1; *dst++ = a2; } } else { if (!shapmat->order) { while (--cnt >= 0) { a0 = *src++; if (shapmat->useluts) a0 = jas_cmshapmatlut_lookup(&shapmat->luts[0], a0); a2 = a0 * shapmat->mat[2][0]; a1 = a0 * shapmat->mat[1][0]; a0 = a0 * shapmat->mat[0][0]; *dst++ = a0; *dst++ = a1; *dst++ = a2; } } else { assert(0); while (--cnt >= 0) { a0 = *src++; src++; src++; a0 = a0 * shapmat->mat[0][0]; if (shapmat->useluts) a0 = jas_cmshapmatlut_lookup(&shapmat->luts[0], a0); *dst++ = a0; } } } return 0; } static void jas_cmshapmatlut_init(jas_cmshapmatlut_t *lut) { lut->data = 0; lut->size = 0; } static void jas_cmshapmatlut_cleanup(jas_cmshapmatlut_t *lut) { if (lut->data) { jas_free(lut->data); lut->data = 0; } lut->size = 0; } static double gammafn(double x, double gamma) { if (x == 0.0) return 0.0; return pow(x, gamma); } static int jas_cmshapmatlut_set(jas_cmshapmatlut_t *lut, jas_icccurv_t *curv) { jas_cmreal_t gamma; int i; gamma = 0; jas_cmshapmatlut_cleanup(lut); if (curv->numents == 0) { lut->size = 2; if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) goto error; lut->data[0] = 0.0; lut->data[1] = 1.0; } else if (curv->numents == 1) { lut->size = 256; if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) goto error; gamma = curv->ents[0] / 256.0; for (i = 0; i < lut->size; ++i) { lut->data[i] = gammafn(i / (double) (lut->size - 1), gamma); } } else { lut->size = curv->numents; if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) goto error; for (i = 0; i < lut->size; ++i) { lut->data[i] = curv->ents[i] / 65535.0; } } return 0; error: return -1; } static jas_cmreal_t jas_cmshapmatlut_lookup(jas_cmshapmatlut_t *lut, jas_cmreal_t x) { jas_cmreal_t t; int lo; int hi; t = x * (lut->size - 1); lo = floor(t); if (lo < 0) return lut->data[0]; hi = ceil(t); if (hi >= lut->size) return lut->data[lut->size - 1]; return lut->data[lo] + (t - lo) * (lut->data[hi] - lut->data[lo]); } static int jas_cmshapmatlut_invert(jas_cmshapmatlut_t *invlut, jas_cmshapmatlut_t *lut, int n) { int i; int j; int k; jas_cmreal_t ax; jas_cmreal_t ay; jas_cmreal_t bx; jas_cmreal_t by; jas_cmreal_t sx; jas_cmreal_t sy; assert(n >= 2); if (invlut->data) { jas_free(invlut->data); invlut->data = 0; } /* The sample values should be nondecreasing. */ for (i = 1; i < lut->size; ++i) { if (lut->data[i - 1] > lut->data[i]) { assert(0); return -1; } } if (!(invlut->data = jas_malloc(n * sizeof(jas_cmreal_t)))) return -1; invlut->size = n; for (i = 0; i < invlut->size; ++i) { sy = ((double) i) / (invlut->size - 1); sx = 1.0; for (j = 0; j < lut->size; ++j) { ay = lut->data[j]; if (sy == ay) { for (k = j + 1; k < lut->size; ++k) { by = lut->data[k]; if (by != sy) break; #if 0 assert(0); #endif } if (k < lut->size) { --k; ax = ((double) j) / (lut->size - 1); bx = ((double) k) / (lut->size - 1); sx = (ax + bx) / 2.0; } break; } if (j < lut->size - 1) { by = lut->data[j + 1]; if (sy > ay && sy < by) { ax = ((double) j) / (lut->size - 1); bx = ((double) j + 1) / (lut->size - 1); sx = ax + (sy - ay) / (by - ay) * (bx - ax); break; } } } invlut->data[i] = sx; } #if 0 for (i=0;isize;++i) jas_eprintf("lut[%d]=%f ", i, lut->data[i]); for (i=0;isize;++i) jas_eprintf("invlut[%d]=%f ", i, invlut->data[i]); #endif return 0; } static int jas_cmshapmat_invmat(jas_cmreal_t out[3][4], jas_cmreal_t in[3][4]) { jas_cmreal_t d; d = in[0][0] * (in[1][1] * in[2][2] - in[1][2] * in[2][1]) - in[0][1] * (in[1][0] * in[2][2] - in[1][2] * in[2][0]) + in[0][2] * (in[1][0] * in[2][1] - in[1][1] * in[2][0]); #if 0 jas_eprintf("delta=%f\n", d); #endif if (JAS_ABS(d) < 1e-6) return -1; out[0][0] = (in[1][1] * in[2][2] - in[1][2] * in[2][1]) / d; out[1][0] = -(in[1][0] * in[2][2] - in[1][2] * in[2][0]) / d; out[2][0] = (in[1][0] * in[2][1] - in[1][1] * in[2][0]) / d; out[0][1] = -(in[0][1] * in[2][2] - in[0][2] * in[2][1]) / d; out[1][1] = (in[0][0] * in[2][2] - in[0][2] * in[2][0]) / d; out[2][1] = -(in[0][0] * in[2][1] - in[0][1] * in[2][0]) / d; out[0][2] = (in[0][1] * in[1][2] - in[0][2] * in[1][1]) / d; out[1][2] = -(in[0][0] * in[1][2] - in[1][0] * in[0][2]) / d; out[2][2] = (in[0][0] * in[1][1] - in[0][1] * in[1][0]) / d; out[0][3] = -in[0][3]; out[1][3] = -in[1][3]; out[2][3] = -in[2][3]; #if 0 jas_eprintf("[ %f %f %f %f ]\n[ %f %f %f %f ]\n[ %f %f %f %f ]\n", in[0][0], in[0][1], in[0][2], in[0][3], in[1][0], in[1][1], in[1][2], in[1][3], in[2][0], in[2][1], in[2][2], in[2][3]); jas_eprintf("[ %f %f %f %f ]\n[ %f %f %f %f ]\n[ %f %f %f %f ]\n", out[0][0], out[0][1], out[0][2], out[0][3], out[1][0], out[1][1], out[1][2], out[1][3], out[2][0], out[2][1], out[2][2], out[2][3]); #endif return 0; } /******************************************************************************\ * \******************************************************************************/ static int icctoclrspc(int iccclrspc, int refflag) { if (refflag) { switch (iccclrspc) { case JAS_ICC_COLORSPC_XYZ: return JAS_CLRSPC_CIEXYZ; case JAS_ICC_COLORSPC_LAB: return JAS_CLRSPC_CIELAB; default: abort(); break; } } else { switch (iccclrspc) { case JAS_ICC_COLORSPC_YCBCR: return JAS_CLRSPC_GENYCBCR; case JAS_ICC_COLORSPC_RGB: return JAS_CLRSPC_GENRGB; case JAS_ICC_COLORSPC_GRAY: return JAS_CLRSPC_GENGRAY; default: abort(); break; } } } static int mono(jas_iccprof_t *iccprof, int op, jas_cmpxformseq_t **retpxformseq) { jas_iccattrval_t *graytrc; jas_cmshapmat_t *shapmat; jas_cmpxform_t *pxform; jas_cmpxformseq_t *pxformseq; jas_cmshapmatlut_t lut; jas_cmshapmatlut_init(&lut); if (!(graytrc = jas_iccprof_getattr(iccprof, JAS_ICC_TAG_GRYTRC)) || graytrc->type != JAS_ICC_TYPE_CURV) goto error; if (!(pxform = jas_cmpxform_createshapmat())) goto error; shapmat = &pxform->data.shapmat; if (!(pxformseq = jas_cmpxformseq_create())) goto error; if (jas_cmpxformseq_insertpxform(pxformseq, -1, pxform)) goto error; pxform->numinchans = 1; pxform->numoutchans = 3; shapmat->mono = 1; shapmat->useluts = 1; shapmat->usemat = 1; if (!op) { shapmat->order = 0; shapmat->mat[0][0] = 0.9642; shapmat->mat[1][0] = 1.0; shapmat->mat[2][0] = 0.8249; if (jas_cmshapmatlut_set(&shapmat->luts[0], &graytrc->data.curv)) goto error; } else { shapmat->order = 1; shapmat->mat[0][0] = 1.0 / 0.9642; shapmat->mat[1][0] = 1.0; shapmat->mat[2][0] = 1.0 / 0.8249; jas_cmshapmatlut_init(&lut); if (jas_cmshapmatlut_set(&lut, &graytrc->data.curv)) goto error; if (jas_cmshapmatlut_invert(&shapmat->luts[0], &lut, lut.size)) goto error; jas_cmshapmatlut_cleanup(&lut); } jas_iccattrval_destroy(graytrc); jas_cmpxform_destroy(pxform); *retpxformseq = pxformseq; return 0; error: return -1; } static int triclr(jas_iccprof_t *iccprof, int op, jas_cmpxformseq_t **retpxformseq) { int i; jas_iccattrval_t *trcs[3]; jas_iccattrval_t *cols[3]; jas_cmshapmat_t *shapmat; jas_cmpxform_t *pxform; jas_cmpxformseq_t *pxformseq; jas_cmreal_t mat[3][4]; jas_cmshapmatlut_t lut; pxform = 0; pxformseq = 0; for (i = 0; i < 3; ++i) { trcs[i] = 0; cols[i] = 0; } jas_cmshapmatlut_init(&lut); if (!(trcs[0] = jas_iccprof_getattr(iccprof, JAS_ICC_TAG_REDTRC)) || !(trcs[1] = jas_iccprof_getattr(iccprof, JAS_ICC_TAG_GRNTRC)) || !(trcs[2] = jas_iccprof_getattr(iccprof, JAS_ICC_TAG_BLUTRC)) || !(cols[0] = jas_iccprof_getattr(iccprof, JAS_ICC_TAG_REDMATCOL)) || !(cols[1] = jas_iccprof_getattr(iccprof, JAS_ICC_TAG_GRNMATCOL)) || !(cols[2] = jas_iccprof_getattr(iccprof, JAS_ICC_TAG_BLUMATCOL))) goto error; for (i = 0; i < 3; ++i) { if (trcs[i]->type != JAS_ICC_TYPE_CURV || cols[i]->type != JAS_ICC_TYPE_XYZ) goto error; } if (!(pxform = jas_cmpxform_createshapmat())) goto error; pxform->numinchans = 3; pxform->numoutchans = 3; shapmat = &pxform->data.shapmat; if (!(pxformseq = jas_cmpxformseq_create())) goto error; if (jas_cmpxformseq_insertpxform(pxformseq, -1, pxform)) goto error; shapmat->mono = 0; shapmat->useluts = 1; shapmat->usemat = 1; if (!op) { shapmat->order = 0; for (i = 0; i < 3; ++i) { shapmat->mat[0][i] = cols[i]->data.xyz.x / 65536.0; shapmat->mat[1][i] = cols[i]->data.xyz.y / 65536.0; shapmat->mat[2][i] = cols[i]->data.xyz.z / 65536.0; } for (i = 0; i < 3; ++i) shapmat->mat[i][3] = 0.0; for (i = 0; i < 3; ++i) { if (jas_cmshapmatlut_set(&shapmat->luts[i], &trcs[i]->data.curv)) goto error; } } else { shapmat->order = 1; for (i = 0; i < 3; ++i) { mat[0][i] = cols[i]->data.xyz.x / 65536.0; mat[1][i] = cols[i]->data.xyz.y / 65536.0; mat[2][i] = cols[i]->data.xyz.z / 65536.0; } for (i = 0; i < 3; ++i) mat[i][3] = 0.0; if (jas_cmshapmat_invmat(shapmat->mat, mat)) goto error; for (i = 0; i < 3; ++i) { jas_cmshapmatlut_init(&lut); if (jas_cmshapmatlut_set(&lut, &trcs[i]->data.curv)) goto error; if (jas_cmshapmatlut_invert(&shapmat->luts[i], &lut, lut.size)) goto error; jas_cmshapmatlut_cleanup(&lut); } } for (i = 0; i < 3; ++i) { jas_iccattrval_destroy(trcs[i]); jas_iccattrval_destroy(cols[i]); } jas_cmpxform_destroy(pxform); *retpxformseq = pxformseq; return 0; error: for (i = 0; i < 3; ++i) { if (trcs[i]) { jas_iccattrval_destroy(trcs[i]); } if (cols[i]) { jas_iccattrval_destroy(cols[i]); } } if (pxformseq) { jas_cmpxformseq_destroy(pxformseq); } if (pxform) { jas_cmpxform_destroy(pxform); } return -1; } static int jas_cmgetint(long **bufptr, int sgnd, int prec, long *val) { long v; int m; v = **bufptr; if (sgnd) { m = (1 << (prec - 1)); if (v < -m || v >= m) return -1; } else { if (v < 0 || v >= (1 << prec)) return -1; } ++(*bufptr); *val = v; return 0; } static int jas_cmputint(long **bufptr, int sgnd, int prec, long val) { int m; if (sgnd) { m = (1 << (prec - 1)); if (val < -m || val >= m) return -1; } else { if (val < 0 || val >= (1 << prec)) return -1; } **bufptr = val; ++(*bufptr); return 0; } int jas_clrspc_numchans(int clrspc) { switch (jas_clrspc_fam(clrspc)) { case JAS_CLRSPC_FAM_XYZ: case JAS_CLRSPC_FAM_LAB: case JAS_CLRSPC_FAM_RGB: case JAS_CLRSPC_FAM_YCBCR: return 3; break; case JAS_CLRSPC_FAM_GRAY: return 1; break; default: abort(); break; } } jas_iccprof_t *jas_iccprof_createfromcmprof(jas_cmprof_t *prof) { return jas_iccprof_copy(prof->iccprof); } jasper-1.900.1/src/libjasper/base/jas_init.c0000644000175000017500000001334210554235551017564 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" #include "jasper/jas_image.h" #include "jasper/jas_init.h" /******************************************************************************\ * Code. \******************************************************************************/ /* Initialize the image format table. */ int jas_init() { jas_image_fmtops_t fmtops; int fmtid; fmtid = 0; #if !defined(EXCLUDE_MIF_SUPPORT) fmtops.decode = mif_decode; fmtops.encode = mif_encode; fmtops.validate = mif_validate; jas_image_addfmt(fmtid, "mif", "mif", "My Image Format (MIF)", &fmtops); ++fmtid; #endif #if !defined(EXCLUDE_PNM_SUPPORT) fmtops.decode = pnm_decode; fmtops.encode = pnm_encode; fmtops.validate = pnm_validate; jas_image_addfmt(fmtid, "pnm", "pnm", "Portable Graymap/Pixmap (PNM)", &fmtops); jas_image_addfmt(fmtid, "pnm", "pgm", "Portable Graymap/Pixmap (PNM)", &fmtops); jas_image_addfmt(fmtid, "pnm", "ppm", "Portable Graymap/Pixmap (PNM)", &fmtops); ++fmtid; #endif #if !defined(EXCLUDE_BMP_SUPPORT) fmtops.decode = bmp_decode; fmtops.encode = bmp_encode; fmtops.validate = bmp_validate; jas_image_addfmt(fmtid, "bmp", "bmp", "Microsoft Bitmap (BMP)", &fmtops); ++fmtid; #endif #if !defined(EXCLUDE_RAS_SUPPORT) fmtops.decode = ras_decode; fmtops.encode = ras_encode; fmtops.validate = ras_validate; jas_image_addfmt(fmtid, "ras", "ras", "Sun Rasterfile (RAS)", &fmtops); ++fmtid; #endif #if !defined(EXCLUDE_JP2_SUPPORT) fmtops.decode = jp2_decode; fmtops.encode = jp2_encode; fmtops.validate = jp2_validate; jas_image_addfmt(fmtid, "jp2", "jp2", "JPEG-2000 JP2 File Format Syntax (ISO/IEC 15444-1)", &fmtops); ++fmtid; fmtops.decode = jpc_decode; fmtops.encode = jpc_encode; fmtops.validate = jpc_validate; jas_image_addfmt(fmtid, "jpc", "jpc", "JPEG-2000 Code Stream Syntax (ISO/IEC 15444-1)", &fmtops); ++fmtid; #endif #if !defined(EXCLUDE_JPG_SUPPORT) fmtops.decode = jpg_decode; fmtops.encode = jpg_encode; fmtops.validate = jpg_validate; jas_image_addfmt(fmtid, "jpg", "jpg", "JPEG (ISO/IEC 10918-1)", &fmtops); ++fmtid; #endif #if !defined(EXCLUDE_PGX_SUPPORT) fmtops.decode = pgx_decode; fmtops.encode = pgx_encode; fmtops.validate = pgx_validate; jas_image_addfmt(fmtid, "pgx", "pgx", "JPEG-2000 VM Format (PGX)", &fmtops); ++fmtid; #endif /* We must not register the JasPer library exit handler until after at least one memory allocation is performed. This is desirable as it ensures that the JasPer exit handler is called before the debug memory allocator exit handler. */ atexit(jas_cleanup); return 0; } void jas_cleanup() { jas_image_clearfmts(); } jasper-1.900.1/src/libjasper/base/jas_image.c0000644000175000017500000011203510554235551017702 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Image Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include #include "jasper/jas_math.h" #include "jasper/jas_image.h" #include "jasper/jas_malloc.h" #include "jasper/jas_string.h" /******************************************************************************\ * Types. \******************************************************************************/ #define FLOORDIV(x, y) ((x) / (y)) /******************************************************************************\ * Local prototypes. \******************************************************************************/ static jas_image_cmpt_t *jas_image_cmpt_create0(void); static void jas_image_cmpt_destroy(jas_image_cmpt_t *cmpt); static jas_image_cmpt_t *jas_image_cmpt_create(uint_fast32_t tlx, uint_fast32_t tly, uint_fast32_t hstep, uint_fast32_t vstep, uint_fast32_t width, uint_fast32_t height, uint_fast16_t depth, bool sgnd, uint_fast32_t inmem); static void jas_image_setbbox(jas_image_t *image); static jas_image_cmpt_t *jas_image_cmpt_copy(jas_image_cmpt_t *cmpt); static int jas_image_growcmpts(jas_image_t *image, int maxcmpts); static uint_fast32_t inttobits(jas_seqent_t v, int prec, bool sgnd); static jas_seqent_t bitstoint(uint_fast32_t v, int prec, bool sgnd); static int putint(jas_stream_t *out, int sgnd, int prec, long val); static int getint(jas_stream_t *in, int sgnd, int prec, long *val); static void jas_image_calcbbox2(jas_image_t *image, jas_image_coord_t *tlx, jas_image_coord_t *tly, jas_image_coord_t *brx, jas_image_coord_t *bry); static long uptomult(long x, long y); static long downtomult(long x, long y); static long convert(long val, int oldsgnd, int oldprec, int newsgnd, int newprec); static void jas_image_calcbbox2(jas_image_t *image, jas_image_coord_t *tlx, jas_image_coord_t *tly, jas_image_coord_t *brx, jas_image_coord_t *bry); /******************************************************************************\ * Global data. \******************************************************************************/ static int jas_image_numfmts = 0; static jas_image_fmtinfo_t jas_image_fmtinfos[JAS_IMAGE_MAXFMTS]; /******************************************************************************\ * Create and destroy operations. \******************************************************************************/ jas_image_t *jas_image_create(int numcmpts, jas_image_cmptparm_t *cmptparms, int clrspc) { jas_image_t *image; uint_fast32_t rawsize; uint_fast32_t inmem; int cmptno; jas_image_cmptparm_t *cmptparm; if (!(image = jas_image_create0())) { return 0; } image->clrspc_ = clrspc; image->maxcmpts_ = numcmpts; image->inmem_ = true; /* Allocate memory for the per-component information. */ if (!(image->cmpts_ = jas_malloc(image->maxcmpts_ * sizeof(jas_image_cmpt_t *)))) { jas_image_destroy(image); return 0; } /* Initialize in case of failure. */ for (cmptno = 0; cmptno < image->maxcmpts_; ++cmptno) { image->cmpts_[cmptno] = 0; } /* Compute the approximate raw size of the image. */ rawsize = 0; for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno, ++cmptparm) { rawsize += cmptparm->width * cmptparm->height * (cmptparm->prec + 7) / 8; } /* Decide whether to buffer the image data in memory, based on the raw size of the image. */ inmem = (rawsize < JAS_IMAGE_INMEMTHRESH); /* Create the individual image components. */ for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno, ++cmptparm) { if (!(image->cmpts_[cmptno] = jas_image_cmpt_create(cmptparm->tlx, cmptparm->tly, cmptparm->hstep, cmptparm->vstep, cmptparm->width, cmptparm->height, cmptparm->prec, cmptparm->sgnd, inmem))) { jas_image_destroy(image); return 0; } ++image->numcmpts_; } /* Determine the bounding box for all of the components on the reference grid (i.e., the image area) */ jas_image_setbbox(image); return image; } jas_image_t *jas_image_create0() { jas_image_t *image; if (!(image = jas_malloc(sizeof(jas_image_t)))) { return 0; } image->tlx_ = 0; image->tly_ = 0; image->brx_ = 0; image->bry_ = 0; image->clrspc_ = JAS_CLRSPC_UNKNOWN; image->numcmpts_ = 0; image->maxcmpts_ = 0; image->cmpts_ = 0; image->inmem_ = true; image->cmprof_ = 0; return image; } jas_image_t *jas_image_copy(jas_image_t *image) { jas_image_t *newimage; int cmptno; newimage = jas_image_create0(); if (jas_image_growcmpts(newimage, image->numcmpts_)) { goto error; } for (cmptno = 0; cmptno < image->numcmpts_; ++cmptno) { if (!(newimage->cmpts_[cmptno] = jas_image_cmpt_copy(image->cmpts_[cmptno]))) { goto error; } ++newimage->numcmpts_; } jas_image_setbbox(newimage); if (image->cmprof_) { if (!(newimage->cmprof_ = jas_cmprof_copy(image->cmprof_))) goto error; } return newimage; error: if (newimage) { jas_image_destroy(newimage); } return 0; } static jas_image_cmpt_t *jas_image_cmpt_create0() { jas_image_cmpt_t *cmpt; if (!(cmpt = jas_malloc(sizeof(jas_image_cmpt_t)))) { return 0; } memset(cmpt, 0, sizeof(jas_image_cmpt_t)); cmpt->type_ = JAS_IMAGE_CT_UNKNOWN; return cmpt; } static jas_image_cmpt_t *jas_image_cmpt_copy(jas_image_cmpt_t *cmpt) { jas_image_cmpt_t *newcmpt; if (!(newcmpt = jas_image_cmpt_create0())) { return 0; } newcmpt->tlx_ = cmpt->tlx_; newcmpt->tly_ = cmpt->tly_; newcmpt->hstep_ = cmpt->hstep_; newcmpt->vstep_ = cmpt->vstep_; newcmpt->width_ = cmpt->width_; newcmpt->height_ = cmpt->height_; newcmpt->prec_ = cmpt->prec_; newcmpt->sgnd_ = cmpt->sgnd_; newcmpt->cps_ = cmpt->cps_; newcmpt->type_ = cmpt->type_; if (!(newcmpt->stream_ = jas_stream_memopen(0, 0))) { return 0; } if (jas_stream_seek(cmpt->stream_, 0, SEEK_SET)) { return 0; } if (jas_stream_copy(newcmpt->stream_, cmpt->stream_, -1)) { return 0; } if (jas_stream_seek(newcmpt->stream_, 0, SEEK_SET)) { return 0; } return newcmpt; } void jas_image_destroy(jas_image_t *image) { int i; if (image->cmpts_) { for (i = 0; i < image->numcmpts_; ++i) { jas_image_cmpt_destroy(image->cmpts_[i]); image->cmpts_[i] = 0; } jas_free(image->cmpts_); } if (image->cmprof_) jas_cmprof_destroy(image->cmprof_); jas_free(image); } static jas_image_cmpt_t *jas_image_cmpt_create(uint_fast32_t tlx, uint_fast32_t tly, uint_fast32_t hstep, uint_fast32_t vstep, uint_fast32_t width, uint_fast32_t height, uint_fast16_t depth, bool sgnd, uint_fast32_t inmem) { jas_image_cmpt_t *cmpt; long size; if (!(cmpt = jas_malloc(sizeof(jas_image_cmpt_t)))) { return 0; } cmpt->type_ = JAS_IMAGE_CT_UNKNOWN; cmpt->tlx_ = tlx; cmpt->tly_ = tly; cmpt->hstep_ = hstep; cmpt->vstep_ = vstep; cmpt->width_ = width; cmpt->height_ = height; cmpt->prec_ = depth; cmpt->sgnd_ = sgnd; cmpt->stream_ = 0; cmpt->cps_ = (depth + 7) / 8; size = cmpt->width_ * cmpt->height_ * cmpt->cps_; cmpt->stream_ = (inmem) ? jas_stream_memopen(0, size) : jas_stream_tmpfile(); if (!cmpt->stream_) { jas_image_cmpt_destroy(cmpt); return 0; } /* Zero the component data. This isn't necessary, but it is convenient for debugging purposes. */ if (jas_stream_seek(cmpt->stream_, size - 1, SEEK_SET) < 0 || jas_stream_putc(cmpt->stream_, 0) == EOF || jas_stream_seek(cmpt->stream_, 0, SEEK_SET) < 0) { jas_image_cmpt_destroy(cmpt); return 0; } return cmpt; } static void jas_image_cmpt_destroy(jas_image_cmpt_t *cmpt) { if (cmpt->stream_) { jas_stream_close(cmpt->stream_); } jas_free(cmpt); } /******************************************************************************\ * Load and save operations. \******************************************************************************/ jas_image_t *jas_image_decode(jas_stream_t *in, int fmt, char *optstr) { jas_image_fmtinfo_t *fmtinfo; jas_image_t *image; image = 0; /* If possible, try to determine the format of the input data. */ if (fmt < 0) { if ((fmt = jas_image_getfmt(in)) < 0) goto error; } /* Is it possible to decode an image represented in this format? */ if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) goto error; if (!fmtinfo->ops.decode) goto error; /* Decode the image. */ if (!(image = (*fmtinfo->ops.decode)(in, optstr))) goto error; /* Create a color profile if needed. */ if (!jas_clrspc_isunknown(image->clrspc_) && !jas_clrspc_isgeneric(image->clrspc_) && !image->cmprof_) { if (!(image->cmprof_ = jas_cmprof_createfromclrspc(jas_image_clrspc(image)))) goto error; } return image; error: if (image) jas_image_destroy(image); return 0; } int jas_image_encode(jas_image_t *image, jas_stream_t *out, int fmt, char *optstr) { jas_image_fmtinfo_t *fmtinfo; if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) { return -1; } return (fmtinfo->ops.encode) ? (*fmtinfo->ops.encode)(image, out, optstr) : (-1); } /******************************************************************************\ * Component read and write operations. \******************************************************************************/ int jas_image_readcmpt(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, jas_matrix_t *data) { jas_image_cmpt_t *cmpt; jas_image_coord_t i; jas_image_coord_t j; int k; jas_seqent_t v; int c; jas_seqent_t *dr; jas_seqent_t *d; int drs; if (cmptno < 0 || cmptno >= image->numcmpts_) { return -1; } cmpt = image->cmpts_[cmptno]; if (x >= cmpt->width_ || y >= cmpt->height_ || x + width > cmpt->width_ || y + height > cmpt->height_) { return -1; } if (jas_matrix_numrows(data) != height || jas_matrix_numcols(data) != width) { if (jas_matrix_resize(data, height, width)) { return -1; } } dr = jas_matrix_getref(data, 0, 0); drs = jas_matrix_rowstep(data); for (i = 0; i < height; ++i, dr += drs) { d = dr; if (jas_stream_seek(cmpt->stream_, (cmpt->width_ * (y + i) + x) * cmpt->cps_, SEEK_SET) < 0) { return -1; } for (j = width; j > 0; --j, ++d) { v = 0; for (k = cmpt->cps_; k > 0; --k) { if ((c = jas_stream_getc(cmpt->stream_)) == EOF) { return -1; } v = (v << 8) | (c & 0xff); } *d = bitstoint(v, cmpt->prec_, cmpt->sgnd_); } } return 0; } int jas_image_writecmpt(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, jas_matrix_t *data) { jas_image_cmpt_t *cmpt; jas_image_coord_t i; jas_image_coord_t j; jas_seqent_t *d; jas_seqent_t *dr; int drs; jas_seqent_t v; int k; int c; if (cmptno < 0 || cmptno >= image->numcmpts_) { return -1; } cmpt = image->cmpts_[cmptno]; if (x >= cmpt->width_ || y >= cmpt->height_ || x + width > cmpt->width_ || y + height > cmpt->height_) { return -1; } if (jas_matrix_numrows(data) != height || jas_matrix_numcols(data) != width) { return -1; } dr = jas_matrix_getref(data, 0, 0); drs = jas_matrix_rowstep(data); for (i = 0; i < height; ++i, dr += drs) { d = dr; if (jas_stream_seek(cmpt->stream_, (cmpt->width_ * (y + i) + x) * cmpt->cps_, SEEK_SET) < 0) { return -1; } for (j = width; j > 0; --j, ++d) { v = inttobits(*d, cmpt->prec_, cmpt->sgnd_); for (k = cmpt->cps_; k > 0; --k) { c = (v >> (8 * (cmpt->cps_ - 1))) & 0xff; if (jas_stream_putc(cmpt->stream_, (unsigned char) c) == EOF) { return -1; } v <<= 8; } } } return 0; } /******************************************************************************\ * File format operations. \******************************************************************************/ void jas_image_clearfmts() { int i; jas_image_fmtinfo_t *fmtinfo; for (i = 0; i < jas_image_numfmts; ++i) { fmtinfo = &jas_image_fmtinfos[i]; if (fmtinfo->name) { jas_free(fmtinfo->name); fmtinfo->name = 0; } if (fmtinfo->ext) { jas_free(fmtinfo->ext); fmtinfo->ext = 0; } if (fmtinfo->desc) { jas_free(fmtinfo->desc); fmtinfo->desc = 0; } } jas_image_numfmts = 0; } int jas_image_addfmt(int id, char *name, char *ext, char *desc, jas_image_fmtops_t *ops) { jas_image_fmtinfo_t *fmtinfo; assert(id >= 0 && name && ext && ops); if (jas_image_numfmts >= JAS_IMAGE_MAXFMTS) { return -1; } fmtinfo = &jas_image_fmtinfos[jas_image_numfmts]; fmtinfo->id = id; if (!(fmtinfo->name = jas_strdup(name))) { return -1; } if (!(fmtinfo->ext = jas_strdup(ext))) { jas_free(fmtinfo->name); return -1; } if (!(fmtinfo->desc = jas_strdup(desc))) { jas_free(fmtinfo->name); jas_free(fmtinfo->ext); return -1; } fmtinfo->ops = *ops; ++jas_image_numfmts; return 0; } int jas_image_strtofmt(char *name) { jas_image_fmtinfo_t *fmtinfo; if (!(fmtinfo = jas_image_lookupfmtbyname(name))) { return -1; } return fmtinfo->id; } char *jas_image_fmttostr(int fmt) { jas_image_fmtinfo_t *fmtinfo; if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) { return 0; } return fmtinfo->name; } int jas_image_getfmt(jas_stream_t *in) { jas_image_fmtinfo_t *fmtinfo; int found; int i; /* Check for data in each of the supported formats. */ found = 0; for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) { if (fmtinfo->ops.validate) { /* Is the input data valid for this format? */ if (!(*fmtinfo->ops.validate)(in)) { found = 1; break; } } } return found ? fmtinfo->id : (-1); } int jas_image_fmtfromname(char *name) { int i; char *ext; jas_image_fmtinfo_t *fmtinfo; /* Get the file name extension. */ if (!(ext = strrchr(name, '.'))) { return -1; } ++ext; /* Try to find a format that uses this extension. */ for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) { /* Do we have a match? */ if (!strcmp(ext, fmtinfo->ext)) { return fmtinfo->id; } } return -1; } /******************************************************************************\ * Miscellaneous operations. \******************************************************************************/ uint_fast32_t jas_image_rawsize(jas_image_t *image) { uint_fast32_t rawsize; int cmptno; jas_image_cmpt_t *cmpt; rawsize = 0; for (cmptno = 0; cmptno < image->numcmpts_; ++cmptno) { cmpt = image->cmpts_[cmptno]; rawsize += (cmpt->width_ * cmpt->height_ * cmpt->prec_ + 7) / 8; } return rawsize; } void jas_image_delcmpt(jas_image_t *image, int cmptno) { if (cmptno >= image->numcmpts_) { return; } jas_image_cmpt_destroy(image->cmpts_[cmptno]); if (cmptno < image->numcmpts_) { memmove(&image->cmpts_[cmptno], &image->cmpts_[cmptno + 1], (image->numcmpts_ - 1 - cmptno) * sizeof(jas_image_cmpt_t *)); } --image->numcmpts_; jas_image_setbbox(image); } int jas_image_addcmpt(jas_image_t *image, int cmptno, jas_image_cmptparm_t *cmptparm) { jas_image_cmpt_t *newcmpt; if (cmptno < 0) cmptno = image->numcmpts_; assert(cmptno >= 0 && cmptno <= image->numcmpts_); if (image->numcmpts_ >= image->maxcmpts_) { if (jas_image_growcmpts(image, image->maxcmpts_ + 128)) { return -1; } } if (!(newcmpt = jas_image_cmpt_create(cmptparm->tlx, cmptparm->tly, cmptparm->hstep, cmptparm->vstep, cmptparm->width, cmptparm->height, cmptparm->prec, cmptparm->sgnd, 1))) { return -1; } if (cmptno < image->numcmpts_) { memmove(&image->cmpts_[cmptno + 1], &image->cmpts_[cmptno], (image->numcmpts_ - cmptno) * sizeof(jas_image_cmpt_t *)); } image->cmpts_[cmptno] = newcmpt; ++image->numcmpts_; jas_image_setbbox(image); return 0; } jas_image_fmtinfo_t *jas_image_lookupfmtbyid(int id) { int i; jas_image_fmtinfo_t *fmtinfo; for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) { if (fmtinfo->id == id) { return fmtinfo; } } return 0; } jas_image_fmtinfo_t *jas_image_lookupfmtbyname(const char *name) { int i; jas_image_fmtinfo_t *fmtinfo; for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinfo) { if (!strcmp(fmtinfo->name, name)) { return fmtinfo; } } return 0; } static uint_fast32_t inttobits(jas_seqent_t v, int prec, bool sgnd) { uint_fast32_t ret; ret = ((sgnd && v < 0) ? ((1 << prec) + v) : v) & JAS_ONES(prec); return ret; } static jas_seqent_t bitstoint(uint_fast32_t v, int prec, bool sgnd) { jas_seqent_t ret; v &= JAS_ONES(prec); ret = (sgnd && (v & (1 << (prec - 1)))) ? (v - (1 << prec)) : v; return ret; } static void jas_image_setbbox(jas_image_t *image) { jas_image_cmpt_t *cmpt; int cmptno; int_fast32_t x; int_fast32_t y; if (image->numcmpts_ > 0) { /* Determine the bounding box for all of the components on the reference grid (i.e., the image area) */ cmpt = image->cmpts_[0]; image->tlx_ = cmpt->tlx_; image->tly_ = cmpt->tly_; image->brx_ = cmpt->tlx_ + cmpt->hstep_ * (cmpt->width_ - 1) + 1; image->bry_ = cmpt->tly_ + cmpt->vstep_ * (cmpt->height_ - 1) + 1; for (cmptno = 1; cmptno < image->numcmpts_; ++cmptno) { cmpt = image->cmpts_[cmptno]; if (image->tlx_ > cmpt->tlx_) { image->tlx_ = cmpt->tlx_; } if (image->tly_ > cmpt->tly_) { image->tly_ = cmpt->tly_; } x = cmpt->tlx_ + cmpt->hstep_ * (cmpt->width_ - 1) + 1; if (image->brx_ < x) { image->brx_ = x; } y = cmpt->tly_ + cmpt->vstep_ * (cmpt->height_ - 1) + 1; if (image->bry_ < y) { image->bry_ = y; } } } else { image->tlx_ = 0; image->tly_ = 0; image->brx_ = 0; image->bry_ = 0; } } static int jas_image_growcmpts(jas_image_t *image, int maxcmpts) { jas_image_cmpt_t **newcmpts; int cmptno; newcmpts = (!image->cmpts_) ? jas_malloc(maxcmpts * sizeof(jas_image_cmpt_t *)) : jas_realloc(image->cmpts_, maxcmpts * sizeof(jas_image_cmpt_t *)); if (!newcmpts) { return -1; } image->cmpts_ = newcmpts; image->maxcmpts_ = maxcmpts; for (cmptno = image->numcmpts_; cmptno < image->maxcmpts_; ++cmptno) { image->cmpts_[cmptno] = 0; } return 0; } int jas_image_copycmpt(jas_image_t *dstimage, int dstcmptno, jas_image_t *srcimage, int srccmptno) { jas_image_cmpt_t *newcmpt; if (dstimage->numcmpts_ >= dstimage->maxcmpts_) { if (jas_image_growcmpts(dstimage, dstimage->maxcmpts_ + 128)) { return -1; } } if (!(newcmpt = jas_image_cmpt_copy(srcimage->cmpts_[srccmptno]))) { return -1; } if (dstcmptno < dstimage->numcmpts_) { memmove(&dstimage->cmpts_[dstcmptno + 1], &dstimage->cmpts_[dstcmptno], (dstimage->numcmpts_ - dstcmptno) * sizeof(jas_image_cmpt_t *)); } dstimage->cmpts_[dstcmptno] = newcmpt; ++dstimage->numcmpts_; jas_image_setbbox(dstimage); return 0; } void jas_image_dump(jas_image_t *image, FILE *out) { long buf[1024]; int cmptno; int n; int i; int width; int height; jas_image_cmpt_t *cmpt; for (cmptno = 0; cmptno < image->numcmpts_; ++cmptno) { cmpt = image->cmpts_[cmptno]; fprintf(out, "prec=%d, sgnd=%d, cmpttype=%d\n", cmpt->prec_, cmpt->sgnd_, cmpt->type_); width = jas_image_cmptwidth(image, cmptno); height = jas_image_cmptheight(image, cmptno); n = JAS_MIN(16, width); if (jas_image_readcmpt2(image, cmptno, 0, 0, n, 1, buf)) { abort(); } for (i = 0; i < n; ++i) { fprintf(out, " f(%d,%d)=%ld", i, 0, buf[i]); } fprintf(out, "\n"); if (jas_image_readcmpt2(image, cmptno, width - n, height - 1, n, 1, buf)) { abort(); } for (i = 0; i < n; ++i) { fprintf(out, " f(%d,%d)=%ld", width - n + i, height - 1, buf[i]); } fprintf(out, "\n"); } } int jas_image_depalettize(jas_image_t *image, int cmptno, int numlutents, int_fast32_t *lutents, int dtype, int newcmptno) { jas_image_cmptparm_t cmptparms; int_fast32_t v; int i; int j; jas_image_cmpt_t *cmpt; cmpt = image->cmpts_[cmptno]; cmptparms.tlx = cmpt->tlx_; cmptparms.tly = cmpt->tly_; cmptparms.hstep = cmpt->hstep_; cmptparms.vstep = cmpt->vstep_; cmptparms.width = cmpt->width_; cmptparms.height = cmpt->height_; cmptparms.prec = JAS_IMAGE_CDT_GETPREC(dtype); cmptparms.sgnd = JAS_IMAGE_CDT_GETSGND(dtype); if (jas_image_addcmpt(image, newcmptno, &cmptparms)) { return -1; } if (newcmptno <= cmptno) { ++cmptno; cmpt = image->cmpts_[cmptno]; } for (j = 0; j < cmpt->height_; ++j) { for (i = 0; i < cmpt->width_; ++i) { v = jas_image_readcmptsample(image, cmptno, i, j); if (v < 0) { v = 0; } else if (v >= numlutents) { v = numlutents - 1; } jas_image_writecmptsample(image, newcmptno, i, j, lutents[v]); } } return 0; } int jas_image_readcmptsample(jas_image_t *image, int cmptno, int x, int y) { jas_image_cmpt_t *cmpt; uint_fast32_t v; int k; int c; cmpt = image->cmpts_[cmptno]; if (jas_stream_seek(cmpt->stream_, (cmpt->width_ * y + x) * cmpt->cps_, SEEK_SET) < 0) { return -1; } v = 0; for (k = cmpt->cps_; k > 0; --k) { if ((c = jas_stream_getc(cmpt->stream_)) == EOF) { return -1; } v = (v << 8) | (c & 0xff); } return bitstoint(v, cmpt->prec_, cmpt->sgnd_); } void jas_image_writecmptsample(jas_image_t *image, int cmptno, int x, int y, int_fast32_t v) { jas_image_cmpt_t *cmpt; uint_fast32_t t; int k; int c; cmpt = image->cmpts_[cmptno]; if (jas_stream_seek(cmpt->stream_, (cmpt->width_ * y + x) * cmpt->cps_, SEEK_SET) < 0) { return; } t = inttobits(v, cmpt->prec_, cmpt->sgnd_); for (k = cmpt->cps_; k > 0; --k) { c = (t >> (8 * (cmpt->cps_ - 1))) & 0xff; if (jas_stream_putc(cmpt->stream_, (unsigned char) c) == EOF) { return; } t <<= 8; } } int jas_image_getcmptbytype(jas_image_t *image, int ctype) { int cmptno; for (cmptno = 0; cmptno < image->numcmpts_; ++cmptno) { if (image->cmpts_[cmptno]->type_ == ctype) { return cmptno; } } return -1; } /***********************************************/ /***********************************************/ /***********************************************/ /***********************************************/ int jas_image_readcmpt2(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, long *buf) { jas_image_cmpt_t *cmpt; jas_image_coord_t i; jas_image_coord_t j; long v; long *bufptr; if (cmptno < 0 || cmptno >= image->numcmpts_) goto error; cmpt = image->cmpts_[cmptno]; if (x < 0 || x >= cmpt->width_ || y < 0 || y >= cmpt->height_ || width < 0 || height < 0 || x + width > cmpt->width_ || y + height > cmpt->height_) goto error; bufptr = buf; for (i = 0; i < height; ++i) { if (jas_stream_seek(cmpt->stream_, (cmpt->width_ * (y + i) + x) * cmpt->cps_, SEEK_SET) < 0) goto error; for (j = 0; j < width; ++j) { if (getint(cmpt->stream_, cmpt->sgnd_, cmpt->prec_, &v)) goto error; *bufptr++ = v; } } return 0; error: return -1; } int jas_image_writecmpt2(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, long *buf) { jas_image_cmpt_t *cmpt; jas_image_coord_t i; jas_image_coord_t j; long v; long *bufptr; if (cmptno < 0 || cmptno >= image->numcmpts_) goto error; cmpt = image->cmpts_[cmptno]; if (x < 0 || x >= cmpt->width_ || y < 0 || y >= cmpt->height_ || width < 0 || height < 0 || x + width > cmpt->width_ || y + height > cmpt->height_) goto error; bufptr = buf; for (i = 0; i < height; ++i) { if (jas_stream_seek(cmpt->stream_, (cmpt->width_ * (y + i) + x) * cmpt->cps_, SEEK_SET) < 0) goto error; for (j = 0; j < width; ++j) { v = *bufptr++; if (putint(cmpt->stream_, cmpt->sgnd_, cmpt->prec_, v)) goto error; } } return 0; error: return -1; } int jas_image_sampcmpt(jas_image_t *image, int cmptno, int newcmptno, jas_image_coord_t ho, jas_image_coord_t vo, jas_image_coord_t hs, jas_image_coord_t vs, int sgnd, int prec) { jas_image_cmpt_t *oldcmpt; jas_image_cmpt_t *newcmpt; int width; int height; jas_image_coord_t tlx; jas_image_coord_t tly; jas_image_coord_t brx; jas_image_coord_t bry; int i; int j; jas_image_cmptparm_t cmptparm; jas_image_coord_t ax; jas_image_coord_t ay; jas_image_coord_t bx; jas_image_coord_t by; jas_image_coord_t d0; jas_image_coord_t d1; jas_image_coord_t d2; jas_image_coord_t d3; jas_image_coord_t oldx; jas_image_coord_t oldy; jas_image_coord_t x; jas_image_coord_t y; long v; jas_image_coord_t cmptbrx; jas_image_coord_t cmptbry; assert(cmptno >= 0 && cmptno < image->numcmpts_); oldcmpt = image->cmpts_[cmptno]; assert(oldcmpt->tlx_ == 0 && oldcmpt->tly_ == 0); jas_image_calcbbox2(image, &tlx, &tly, &brx, &bry); width = FLOORDIV(brx - ho + hs, hs); height = FLOORDIV(bry - vo + vs, vs); cmptparm.tlx = ho; cmptparm.tly = vo; cmptparm.hstep = hs; cmptparm.vstep = vs; cmptparm.width = width; cmptparm.height = height; cmptparm.prec = prec; cmptparm.sgnd = sgnd; if (jas_image_addcmpt(image, newcmptno, &cmptparm)) goto error; cmptbrx = oldcmpt->tlx_ + (oldcmpt->width_ - 1) * oldcmpt->hstep_; cmptbry = oldcmpt->tly_ + (oldcmpt->height_ - 1) * oldcmpt->vstep_; newcmpt = image->cmpts_[newcmptno]; jas_stream_rewind(newcmpt->stream_); for (i = 0; i < height; ++i) { y = newcmpt->tly_ + newcmpt->vstep_ * i; for (j = 0; j < width; ++j) { x = newcmpt->tlx_ + newcmpt->hstep_ * j; ax = downtomult(x - oldcmpt->tlx_, oldcmpt->hstep_) + oldcmpt->tlx_; ay = downtomult(y - oldcmpt->tly_, oldcmpt->vstep_) + oldcmpt->tly_; bx = uptomult(x - oldcmpt->tlx_, oldcmpt->hstep_) + oldcmpt->tlx_; if (bx > cmptbrx) bx = cmptbrx; by = uptomult(y - oldcmpt->tly_, oldcmpt->vstep_) + oldcmpt->tly_; if (by > cmptbry) by = cmptbry; d0 = (ax - x) * (ax - x) + (ay - y) * (ay - y); d1 = (bx - x) * (bx - x) + (ay - y) * (ay - y); d2 = (bx - x) * (bx - x) + (by - y) * (by - y); d3 = (ax - x) * (ax - x) + (by - y) * (by - y); if (d0 <= d1 && d0 <= d2 && d0 <= d3) { oldx = (ax - oldcmpt->tlx_) / oldcmpt->hstep_; oldy = (ay - oldcmpt->tly_) / oldcmpt->vstep_; } else if (d1 <= d0 && d1 <= d2 && d1 <= d3) { oldx = (bx - oldcmpt->tlx_) / oldcmpt->hstep_; oldy = (ay - oldcmpt->tly_) / oldcmpt->vstep_; } else if (d2 <= d0 && d2 <= d1 && d1 <= d3) { oldx = (bx - oldcmpt->tlx_) / oldcmpt->hstep_; oldy = (by - oldcmpt->tly_) / oldcmpt->vstep_; } else { oldx = (ax - oldcmpt->tlx_) / oldcmpt->hstep_; oldy = (by - oldcmpt->tly_) / oldcmpt->vstep_; } assert(oldx >= 0 && oldx < oldcmpt->width_ && oldy >= 0 && oldy < oldcmpt->height_); if (jas_stream_seek(oldcmpt->stream_, oldcmpt->cps_ * (oldy * oldcmpt->width_ + oldx), SEEK_SET) < 0) goto error; if (getint(oldcmpt->stream_, oldcmpt->sgnd_, oldcmpt->prec_, &v)) goto error; if (newcmpt->prec_ != oldcmpt->prec_ || newcmpt->sgnd_ != oldcmpt->sgnd_) { v = convert(v, oldcmpt->sgnd_, oldcmpt->prec_, newcmpt->sgnd_, newcmpt->prec_); } if (putint(newcmpt->stream_, newcmpt->sgnd_, newcmpt->prec_, v)) goto error; } } return 0; error: return -1; } int jas_image_ishomosamp(jas_image_t *image) { jas_image_coord_t hstep; jas_image_coord_t vstep; int result; int i; hstep = jas_image_cmpthstep(image, 0); vstep = jas_image_cmptvstep(image, 0); result = 1; for (i = 0; i < image->numcmpts_; ++i) { if (jas_image_cmpthstep(image, i) != hstep || jas_image_cmptvstep(image, i) != vstep) { result = 0; break; } } return result; } /* Note: This function defines a bounding box differently. */ static void jas_image_calcbbox2(jas_image_t *image, jas_image_coord_t *tlx, jas_image_coord_t *tly, jas_image_coord_t *brx, jas_image_coord_t *bry) { jas_image_cmpt_t *cmpt; jas_image_coord_t tmptlx; jas_image_coord_t tmptly; jas_image_coord_t tmpbrx; jas_image_coord_t tmpbry; jas_image_coord_t t; int i; if (image->numcmpts_ > 0) { cmpt = image->cmpts_[0]; tmptlx = cmpt->tlx_; tmptly = cmpt->tly_; tmpbrx = cmpt->tlx_ + cmpt->hstep_ * (cmpt->width_ - 1); tmpbry = cmpt->tly_ + cmpt->vstep_ * (cmpt->height_ - 1); for (i = 0; i < image->numcmpts_; ++i) { cmpt = image->cmpts_[i]; if (cmpt->tlx_ < tmptlx) tmptlx = cmpt->tlx_; if (cmpt->tly_ < tmptly) tmptly = cmpt->tly_; t = cmpt->tlx_ + cmpt->hstep_ * (cmpt->width_ - 1); if (t > tmpbrx) tmpbrx = t; t = cmpt->tly_ + cmpt->vstep_ * (cmpt->height_ - 1); if (t > tmpbry) tmpbry = t; } } else { tmptlx = 0; tmptly = 0; tmpbrx = -1; tmpbry = -1; } *tlx = tmptlx; *tly = tmptly; *brx = tmpbrx; *bry = tmpbry; } static int getint(jas_stream_t *in, int sgnd, int prec, long *val) { long v; int n; int c; n = (prec + 7) / 8; v = 0; while (--n >= 0) { if ((c = jas_stream_getc(in)) == EOF) return -1; v = (v << 8) | c; } v &= ((1 << prec) - 1); if (sgnd) { /* XXX - Do something here. */ abort(); } else { *val = v; } return 0; } static int putint(jas_stream_t *out, int sgnd, int prec, long val) { int n; int c; if (sgnd) { /* XXX - Do something here. */ abort(); } val &= (1 << prec) - 1; n = (prec + 7) / 8; while (--n >= 0) { c = (val >> (n * 8)) & 0xff; if (jas_stream_putc(out, c) != c) return -1; } return 0; } static long convert(long val, int oldsgnd, int oldprec, int newsgnd, int newprec) { if (newsgnd != oldsgnd) { } if (newprec != oldprec) { if (newprec > oldprec) { val <<= newprec - oldprec; } else if (oldprec > newprec) { val >>= oldprec - newprec; } } return val; } static long downtomult(long x, long y) { assert(x >= 0); return (x / y) * y; } static long uptomult(long x, long y) { assert(x >= 0); return ((x + y - 1) / y) * y; } jas_image_t *jas_image_chclrspc(jas_image_t *image, jas_cmprof_t *outprof, int intent) { jas_image_t *inimage; int minhstep; int minvstep; int i; int j; int k; int n; int hstep; int vstep; int numinauxchans; int numoutauxchans; int numinclrchans; int numoutclrchans; int prec; jas_image_t *outimage; int cmpttype; int numoutchans; jas_cmprof_t *inprof; jas_cmprof_t *tmpprof; jas_image_cmptparm_t cmptparm; int width; int height; jas_cmxform_t *xform; jas_cmpixmap_t inpixmap; jas_cmpixmap_t outpixmap; jas_cmcmptfmt_t *incmptfmts; jas_cmcmptfmt_t *outcmptfmts; #if 0 jas_eprintf("IMAGE\n"); jas_image_dump(image, stderr); #endif if (!(inimage = jas_image_copy(image))) goto error; image = 0; if (!jas_image_ishomosamp(inimage)) { minhstep = jas_image_cmpthstep(inimage, 0); minvstep = jas_image_cmptvstep(inimage, 0); for (i = 1; i < jas_image_numcmpts(inimage); ++i) { hstep = jas_image_cmpthstep(inimage, i); vstep = jas_image_cmptvstep(inimage, i); if (hstep < minhstep) minhstep = hstep; if (vstep < minvstep) minvstep = vstep; } n = jas_image_numcmpts(inimage); for (i = 0; i < n; ++i) { cmpttype = jas_image_cmpttype(inimage, i); if (jas_image_sampcmpt(inimage, i, i + 1, 0, 0, minhstep, minvstep, jas_image_cmptsgnd(inimage, i), jas_image_cmptprec(inimage, i))) goto error; jas_image_setcmpttype(inimage, i + 1, cmpttype); jas_image_delcmpt(inimage, i); } } width = jas_image_cmptwidth(inimage, 0); height = jas_image_cmptheight(inimage, 0); hstep = jas_image_cmpthstep(inimage, 0); vstep = jas_image_cmptvstep(inimage, 0); inprof = jas_image_cmprof(inimage); assert(inprof); numinclrchans = jas_clrspc_numchans(jas_cmprof_clrspc(inprof)); numinauxchans = jas_image_numcmpts(inimage) - numinclrchans; numoutclrchans = jas_clrspc_numchans(jas_cmprof_clrspc(outprof)); numoutauxchans = 0; numoutchans = numoutclrchans + numoutauxchans; prec = 8; if (!(outimage = jas_image_create0())) goto error; /* Create a component for each of the colorants. */ for (i = 0; i < numoutclrchans; ++i) { cmptparm.tlx = 0; cmptparm.tly = 0; cmptparm.hstep = hstep; cmptparm.vstep = vstep; cmptparm.width = width; cmptparm.height = height; cmptparm.prec = prec; cmptparm.sgnd = 0; if (jas_image_addcmpt(outimage, -1, &cmptparm)) goto error; jas_image_setcmpttype(outimage, i, JAS_IMAGE_CT_COLOR(i)); } #if 0 /* Copy the auxiliary components without modification. */ for (i = 0; i < jas_image_numcmpts(inimage); ++i) { if (!ISCOLOR(jas_image_cmpttype(inimage, i))) { jas_image_copycmpt(outimage, -1, inimage, i); /* XXX - need to specify laydown of component on ref. grid */ } } #endif if (!(tmpprof = jas_cmprof_copy(outprof))) goto error; assert(!jas_image_cmprof(outimage)); jas_image_setcmprof(outimage, tmpprof); tmpprof = 0; jas_image_setclrspc(outimage, jas_cmprof_clrspc(outprof)); if (!(xform = jas_cmxform_create(inprof, outprof, 0, JAS_CMXFORM_OP_FWD, intent, 0))) goto error; inpixmap.numcmpts = numinclrchans; incmptfmts = malloc(numinclrchans * sizeof(jas_cmcmptfmt_t)); assert(incmptfmts); inpixmap.cmptfmts = incmptfmts; for (i = 0; i < numinclrchans; ++i) { j = jas_image_getcmptbytype(inimage, JAS_IMAGE_CT_COLOR(i)); assert(j >= 0); if (!(incmptfmts[i].buf = malloc(width * sizeof(long)))) goto error; incmptfmts[i].prec = jas_image_cmptprec(inimage, j); incmptfmts[i].sgnd = jas_image_cmptsgnd(inimage, j); incmptfmts[i].width = width; incmptfmts[i].height = 1; } outpixmap.numcmpts = numoutclrchans; outcmptfmts = malloc(numoutclrchans * sizeof(jas_cmcmptfmt_t)); assert(outcmptfmts); outpixmap.cmptfmts = outcmptfmts; for (i = 0; i < numoutclrchans; ++i) { j = jas_image_getcmptbytype(outimage, JAS_IMAGE_CT_COLOR(i)); assert(j >= 0); if (!(outcmptfmts[i].buf = malloc(width * sizeof(long)))) goto error; outcmptfmts[i].prec = jas_image_cmptprec(outimage, j); outcmptfmts[i].sgnd = jas_image_cmptsgnd(outimage, j); outcmptfmts[i].width = width; outcmptfmts[i].height = 1; } for (i = 0; i < height; ++i) { for (j = 0; j < numinclrchans; ++j) { k = jas_image_getcmptbytype(inimage, JAS_IMAGE_CT_COLOR(j)); if (jas_image_readcmpt2(inimage, k, 0, i, width, 1, incmptfmts[j].buf)) goto error; } jas_cmxform_apply(xform, &inpixmap, &outpixmap); for (j = 0; j < numoutclrchans; ++j) { k = jas_image_getcmptbytype(outimage, JAS_IMAGE_CT_COLOR(j)); if (jas_image_writecmpt2(outimage, k, 0, i, width, 1, outcmptfmts[j].buf)) goto error; } } for (i = 0; i < numoutclrchans; ++i) jas_free(outcmptfmts[i].buf); jas_free(outcmptfmts); for (i = 0; i < numinclrchans; ++i) jas_free(incmptfmts[i].buf); jas_free(incmptfmts); jas_cmxform_destroy(xform); jas_image_destroy(inimage); #if 0 jas_eprintf("INIMAGE\n"); jas_image_dump(inimage, stderr); jas_eprintf("OUTIMAGE\n"); jas_image_dump(outimage, stderr); #endif return outimage; error: return 0; } jasper-1.900.1/src/libjasper/base/jas_iccdata.c0000644000175000017500000006061710554235551020220 0ustar ernieernie/* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #include #include uchar jas_iccprofdata_srgb[] = { 0x00, 0x00, 0x0c, 0x48, 0x4c, 0x69, 0x6e, 0x6f, 0x02, 0x10, 0x00, 0x00, 0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20, 0x07, 0xce, 0x00, 0x02, 0x00, 0x09, 0x00, 0x06, 0x00, 0x31, 0x00, 0x00, 0x61, 0x63, 0x73, 0x70, 0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x43, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x48, 0x50, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x50, 0x00, 0x00, 0x00, 0x33, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, 0x00, 0x6c, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x14, 0x62, 0x6b, 0x70, 0x74, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x14, 0x72, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x18, 0x00, 0x00, 0x00, 0x14, 0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x2c, 0x00, 0x00, 0x00, 0x14, 0x62, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x14, 0x64, 0x6d, 0x6e, 0x64, 0x00, 0x00, 0x02, 0x54, 0x00, 0x00, 0x00, 0x70, 0x64, 0x6d, 0x64, 0x64, 0x00, 0x00, 0x02, 0xc4, 0x00, 0x00, 0x00, 0x88, 0x76, 0x75, 0x65, 0x64, 0x00, 0x00, 0x03, 0x4c, 0x00, 0x00, 0x00, 0x86, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x03, 0xd4, 0x00, 0x00, 0x00, 0x24, 0x6c, 0x75, 0x6d, 0x69, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x14, 0x6d, 0x65, 0x61, 0x73, 0x00, 0x00, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x24, 0x74, 0x65, 0x63, 0x68, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, 0x08, 0x0c, 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, 0x08, 0x0c, 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, 0x08, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x31, 0x39, 0x39, 0x38, 0x20, 0x48, 0x65, 0x77, 0x6c, 0x65, 0x74, 0x74, 0x2d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x72, 0x64, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x73, 0x52, 0x47, 0x42, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x73, 0x52, 0x47, 0x42, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x51, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x16, 0xcc, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xa2, 0x00, 0x00, 0x38, 0xf5, 0x00, 0x00, 0x03, 0x90, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x99, 0x00, 0x00, 0xb7, 0x85, 0x00, 0x00, 0x18, 0xda, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xa0, 0x00, 0x00, 0x0f, 0x84, 0x00, 0x00, 0xb6, 0xcf, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x49, 0x45, 0x43, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x49, 0x45, 0x43, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52, 0x47, 0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52, 0x47, 0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xa4, 0xfe, 0x00, 0x14, 0x5f, 0x2e, 0x00, 0x10, 0xcf, 0x14, 0x00, 0x03, 0xed, 0xcc, 0x00, 0x04, 0x13, 0x0b, 0x00, 0x03, 0x5c, 0x9e, 0x00, 0x00, 0x00, 0x01, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x09, 0x56, 0x00, 0x50, 0x00, 0x00, 0x00, 0x57, 0x1f, 0xe7, 0x6d, 0x65, 0x61, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8f, 0x00, 0x00, 0x00, 0x02, 0x73, 0x69, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00, 0x43, 0x52, 0x54, 0x20, 0x63, 0x75, 0x72, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x14, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x23, 0x00, 0x28, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x37, 0x00, 0x3b, 0x00, 0x40, 0x00, 0x45, 0x00, 0x4a, 0x00, 0x4f, 0x00, 0x54, 0x00, 0x59, 0x00, 0x5e, 0x00, 0x63, 0x00, 0x68, 0x00, 0x6d, 0x00, 0x72, 0x00, 0x77, 0x00, 0x7c, 0x00, 0x81, 0x00, 0x86, 0x00, 0x8b, 0x00, 0x90, 0x00, 0x95, 0x00, 0x9a, 0x00, 0x9f, 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xae, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xc1, 0x00, 0xc6, 0x00, 0xcb, 0x00, 0xd0, 0x00, 0xd5, 0x00, 0xdb, 0x00, 0xe0, 0x00, 0xe5, 0x00, 0xeb, 0x00, 0xf0, 0x00, 0xf6, 0x00, 0xfb, 0x01, 0x01, 0x01, 0x07, 0x01, 0x0d, 0x01, 0x13, 0x01, 0x19, 0x01, 0x1f, 0x01, 0x25, 0x01, 0x2b, 0x01, 0x32, 0x01, 0x38, 0x01, 0x3e, 0x01, 0x45, 0x01, 0x4c, 0x01, 0x52, 0x01, 0x59, 0x01, 0x60, 0x01, 0x67, 0x01, 0x6e, 0x01, 0x75, 0x01, 0x7c, 0x01, 0x83, 0x01, 0x8b, 0x01, 0x92, 0x01, 0x9a, 0x01, 0xa1, 0x01, 0xa9, 0x01, 0xb1, 0x01, 0xb9, 0x01, 0xc1, 0x01, 0xc9, 0x01, 0xd1, 0x01, 0xd9, 0x01, 0xe1, 0x01, 0xe9, 0x01, 0xf2, 0x01, 0xfa, 0x02, 0x03, 0x02, 0x0c, 0x02, 0x14, 0x02, 0x1d, 0x02, 0x26, 0x02, 0x2f, 0x02, 0x38, 0x02, 0x41, 0x02, 0x4b, 0x02, 0x54, 0x02, 0x5d, 0x02, 0x67, 0x02, 0x71, 0x02, 0x7a, 0x02, 0x84, 0x02, 0x8e, 0x02, 0x98, 0x02, 0xa2, 0x02, 0xac, 0x02, 0xb6, 0x02, 0xc1, 0x02, 0xcb, 0x02, 0xd5, 0x02, 0xe0, 0x02, 0xeb, 0x02, 0xf5, 0x03, 0x00, 0x03, 0x0b, 0x03, 0x16, 0x03, 0x21, 0x03, 0x2d, 0x03, 0x38, 0x03, 0x43, 0x03, 0x4f, 0x03, 0x5a, 0x03, 0x66, 0x03, 0x72, 0x03, 0x7e, 0x03, 0x8a, 0x03, 0x96, 0x03, 0xa2, 0x03, 0xae, 0x03, 0xba, 0x03, 0xc7, 0x03, 0xd3, 0x03, 0xe0, 0x03, 0xec, 0x03, 0xf9, 0x04, 0x06, 0x04, 0x13, 0x04, 0x20, 0x04, 0x2d, 0x04, 0x3b, 0x04, 0x48, 0x04, 0x55, 0x04, 0x63, 0x04, 0x71, 0x04, 0x7e, 0x04, 0x8c, 0x04, 0x9a, 0x04, 0xa8, 0x04, 0xb6, 0x04, 0xc4, 0x04, 0xd3, 0x04, 0xe1, 0x04, 0xf0, 0x04, 0xfe, 0x05, 0x0d, 0x05, 0x1c, 0x05, 0x2b, 0x05, 0x3a, 0x05, 0x49, 0x05, 0x58, 0x05, 0x67, 0x05, 0x77, 0x05, 0x86, 0x05, 0x96, 0x05, 0xa6, 0x05, 0xb5, 0x05, 0xc5, 0x05, 0xd5, 0x05, 0xe5, 0x05, 0xf6, 0x06, 0x06, 0x06, 0x16, 0x06, 0x27, 0x06, 0x37, 0x06, 0x48, 0x06, 0x59, 0x06, 0x6a, 0x06, 0x7b, 0x06, 0x8c, 0x06, 0x9d, 0x06, 0xaf, 0x06, 0xc0, 0x06, 0xd1, 0x06, 0xe3, 0x06, 0xf5, 0x07, 0x07, 0x07, 0x19, 0x07, 0x2b, 0x07, 0x3d, 0x07, 0x4f, 0x07, 0x61, 0x07, 0x74, 0x07, 0x86, 0x07, 0x99, 0x07, 0xac, 0x07, 0xbf, 0x07, 0xd2, 0x07, 0xe5, 0x07, 0xf8, 0x08, 0x0b, 0x08, 0x1f, 0x08, 0x32, 0x08, 0x46, 0x08, 0x5a, 0x08, 0x6e, 0x08, 0x82, 0x08, 0x96, 0x08, 0xaa, 0x08, 0xbe, 0x08, 0xd2, 0x08, 0xe7, 0x08, 0xfb, 0x09, 0x10, 0x09, 0x25, 0x09, 0x3a, 0x09, 0x4f, 0x09, 0x64, 0x09, 0x79, 0x09, 0x8f, 0x09, 0xa4, 0x09, 0xba, 0x09, 0xcf, 0x09, 0xe5, 0x09, 0xfb, 0x0a, 0x11, 0x0a, 0x27, 0x0a, 0x3d, 0x0a, 0x54, 0x0a, 0x6a, 0x0a, 0x81, 0x0a, 0x98, 0x0a, 0xae, 0x0a, 0xc5, 0x0a, 0xdc, 0x0a, 0xf3, 0x0b, 0x0b, 0x0b, 0x22, 0x0b, 0x39, 0x0b, 0x51, 0x0b, 0x69, 0x0b, 0x80, 0x0b, 0x98, 0x0b, 0xb0, 0x0b, 0xc8, 0x0b, 0xe1, 0x0b, 0xf9, 0x0c, 0x12, 0x0c, 0x2a, 0x0c, 0x43, 0x0c, 0x5c, 0x0c, 0x75, 0x0c, 0x8e, 0x0c, 0xa7, 0x0c, 0xc0, 0x0c, 0xd9, 0x0c, 0xf3, 0x0d, 0x0d, 0x0d, 0x26, 0x0d, 0x40, 0x0d, 0x5a, 0x0d, 0x74, 0x0d, 0x8e, 0x0d, 0xa9, 0x0d, 0xc3, 0x0d, 0xde, 0x0d, 0xf8, 0x0e, 0x13, 0x0e, 0x2e, 0x0e, 0x49, 0x0e, 0x64, 0x0e, 0x7f, 0x0e, 0x9b, 0x0e, 0xb6, 0x0e, 0xd2, 0x0e, 0xee, 0x0f, 0x09, 0x0f, 0x25, 0x0f, 0x41, 0x0f, 0x5e, 0x0f, 0x7a, 0x0f, 0x96, 0x0f, 0xb3, 0x0f, 0xcf, 0x0f, 0xec, 0x10, 0x09, 0x10, 0x26, 0x10, 0x43, 0x10, 0x61, 0x10, 0x7e, 0x10, 0x9b, 0x10, 0xb9, 0x10, 0xd7, 0x10, 0xf5, 0x11, 0x13, 0x11, 0x31, 0x11, 0x4f, 0x11, 0x6d, 0x11, 0x8c, 0x11, 0xaa, 0x11, 0xc9, 0x11, 0xe8, 0x12, 0x07, 0x12, 0x26, 0x12, 0x45, 0x12, 0x64, 0x12, 0x84, 0x12, 0xa3, 0x12, 0xc3, 0x12, 0xe3, 0x13, 0x03, 0x13, 0x23, 0x13, 0x43, 0x13, 0x63, 0x13, 0x83, 0x13, 0xa4, 0x13, 0xc5, 0x13, 0xe5, 0x14, 0x06, 0x14, 0x27, 0x14, 0x49, 0x14, 0x6a, 0x14, 0x8b, 0x14, 0xad, 0x14, 0xce, 0x14, 0xf0, 0x15, 0x12, 0x15, 0x34, 0x15, 0x56, 0x15, 0x78, 0x15, 0x9b, 0x15, 0xbd, 0x15, 0xe0, 0x16, 0x03, 0x16, 0x26, 0x16, 0x49, 0x16, 0x6c, 0x16, 0x8f, 0x16, 0xb2, 0x16, 0xd6, 0x16, 0xfa, 0x17, 0x1d, 0x17, 0x41, 0x17, 0x65, 0x17, 0x89, 0x17, 0xae, 0x17, 0xd2, 0x17, 0xf7, 0x18, 0x1b, 0x18, 0x40, 0x18, 0x65, 0x18, 0x8a, 0x18, 0xaf, 0x18, 0xd5, 0x18, 0xfa, 0x19, 0x20, 0x19, 0x45, 0x19, 0x6b, 0x19, 0x91, 0x19, 0xb7, 0x19, 0xdd, 0x1a, 0x04, 0x1a, 0x2a, 0x1a, 0x51, 0x1a, 0x77, 0x1a, 0x9e, 0x1a, 0xc5, 0x1a, 0xec, 0x1b, 0x14, 0x1b, 0x3b, 0x1b, 0x63, 0x1b, 0x8a, 0x1b, 0xb2, 0x1b, 0xda, 0x1c, 0x02, 0x1c, 0x2a, 0x1c, 0x52, 0x1c, 0x7b, 0x1c, 0xa3, 0x1c, 0xcc, 0x1c, 0xf5, 0x1d, 0x1e, 0x1d, 0x47, 0x1d, 0x70, 0x1d, 0x99, 0x1d, 0xc3, 0x1d, 0xec, 0x1e, 0x16, 0x1e, 0x40, 0x1e, 0x6a, 0x1e, 0x94, 0x1e, 0xbe, 0x1e, 0xe9, 0x1f, 0x13, 0x1f, 0x3e, 0x1f, 0x69, 0x1f, 0x94, 0x1f, 0xbf, 0x1f, 0xea, 0x20, 0x15, 0x20, 0x41, 0x20, 0x6c, 0x20, 0x98, 0x20, 0xc4, 0x20, 0xf0, 0x21, 0x1c, 0x21, 0x48, 0x21, 0x75, 0x21, 0xa1, 0x21, 0xce, 0x21, 0xfb, 0x22, 0x27, 0x22, 0x55, 0x22, 0x82, 0x22, 0xaf, 0x22, 0xdd, 0x23, 0x0a, 0x23, 0x38, 0x23, 0x66, 0x23, 0x94, 0x23, 0xc2, 0x23, 0xf0, 0x24, 0x1f, 0x24, 0x4d, 0x24, 0x7c, 0x24, 0xab, 0x24, 0xda, 0x25, 0x09, 0x25, 0x38, 0x25, 0x68, 0x25, 0x97, 0x25, 0xc7, 0x25, 0xf7, 0x26, 0x27, 0x26, 0x57, 0x26, 0x87, 0x26, 0xb7, 0x26, 0xe8, 0x27, 0x18, 0x27, 0x49, 0x27, 0x7a, 0x27, 0xab, 0x27, 0xdc, 0x28, 0x0d, 0x28, 0x3f, 0x28, 0x71, 0x28, 0xa2, 0x28, 0xd4, 0x29, 0x06, 0x29, 0x38, 0x29, 0x6b, 0x29, 0x9d, 0x29, 0xd0, 0x2a, 0x02, 0x2a, 0x35, 0x2a, 0x68, 0x2a, 0x9b, 0x2a, 0xcf, 0x2b, 0x02, 0x2b, 0x36, 0x2b, 0x69, 0x2b, 0x9d, 0x2b, 0xd1, 0x2c, 0x05, 0x2c, 0x39, 0x2c, 0x6e, 0x2c, 0xa2, 0x2c, 0xd7, 0x2d, 0x0c, 0x2d, 0x41, 0x2d, 0x76, 0x2d, 0xab, 0x2d, 0xe1, 0x2e, 0x16, 0x2e, 0x4c, 0x2e, 0x82, 0x2e, 0xb7, 0x2e, 0xee, 0x2f, 0x24, 0x2f, 0x5a, 0x2f, 0x91, 0x2f, 0xc7, 0x2f, 0xfe, 0x30, 0x35, 0x30, 0x6c, 0x30, 0xa4, 0x30, 0xdb, 0x31, 0x12, 0x31, 0x4a, 0x31, 0x82, 0x31, 0xba, 0x31, 0xf2, 0x32, 0x2a, 0x32, 0x63, 0x32, 0x9b, 0x32, 0xd4, 0x33, 0x0d, 0x33, 0x46, 0x33, 0x7f, 0x33, 0xb8, 0x33, 0xf1, 0x34, 0x2b, 0x34, 0x65, 0x34, 0x9e, 0x34, 0xd8, 0x35, 0x13, 0x35, 0x4d, 0x35, 0x87, 0x35, 0xc2, 0x35, 0xfd, 0x36, 0x37, 0x36, 0x72, 0x36, 0xae, 0x36, 0xe9, 0x37, 0x24, 0x37, 0x60, 0x37, 0x9c, 0x37, 0xd7, 0x38, 0x14, 0x38, 0x50, 0x38, 0x8c, 0x38, 0xc8, 0x39, 0x05, 0x39, 0x42, 0x39, 0x7f, 0x39, 0xbc, 0x39, 0xf9, 0x3a, 0x36, 0x3a, 0x74, 0x3a, 0xb2, 0x3a, 0xef, 0x3b, 0x2d, 0x3b, 0x6b, 0x3b, 0xaa, 0x3b, 0xe8, 0x3c, 0x27, 0x3c, 0x65, 0x3c, 0xa4, 0x3c, 0xe3, 0x3d, 0x22, 0x3d, 0x61, 0x3d, 0xa1, 0x3d, 0xe0, 0x3e, 0x20, 0x3e, 0x60, 0x3e, 0xa0, 0x3e, 0xe0, 0x3f, 0x21, 0x3f, 0x61, 0x3f, 0xa2, 0x3f, 0xe2, 0x40, 0x23, 0x40, 0x64, 0x40, 0xa6, 0x40, 0xe7, 0x41, 0x29, 0x41, 0x6a, 0x41, 0xac, 0x41, 0xee, 0x42, 0x30, 0x42, 0x72, 0x42, 0xb5, 0x42, 0xf7, 0x43, 0x3a, 0x43, 0x7d, 0x43, 0xc0, 0x44, 0x03, 0x44, 0x47, 0x44, 0x8a, 0x44, 0xce, 0x45, 0x12, 0x45, 0x55, 0x45, 0x9a, 0x45, 0xde, 0x46, 0x22, 0x46, 0x67, 0x46, 0xab, 0x46, 0xf0, 0x47, 0x35, 0x47, 0x7b, 0x47, 0xc0, 0x48, 0x05, 0x48, 0x4b, 0x48, 0x91, 0x48, 0xd7, 0x49, 0x1d, 0x49, 0x63, 0x49, 0xa9, 0x49, 0xf0, 0x4a, 0x37, 0x4a, 0x7d, 0x4a, 0xc4, 0x4b, 0x0c, 0x4b, 0x53, 0x4b, 0x9a, 0x4b, 0xe2, 0x4c, 0x2a, 0x4c, 0x72, 0x4c, 0xba, 0x4d, 0x02, 0x4d, 0x4a, 0x4d, 0x93, 0x4d, 0xdc, 0x4e, 0x25, 0x4e, 0x6e, 0x4e, 0xb7, 0x4f, 0x00, 0x4f, 0x49, 0x4f, 0x93, 0x4f, 0xdd, 0x50, 0x27, 0x50, 0x71, 0x50, 0xbb, 0x51, 0x06, 0x51, 0x50, 0x51, 0x9b, 0x51, 0xe6, 0x52, 0x31, 0x52, 0x7c, 0x52, 0xc7, 0x53, 0x13, 0x53, 0x5f, 0x53, 0xaa, 0x53, 0xf6, 0x54, 0x42, 0x54, 0x8f, 0x54, 0xdb, 0x55, 0x28, 0x55, 0x75, 0x55, 0xc2, 0x56, 0x0f, 0x56, 0x5c, 0x56, 0xa9, 0x56, 0xf7, 0x57, 0x44, 0x57, 0x92, 0x57, 0xe0, 0x58, 0x2f, 0x58, 0x7d, 0x58, 0xcb, 0x59, 0x1a, 0x59, 0x69, 0x59, 0xb8, 0x5a, 0x07, 0x5a, 0x56, 0x5a, 0xa6, 0x5a, 0xf5, 0x5b, 0x45, 0x5b, 0x95, 0x5b, 0xe5, 0x5c, 0x35, 0x5c, 0x86, 0x5c, 0xd6, 0x5d, 0x27, 0x5d, 0x78, 0x5d, 0xc9, 0x5e, 0x1a, 0x5e, 0x6c, 0x5e, 0xbd, 0x5f, 0x0f, 0x5f, 0x61, 0x5f, 0xb3, 0x60, 0x05, 0x60, 0x57, 0x60, 0xaa, 0x60, 0xfc, 0x61, 0x4f, 0x61, 0xa2, 0x61, 0xf5, 0x62, 0x49, 0x62, 0x9c, 0x62, 0xf0, 0x63, 0x43, 0x63, 0x97, 0x63, 0xeb, 0x64, 0x40, 0x64, 0x94, 0x64, 0xe9, 0x65, 0x3d, 0x65, 0x92, 0x65, 0xe7, 0x66, 0x3d, 0x66, 0x92, 0x66, 0xe8, 0x67, 0x3d, 0x67, 0x93, 0x67, 0xe9, 0x68, 0x3f, 0x68, 0x96, 0x68, 0xec, 0x69, 0x43, 0x69, 0x9a, 0x69, 0xf1, 0x6a, 0x48, 0x6a, 0x9f, 0x6a, 0xf7, 0x6b, 0x4f, 0x6b, 0xa7, 0x6b, 0xff, 0x6c, 0x57, 0x6c, 0xaf, 0x6d, 0x08, 0x6d, 0x60, 0x6d, 0xb9, 0x6e, 0x12, 0x6e, 0x6b, 0x6e, 0xc4, 0x6f, 0x1e, 0x6f, 0x78, 0x6f, 0xd1, 0x70, 0x2b, 0x70, 0x86, 0x70, 0xe0, 0x71, 0x3a, 0x71, 0x95, 0x71, 0xf0, 0x72, 0x4b, 0x72, 0xa6, 0x73, 0x01, 0x73, 0x5d, 0x73, 0xb8, 0x74, 0x14, 0x74, 0x70, 0x74, 0xcc, 0x75, 0x28, 0x75, 0x85, 0x75, 0xe1, 0x76, 0x3e, 0x76, 0x9b, 0x76, 0xf8, 0x77, 0x56, 0x77, 0xb3, 0x78, 0x11, 0x78, 0x6e, 0x78, 0xcc, 0x79, 0x2a, 0x79, 0x89, 0x79, 0xe7, 0x7a, 0x46, 0x7a, 0xa5, 0x7b, 0x04, 0x7b, 0x63, 0x7b, 0xc2, 0x7c, 0x21, 0x7c, 0x81, 0x7c, 0xe1, 0x7d, 0x41, 0x7d, 0xa1, 0x7e, 0x01, 0x7e, 0x62, 0x7e, 0xc2, 0x7f, 0x23, 0x7f, 0x84, 0x7f, 0xe5, 0x80, 0x47, 0x80, 0xa8, 0x81, 0x0a, 0x81, 0x6b, 0x81, 0xcd, 0x82, 0x30, 0x82, 0x92, 0x82, 0xf4, 0x83, 0x57, 0x83, 0xba, 0x84, 0x1d, 0x84, 0x80, 0x84, 0xe3, 0x85, 0x47, 0x85, 0xab, 0x86, 0x0e, 0x86, 0x72, 0x86, 0xd7, 0x87, 0x3b, 0x87, 0x9f, 0x88, 0x04, 0x88, 0x69, 0x88, 0xce, 0x89, 0x33, 0x89, 0x99, 0x89, 0xfe, 0x8a, 0x64, 0x8a, 0xca, 0x8b, 0x30, 0x8b, 0x96, 0x8b, 0xfc, 0x8c, 0x63, 0x8c, 0xca, 0x8d, 0x31, 0x8d, 0x98, 0x8d, 0xff, 0x8e, 0x66, 0x8e, 0xce, 0x8f, 0x36, 0x8f, 0x9e, 0x90, 0x06, 0x90, 0x6e, 0x90, 0xd6, 0x91, 0x3f, 0x91, 0xa8, 0x92, 0x11, 0x92, 0x7a, 0x92, 0xe3, 0x93, 0x4d, 0x93, 0xb6, 0x94, 0x20, 0x94, 0x8a, 0x94, 0xf4, 0x95, 0x5f, 0x95, 0xc9, 0x96, 0x34, 0x96, 0x9f, 0x97, 0x0a, 0x97, 0x75, 0x97, 0xe0, 0x98, 0x4c, 0x98, 0xb8, 0x99, 0x24, 0x99, 0x90, 0x99, 0xfc, 0x9a, 0x68, 0x9a, 0xd5, 0x9b, 0x42, 0x9b, 0xaf, 0x9c, 0x1c, 0x9c, 0x89, 0x9c, 0xf7, 0x9d, 0x64, 0x9d, 0xd2, 0x9e, 0x40, 0x9e, 0xae, 0x9f, 0x1d, 0x9f, 0x8b, 0x9f, 0xfa, 0xa0, 0x69, 0xa0, 0xd8, 0xa1, 0x47, 0xa1, 0xb6, 0xa2, 0x26, 0xa2, 0x96, 0xa3, 0x06, 0xa3, 0x76, 0xa3, 0xe6, 0xa4, 0x56, 0xa4, 0xc7, 0xa5, 0x38, 0xa5, 0xa9, 0xa6, 0x1a, 0xa6, 0x8b, 0xa6, 0xfd, 0xa7, 0x6e, 0xa7, 0xe0, 0xa8, 0x52, 0xa8, 0xc4, 0xa9, 0x37, 0xa9, 0xa9, 0xaa, 0x1c, 0xaa, 0x8f, 0xab, 0x02, 0xab, 0x75, 0xab, 0xe9, 0xac, 0x5c, 0xac, 0xd0, 0xad, 0x44, 0xad, 0xb8, 0xae, 0x2d, 0xae, 0xa1, 0xaf, 0x16, 0xaf, 0x8b, 0xb0, 0x00, 0xb0, 0x75, 0xb0, 0xea, 0xb1, 0x60, 0xb1, 0xd6, 0xb2, 0x4b, 0xb2, 0xc2, 0xb3, 0x38, 0xb3, 0xae, 0xb4, 0x25, 0xb4, 0x9c, 0xb5, 0x13, 0xb5, 0x8a, 0xb6, 0x01, 0xb6, 0x79, 0xb6, 0xf0, 0xb7, 0x68, 0xb7, 0xe0, 0xb8, 0x59, 0xb8, 0xd1, 0xb9, 0x4a, 0xb9, 0xc2, 0xba, 0x3b, 0xba, 0xb5, 0xbb, 0x2e, 0xbb, 0xa7, 0xbc, 0x21, 0xbc, 0x9b, 0xbd, 0x15, 0xbd, 0x8f, 0xbe, 0x0a, 0xbe, 0x84, 0xbe, 0xff, 0xbf, 0x7a, 0xbf, 0xf5, 0xc0, 0x70, 0xc0, 0xec, 0xc1, 0x67, 0xc1, 0xe3, 0xc2, 0x5f, 0xc2, 0xdb, 0xc3, 0x58, 0xc3, 0xd4, 0xc4, 0x51, 0xc4, 0xce, 0xc5, 0x4b, 0xc5, 0xc8, 0xc6, 0x46, 0xc6, 0xc3, 0xc7, 0x41, 0xc7, 0xbf, 0xc8, 0x3d, 0xc8, 0xbc, 0xc9, 0x3a, 0xc9, 0xb9, 0xca, 0x38, 0xca, 0xb7, 0xcb, 0x36, 0xcb, 0xb6, 0xcc, 0x35, 0xcc, 0xb5, 0xcd, 0x35, 0xcd, 0xb5, 0xce, 0x36, 0xce, 0xb6, 0xcf, 0x37, 0xcf, 0xb8, 0xd0, 0x39, 0xd0, 0xba, 0xd1, 0x3c, 0xd1, 0xbe, 0xd2, 0x3f, 0xd2, 0xc1, 0xd3, 0x44, 0xd3, 0xc6, 0xd4, 0x49, 0xd4, 0xcb, 0xd5, 0x4e, 0xd5, 0xd1, 0xd6, 0x55, 0xd6, 0xd8, 0xd7, 0x5c, 0xd7, 0xe0, 0xd8, 0x64, 0xd8, 0xe8, 0xd9, 0x6c, 0xd9, 0xf1, 0xda, 0x76, 0xda, 0xfb, 0xdb, 0x80, 0xdc, 0x05, 0xdc, 0x8a, 0xdd, 0x10, 0xdd, 0x96, 0xde, 0x1c, 0xde, 0xa2, 0xdf, 0x29, 0xdf, 0xaf, 0xe0, 0x36, 0xe0, 0xbd, 0xe1, 0x44, 0xe1, 0xcc, 0xe2, 0x53, 0xe2, 0xdb, 0xe3, 0x63, 0xe3, 0xeb, 0xe4, 0x73, 0xe4, 0xfc, 0xe5, 0x84, 0xe6, 0x0d, 0xe6, 0x96, 0xe7, 0x1f, 0xe7, 0xa9, 0xe8, 0x32, 0xe8, 0xbc, 0xe9, 0x46, 0xe9, 0xd0, 0xea, 0x5b, 0xea, 0xe5, 0xeb, 0x70, 0xeb, 0xfb, 0xec, 0x86, 0xed, 0x11, 0xed, 0x9c, 0xee, 0x28, 0xee, 0xb4, 0xef, 0x40, 0xef, 0xcc, 0xf0, 0x58, 0xf0, 0xe5, 0xf1, 0x72, 0xf1, 0xff, 0xf2, 0x8c, 0xf3, 0x19, 0xf3, 0xa7, 0xf4, 0x34, 0xf4, 0xc2, 0xf5, 0x50, 0xf5, 0xde, 0xf6, 0x6d, 0xf6, 0xfb, 0xf7, 0x8a, 0xf8, 0x19, 0xf8, 0xa8, 0xf9, 0x38, 0xf9, 0xc7, 0xfa, 0x57, 0xfa, 0xe7, 0xfb, 0x77, 0xfc, 0x07, 0xfc, 0x98, 0xfd, 0x29, 0xfd, 0xba, 0xfe, 0x4b, 0xfe, 0xdc, 0xff, 0x6d, 0xff, 0xff }; int jas_iccprofdata_srgblen = sizeof(jas_iccprofdata_srgb); uchar jas_iccprofdata_sgray[] = { 0x00, 0x00, 0x01, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x73, 0x63, 0x6e, 0x72, 0x47, 0x52, 0x41, 0x59, 0x58, 0x59, 0x5a, 0x20, 0x07, 0xd3, 0x00, 0x01, 0x00, 0x1f, 0x00, 0x0d, 0x00, 0x35, 0x00, 0x21, 0x61, 0x63, 0x73, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x4b, 0x4f, 0x44, 0x41, 0x73, 0x47, 0x72, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x4a, 0x50, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x86, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x2b, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0x68, 0x00, 0x00, 0x00, 0x14, 0x6b, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x20, 0x49, 0x43, 0x43, 0x20, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x52, 0x47, 0x42, 0x2d, 0x67, 0x72, 0x65, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x33, 0x20, 0x73, 0x52, 0x47, 0x42, 0x2d, 0x67, 0x72, 0x65, 0x79, 0x20, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x54, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x16, 0xcf, 0x63, 0x75, 0x72, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0xcd }; int jas_iccprofdata_sgraylen = sizeof(jas_iccprofdata_sgray); jasper-1.900.1/src/libjasper/base/jas_icc.c0000644000175000017500000013553410554235551017367 0ustar ernieernie/* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #include #include #include #include #include #include #include #include #include #include #include #define jas_iccputuint8(out, val) jas_iccputuint(out, 1, val) #define jas_iccputuint16(out, val) jas_iccputuint(out, 2, val) #define jas_iccputsint32(out, val) jas_iccputsint(out, 4, val) #define jas_iccputuint32(out, val) jas_iccputuint(out, 4, val) #define jas_iccputuint64(out, val) jas_iccputuint(out, 8, val) static jas_iccattrval_t *jas_iccattrval_create0(void); static int jas_iccgetuint(jas_stream_t *in, int n, ulonglong *val); static int jas_iccgetuint8(jas_stream_t *in, jas_iccuint8_t *val); static int jas_iccgetuint16(jas_stream_t *in, jas_iccuint16_t *val); static int jas_iccgetsint32(jas_stream_t *in, jas_iccsint32_t *val); static int jas_iccgetuint32(jas_stream_t *in, jas_iccuint32_t *val); static int jas_iccgetuint64(jas_stream_t *in, jas_iccuint64_t *val); static int jas_iccputuint(jas_stream_t *out, int n, ulonglong val); static int jas_iccputsint(jas_stream_t *out, int n, longlong val); static jas_iccprof_t *jas_iccprof_create(void); static int jas_iccprof_readhdr(jas_stream_t *in, jas_icchdr_t *hdr); static int jas_iccprof_writehdr(jas_stream_t *out, jas_icchdr_t *hdr); static int jas_iccprof_gettagtab(jas_stream_t *in, jas_icctagtab_t *tagtab); static void jas_iccprof_sorttagtab(jas_icctagtab_t *tagtab); static int jas_iccattrtab_lookup(jas_iccattrtab_t *attrtab, jas_iccuint32_t name); static jas_iccattrtab_t *jas_iccattrtab_copy(jas_iccattrtab_t *attrtab); static jas_iccattrvalinfo_t *jas_iccattrvalinfo_lookup(jas_iccsig_t name); static int jas_iccgettime(jas_stream_t *in, jas_icctime_t *time); static int jas_iccgetxyz(jas_stream_t *in, jas_iccxyz_t *xyz); static int jas_icctagtabent_cmp(const void *src, const void *dst); static void jas_icccurv_destroy(jas_iccattrval_t *attrval); static int jas_icccurv_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval); static int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt); static int jas_icccurv_getsize(jas_iccattrval_t *attrval); static int jas_icccurv_output(jas_iccattrval_t *attrval, jas_stream_t *out); static void jas_icccurv_dump(jas_iccattrval_t *attrval, FILE *out); static void jas_icctxtdesc_destroy(jas_iccattrval_t *attrval); static int jas_icctxtdesc_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval); static int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt); static int jas_icctxtdesc_getsize(jas_iccattrval_t *attrval); static int jas_icctxtdesc_output(jas_iccattrval_t *attrval, jas_stream_t *out); static void jas_icctxtdesc_dump(jas_iccattrval_t *attrval, FILE *out); static void jas_icctxt_destroy(jas_iccattrval_t *attrval); static int jas_icctxt_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval); static int jas_icctxt_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt); static int jas_icctxt_getsize(jas_iccattrval_t *attrval); static int jas_icctxt_output(jas_iccattrval_t *attrval, jas_stream_t *out); static void jas_icctxt_dump(jas_iccattrval_t *attrval, FILE *out); static int jas_iccxyz_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt); static int jas_iccxyz_getsize(jas_iccattrval_t *attrval); static int jas_iccxyz_output(jas_iccattrval_t *attrval, jas_stream_t *out); static void jas_iccxyz_dump(jas_iccattrval_t *attrval, FILE *out); static jas_iccattrtab_t *jas_iccattrtab_create(void); static void jas_iccattrtab_destroy(jas_iccattrtab_t *tab); static int jas_iccattrtab_resize(jas_iccattrtab_t *tab, int maxents); static int jas_iccattrtab_add(jas_iccattrtab_t *attrtab, int i, jas_iccuint32_t name, jas_iccattrval_t *val); static int jas_iccattrtab_replace(jas_iccattrtab_t *attrtab, int i, jas_iccuint32_t name, jas_iccattrval_t *val); static void jas_iccattrtab_delete(jas_iccattrtab_t *attrtab, int i); static long jas_iccpadtomult(long x, long y); static int jas_iccattrtab_get(jas_iccattrtab_t *attrtab, int i, jas_iccattrname_t *name, jas_iccattrval_t **val); static int jas_iccprof_puttagtab(jas_stream_t *out, jas_icctagtab_t *tagtab); static void jas_icclut16_destroy(jas_iccattrval_t *attrval); static int jas_icclut16_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval); static int jas_icclut16_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt); static int jas_icclut16_getsize(jas_iccattrval_t *attrval); static int jas_icclut16_output(jas_iccattrval_t *attrval, jas_stream_t *out); static void jas_icclut16_dump(jas_iccattrval_t *attrval, FILE *out); static void jas_icclut8_destroy(jas_iccattrval_t *attrval); static int jas_icclut8_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval); static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt); static int jas_icclut8_getsize(jas_iccattrval_t *attrval); static int jas_icclut8_output(jas_iccattrval_t *attrval, jas_stream_t *out); static void jas_icclut8_dump(jas_iccattrval_t *attrval, FILE *out); static int jas_iccputtime(jas_stream_t *out, jas_icctime_t *ctime); static int jas_iccputxyz(jas_stream_t *out, jas_iccxyz_t *xyz); static long jas_iccpowi(int x, int n); static char *jas_iccsigtostr(int sig, char *buf); jas_iccattrvalinfo_t jas_iccattrvalinfos[] = { {JAS_ICC_TYPE_CURV, {jas_icccurv_destroy, jas_icccurv_copy, jas_icccurv_input, jas_icccurv_output, jas_icccurv_getsize, jas_icccurv_dump}}, {JAS_ICC_TYPE_XYZ, {0, 0, jas_iccxyz_input, jas_iccxyz_output, jas_iccxyz_getsize, jas_iccxyz_dump}}, {JAS_ICC_TYPE_TXTDESC, {jas_icctxtdesc_destroy, jas_icctxtdesc_copy, jas_icctxtdesc_input, jas_icctxtdesc_output, jas_icctxtdesc_getsize, jas_icctxtdesc_dump}}, {JAS_ICC_TYPE_TXT, {jas_icctxt_destroy, jas_icctxt_copy, jas_icctxt_input, jas_icctxt_output, jas_icctxt_getsize, jas_icctxt_dump}}, {JAS_ICC_TYPE_LUT8, {jas_icclut8_destroy, jas_icclut8_copy, jas_icclut8_input, jas_icclut8_output, jas_icclut8_getsize, jas_icclut8_dump}}, {JAS_ICC_TYPE_LUT16, {jas_icclut16_destroy, jas_icclut16_copy, jas_icclut16_input, jas_icclut16_output, jas_icclut16_getsize, jas_icclut16_dump}}, {0, {0, 0, 0, 0, 0, 0}} }; typedef struct { jas_iccuint32_t tag; char *name; } jas_icctaginfo_t; /******************************************************************************\ * profile class \******************************************************************************/ static jas_iccprof_t *jas_iccprof_create() { jas_iccprof_t *prof; prof = 0; if (!(prof = jas_malloc(sizeof(jas_iccprof_t)))) { goto error; } if (!(prof->attrtab = jas_iccattrtab_create())) goto error; memset(&prof->hdr, 0, sizeof(jas_icchdr_t)); prof->tagtab.numents = 0; prof->tagtab.ents = 0; return prof; error: if (prof) jas_iccprof_destroy(prof); return 0; } jas_iccprof_t *jas_iccprof_copy(jas_iccprof_t *prof) { jas_iccprof_t *newprof; newprof = 0; if (!(newprof = jas_iccprof_create())) goto error; newprof->hdr = prof->hdr; newprof->tagtab.numents = 0; newprof->tagtab.ents = 0; assert(newprof->attrtab); jas_iccattrtab_destroy(newprof->attrtab); if (!(newprof->attrtab = jas_iccattrtab_copy(prof->attrtab))) goto error; return newprof; error: if (newprof) jas_iccprof_destroy(newprof); return 0; } void jas_iccprof_destroy(jas_iccprof_t *prof) { if (prof->attrtab) jas_iccattrtab_destroy(prof->attrtab); if (prof->tagtab.ents) jas_free(prof->tagtab.ents); jas_free(prof); } void jas_iccprof_dump(jas_iccprof_t *prof, FILE *out) { jas_iccattrtab_dump(prof->attrtab, out); } jas_iccprof_t *jas_iccprof_load(jas_stream_t *in) { jas_iccprof_t *prof; int numtags; long curoff; long reloff; long prevoff; jas_iccsig_t type; jas_iccattrval_t *attrval; jas_iccattrval_t *prevattrval; jas_icctagtabent_t *tagtabent; jas_iccattrvalinfo_t *attrvalinfo; int i; int len; prof = 0; attrval = 0; if (!(prof = jas_iccprof_create())) { goto error; } if (jas_iccprof_readhdr(in, &prof->hdr)) { jas_eprintf("cannot get header\n"); goto error; } if (jas_iccprof_gettagtab(in, &prof->tagtab)) { jas_eprintf("cannot get tab table\n"); goto error; } jas_iccprof_sorttagtab(&prof->tagtab); numtags = prof->tagtab.numents; curoff = JAS_ICC_HDRLEN + 4 + 12 * numtags; prevoff = 0; prevattrval = 0; for (i = 0; i < numtags; ++i) { tagtabent = &prof->tagtab.ents[i]; if (tagtabent->off == JAS_CAST(jas_iccuint32_t, prevoff)) { if (prevattrval) { if (!(attrval = jas_iccattrval_clone(prevattrval))) goto error; if (jas_iccprof_setattr(prof, tagtabent->tag, attrval)) goto error; jas_iccattrval_destroy(attrval); } else { #if 0 jas_eprintf("warning: skipping unknown tag type\n"); #endif } continue; } reloff = tagtabent->off - curoff; if (reloff > 0) { if (jas_stream_gobble(in, reloff) != reloff) goto error; curoff += reloff; } else if (reloff < 0) { /* This should never happen since we read the tagged element data in a single pass. */ abort(); } prevoff = curoff; if (jas_iccgetuint32(in, &type)) { goto error; } if (jas_stream_gobble(in, 4) != 4) { goto error; } curoff += 8; if (!(attrvalinfo = jas_iccattrvalinfo_lookup(type))) { #if 0 jas_eprintf("warning: skipping unknown tag type\n"); #endif prevattrval = 0; continue; } if (!(attrval = jas_iccattrval_create(type))) { goto error; } len = tagtabent->len - 8; if ((*attrval->ops->input)(attrval, in, len)) { goto error; } curoff += len; if (jas_iccprof_setattr(prof, tagtabent->tag, attrval)) { goto error; } prevattrval = attrval; /* This is correct, but slimey. */ jas_iccattrval_destroy(attrval); attrval = 0; } return prof; error: if (prof) jas_iccprof_destroy(prof); if (attrval) jas_iccattrval_destroy(attrval); return 0; } int jas_iccprof_save(jas_iccprof_t *prof, jas_stream_t *out) { long curoff; long reloff; long newoff; int i; int j; jas_icctagtabent_t *tagtabent; jas_icctagtabent_t *sharedtagtabent; jas_icctagtabent_t *tmptagtabent; jas_iccuint32_t attrname; jas_iccattrval_t *attrval; jas_icctagtab_t *tagtab; tagtab = &prof->tagtab; if (!(tagtab->ents = jas_malloc(prof->attrtab->numattrs * sizeof(jas_icctagtabent_t)))) goto error; tagtab->numents = prof->attrtab->numattrs; curoff = JAS_ICC_HDRLEN + 4 + 12 * tagtab->numents; for (i = 0; i < JAS_CAST(int, tagtab->numents); ++i) { tagtabent = &tagtab->ents[i]; if (jas_iccattrtab_get(prof->attrtab, i, &attrname, &attrval)) goto error; assert(attrval->ops->output); tagtabent->tag = attrname; tagtabent->data = &attrval->data; sharedtagtabent = 0; for (j = 0; j < i; ++j) { tmptagtabent = &tagtab->ents[j]; if (tagtabent->data == tmptagtabent->data) { sharedtagtabent = tmptagtabent; break; } } if (sharedtagtabent) { tagtabent->off = sharedtagtabent->off; tagtabent->len = sharedtagtabent->len; tagtabent->first = sharedtagtabent; } else { tagtabent->off = curoff; tagtabent->len = (*attrval->ops->getsize)(attrval) + 8; tagtabent->first = 0; if (i < JAS_CAST(int, tagtab->numents - 1)) { curoff = jas_iccpadtomult(curoff + tagtabent->len, 4); } else { curoff += tagtabent->len; } } jas_iccattrval_destroy(attrval); } prof->hdr.size = curoff; if (jas_iccprof_writehdr(out, &prof->hdr)) goto error; if (jas_iccprof_puttagtab(out, &prof->tagtab)) goto error; curoff = JAS_ICC_HDRLEN + 4 + 12 * tagtab->numents; for (i = 0; i < JAS_CAST(int, tagtab->numents);) { tagtabent = &tagtab->ents[i]; assert(curoff == JAS_CAST(long, tagtabent->off)); if (jas_iccattrtab_get(prof->attrtab, i, &attrname, &attrval)) goto error; if (jas_iccputuint32(out, attrval->type) || jas_stream_pad(out, 4, 0) != 4) goto error; if ((*attrval->ops->output)(attrval, out)) goto error; jas_iccattrval_destroy(attrval); curoff += tagtabent->len; ++i; while (i < JAS_CAST(int, tagtab->numents) && tagtab->ents[i].first) ++i; newoff = (i < JAS_CAST(int, tagtab->numents)) ? tagtab->ents[i].off : prof->hdr.size; reloff = newoff - curoff; assert(reloff >= 0); if (reloff > 0) { if (jas_stream_pad(out, reloff, 0) != reloff) goto error; curoff += reloff; } } return 0; error: /* XXX - need to free some resources here */ return -1; } static int jas_iccprof_writehdr(jas_stream_t *out, jas_icchdr_t *hdr) { if (jas_iccputuint32(out, hdr->size) || jas_iccputuint32(out, hdr->cmmtype) || jas_iccputuint32(out, hdr->version) || jas_iccputuint32(out, hdr->clas) || jas_iccputuint32(out, hdr->colorspc) || jas_iccputuint32(out, hdr->refcolorspc) || jas_iccputtime(out, &hdr->ctime) || jas_iccputuint32(out, hdr->magic) || jas_iccputuint32(out, hdr->platform) || jas_iccputuint32(out, hdr->flags) || jas_iccputuint32(out, hdr->maker) || jas_iccputuint32(out, hdr->model) || jas_iccputuint64(out, hdr->attr) || jas_iccputuint32(out, hdr->intent) || jas_iccputxyz(out, &hdr->illum) || jas_iccputuint32(out, hdr->creator) || jas_stream_pad(out, 44, 0) != 44) return -1; return 0; } static int jas_iccprof_puttagtab(jas_stream_t *out, jas_icctagtab_t *tagtab) { int i; jas_icctagtabent_t *tagtabent; if (jas_iccputuint32(out, tagtab->numents)) goto error; for (i = 0; i < JAS_CAST(int, tagtab->numents); ++i) { tagtabent = &tagtab->ents[i]; if (jas_iccputuint32(out, tagtabent->tag) || jas_iccputuint32(out, tagtabent->off) || jas_iccputuint32(out, tagtabent->len)) goto error; } return 0; error: return -1; } static int jas_iccprof_readhdr(jas_stream_t *in, jas_icchdr_t *hdr) { if (jas_iccgetuint32(in, &hdr->size) || jas_iccgetuint32(in, &hdr->cmmtype) || jas_iccgetuint32(in, &hdr->version) || jas_iccgetuint32(in, &hdr->clas) || jas_iccgetuint32(in, &hdr->colorspc) || jas_iccgetuint32(in, &hdr->refcolorspc) || jas_iccgettime(in, &hdr->ctime) || jas_iccgetuint32(in, &hdr->magic) || jas_iccgetuint32(in, &hdr->platform) || jas_iccgetuint32(in, &hdr->flags) || jas_iccgetuint32(in, &hdr->maker) || jas_iccgetuint32(in, &hdr->model) || jas_iccgetuint64(in, &hdr->attr) || jas_iccgetuint32(in, &hdr->intent) || jas_iccgetxyz(in, &hdr->illum) || jas_iccgetuint32(in, &hdr->creator) || jas_stream_gobble(in, 44) != 44) return -1; return 0; } static int jas_iccprof_gettagtab(jas_stream_t *in, jas_icctagtab_t *tagtab) { int i; jas_icctagtabent_t *tagtabent; if (tagtab->ents) { jas_free(tagtab->ents); tagtab->ents = 0; } if (jas_iccgetuint32(in, &tagtab->numents)) goto error; if (!(tagtab->ents = jas_malloc(tagtab->numents * sizeof(jas_icctagtabent_t)))) goto error; tagtabent = tagtab->ents; for (i = 0; i < JAS_CAST(long, tagtab->numents); ++i) { if (jas_iccgetuint32(in, &tagtabent->tag) || jas_iccgetuint32(in, &tagtabent->off) || jas_iccgetuint32(in, &tagtabent->len)) goto error; ++tagtabent; } return 0; error: if (tagtab->ents) { jas_free(tagtab->ents); tagtab->ents = 0; } return -1; } jas_iccattrval_t *jas_iccprof_getattr(jas_iccprof_t *prof, jas_iccattrname_t name) { int i; jas_iccattrval_t *attrval; if ((i = jas_iccattrtab_lookup(prof->attrtab, name)) < 0) goto error; if (!(attrval = jas_iccattrval_clone(prof->attrtab->attrs[i].val))) goto error; return attrval; error: return 0; } int jas_iccprof_setattr(jas_iccprof_t *prof, jas_iccattrname_t name, jas_iccattrval_t *val) { int i; if ((i = jas_iccattrtab_lookup(prof->attrtab, name)) >= 0) { if (val) { if (jas_iccattrtab_replace(prof->attrtab, i, name, val)) goto error; } else { jas_iccattrtab_delete(prof->attrtab, i); } } else { if (val) { if (jas_iccattrtab_add(prof->attrtab, -1, name, val)) goto error; } else { /* NOP */ } } return 0; error: return -1; } int jas_iccprof_gethdr(jas_iccprof_t *prof, jas_icchdr_t *hdr) { *hdr = prof->hdr; return 0; } int jas_iccprof_sethdr(jas_iccprof_t *prof, jas_icchdr_t *hdr) { prof->hdr = *hdr; return 0; } static void jas_iccprof_sorttagtab(jas_icctagtab_t *tagtab) { qsort(tagtab->ents, tagtab->numents, sizeof(jas_icctagtabent_t), jas_icctagtabent_cmp); } static int jas_icctagtabent_cmp(const void *src, const void *dst) { jas_icctagtabent_t *srctagtabent = JAS_CAST(jas_icctagtabent_t *, src); jas_icctagtabent_t *dsttagtabent = JAS_CAST(jas_icctagtabent_t *, dst); if (srctagtabent->off > dsttagtabent->off) { return 1; } else if (srctagtabent->off < dsttagtabent->off) { return -1; } return 0; } static jas_iccattrvalinfo_t *jas_iccattrvalinfo_lookup(jas_iccsig_t type) { jas_iccattrvalinfo_t *info; info = jas_iccattrvalinfos; for (info = jas_iccattrvalinfos; info->type; ++info) { if (info->type == type) { return info; } } return 0; } static int jas_iccgettime(jas_stream_t *in, jas_icctime_t *time) { if (jas_iccgetuint16(in, &time->year) || jas_iccgetuint16(in, &time->month) || jas_iccgetuint16(in, &time->day) || jas_iccgetuint16(in, &time->hour) || jas_iccgetuint16(in, &time->min) || jas_iccgetuint16(in, &time->sec)) { return -1; } return 0; } static int jas_iccgetxyz(jas_stream_t *in, jas_iccxyz_t *xyz) { if (jas_iccgetsint32(in, &xyz->x) || jas_iccgetsint32(in, &xyz->y) || jas_iccgetsint32(in, &xyz->z)) { return -1; } return 0; } static int jas_iccputtime(jas_stream_t *out, jas_icctime_t *time) { jas_iccputuint16(out, time->year); jas_iccputuint16(out, time->month); jas_iccputuint16(out, time->day); jas_iccputuint16(out, time->hour); jas_iccputuint16(out, time->min); jas_iccputuint16(out, time->sec); return 0; } static int jas_iccputxyz(jas_stream_t *out, jas_iccxyz_t *xyz) { jas_iccputuint32(out, xyz->x); jas_iccputuint32(out, xyz->y); jas_iccputuint32(out, xyz->z); return 0; } /******************************************************************************\ * attribute table class \******************************************************************************/ static jas_iccattrtab_t *jas_iccattrtab_create() { jas_iccattrtab_t *tab; tab = 0; if (!(tab = jas_malloc(sizeof(jas_iccattrtab_t)))) goto error; tab->maxattrs = 0; tab->numattrs = 0; tab->attrs = 0; if (jas_iccattrtab_resize(tab, 32)) goto error; return tab; error: if (tab) jas_iccattrtab_destroy(tab); return 0; } static jas_iccattrtab_t *jas_iccattrtab_copy(jas_iccattrtab_t *attrtab) { jas_iccattrtab_t *newattrtab; int i; if (!(newattrtab = jas_iccattrtab_create())) goto error; for (i = 0; i < attrtab->numattrs; ++i) { if (jas_iccattrtab_add(newattrtab, i, attrtab->attrs[i].name, attrtab->attrs[i].val)) goto error; } return newattrtab; error: return 0; } static void jas_iccattrtab_destroy(jas_iccattrtab_t *tab) { if (tab->attrs) { while (tab->numattrs > 0) { jas_iccattrtab_delete(tab, 0); } jas_free(tab->attrs); } jas_free(tab); } void jas_iccattrtab_dump(jas_iccattrtab_t *attrtab, FILE *out) { int i; jas_iccattr_t *attr; jas_iccattrval_t *attrval; jas_iccattrvalinfo_t *info; char buf[16]; fprintf(out, "numattrs=%d\n", attrtab->numattrs); fprintf(out, "---\n"); for (i = 0; i < attrtab->numattrs; ++i) { attr = &attrtab->attrs[i]; attrval = attr->val; info = jas_iccattrvalinfo_lookup(attrval->type); if (!info) abort(); fprintf(out, "attrno=%d; attrname=\"%s\"(0x%08x); attrtype=\"%s\"(0x%08x)\n", i, jas_iccsigtostr(attr->name, &buf[0]), attr->name, jas_iccsigtostr(attrval->type, &buf[8]), attrval->type ); jas_iccattrval_dump(attrval, out); fprintf(out, "---\n"); } } static int jas_iccattrtab_resize(jas_iccattrtab_t *tab, int maxents) { jas_iccattr_t *newattrs; assert(maxents >= tab->numattrs); newattrs = tab->attrs ? jas_realloc(tab->attrs, maxents * sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t)); if (!newattrs) return -1; tab->attrs = newattrs; tab->maxattrs = maxents; return 0; } static int jas_iccattrtab_add(jas_iccattrtab_t *attrtab, int i, jas_iccuint32_t name, jas_iccattrval_t *val) { int n; jas_iccattr_t *attr; jas_iccattrval_t *tmpattrval; tmpattrval = 0; if (i < 0) { i = attrtab->numattrs; } assert(i >= 0 && i <= attrtab->numattrs); if (attrtab->numattrs >= attrtab->maxattrs) { if (jas_iccattrtab_resize(attrtab, attrtab->numattrs + 32)) { goto error; } } if (!(tmpattrval = jas_iccattrval_clone(val))) goto error; n = attrtab->numattrs - i; if (n > 0) memmove(&attrtab->attrs[i + 1], &attrtab->attrs[i], n * sizeof(jas_iccattr_t)); attr = &attrtab->attrs[i]; attr->name = name; attr->val = tmpattrval; ++attrtab->numattrs; return 0; error: if (tmpattrval) jas_iccattrval_destroy(tmpattrval); return -1; } static int jas_iccattrtab_replace(jas_iccattrtab_t *attrtab, int i, jas_iccuint32_t name, jas_iccattrval_t *val) { jas_iccattrval_t *newval; jas_iccattr_t *attr; if (!(newval = jas_iccattrval_clone(val))) goto error; attr = &attrtab->attrs[i]; jas_iccattrval_destroy(attr->val); attr->name = name; attr->val = newval; return 0; error: return -1; } static void jas_iccattrtab_delete(jas_iccattrtab_t *attrtab, int i) { int n; jas_iccattrval_destroy(attrtab->attrs[i].val); if ((n = attrtab->numattrs - i - 1) > 0) memmove(&attrtab->attrs[i], &attrtab->attrs[i + 1], n * sizeof(jas_iccattr_t)); --attrtab->numattrs; } static int jas_iccattrtab_get(jas_iccattrtab_t *attrtab, int i, jas_iccattrname_t *name, jas_iccattrval_t **val) { jas_iccattr_t *attr; if (i < 0 || i >= attrtab->numattrs) goto error; attr = &attrtab->attrs[i]; *name = attr->name; if (!(*val = jas_iccattrval_clone(attr->val))) goto error; return 0; error: return -1; } static int jas_iccattrtab_lookup(jas_iccattrtab_t *attrtab, jas_iccuint32_t name) { int i; jas_iccattr_t *attr; for (i = 0; i < attrtab->numattrs; ++i) { attr = &attrtab->attrs[i]; if (attr->name == name) return i; } return -1; } /******************************************************************************\ * attribute value class \******************************************************************************/ jas_iccattrval_t *jas_iccattrval_create(jas_iccuint32_t type) { jas_iccattrval_t *attrval; jas_iccattrvalinfo_t *info; if (!(info = jas_iccattrvalinfo_lookup(type))) goto error; if (!(attrval = jas_iccattrval_create0())) goto error; attrval->ops = &info->ops; attrval->type = type; ++attrval->refcnt; memset(&attrval->data, 0, sizeof(attrval->data)); return attrval; error: return 0; } jas_iccattrval_t *jas_iccattrval_clone(jas_iccattrval_t *attrval) { ++attrval->refcnt; return attrval; } void jas_iccattrval_destroy(jas_iccattrval_t *attrval) { #if 0 jas_eprintf("refcnt=%d\n", attrval->refcnt); #endif if (--attrval->refcnt <= 0) { if (attrval->ops->destroy) (*attrval->ops->destroy)(attrval); jas_free(attrval); } } void jas_iccattrval_dump(jas_iccattrval_t *attrval, FILE *out) { char buf[8]; jas_iccsigtostr(attrval->type, buf); fprintf(out, "refcnt = %d; type = 0x%08x %s\n", attrval->refcnt, attrval->type, jas_iccsigtostr(attrval->type, &buf[0])); if (attrval->ops->dump) { (*attrval->ops->dump)(attrval, out); } } int jas_iccattrval_allowmodify(jas_iccattrval_t **attrvalx) { jas_iccattrval_t *newattrval; jas_iccattrval_t *attrval = *attrvalx; newattrval = 0; if (attrval->refcnt > 1) { if (!(newattrval = jas_iccattrval_create0())) goto error; newattrval->ops = attrval->ops; newattrval->type = attrval->type; ++newattrval->refcnt; if (newattrval->ops->copy) { if ((*newattrval->ops->copy)(newattrval, attrval)) goto error; } else { memcpy(&newattrval->data, &attrval->data, sizeof(newattrval->data)); } *attrvalx = newattrval; } return 0; error: if (newattrval) { jas_free(newattrval); } return -1; } static jas_iccattrval_t *jas_iccattrval_create0() { jas_iccattrval_t *attrval; if (!(attrval = jas_malloc(sizeof(jas_iccattrval_t)))) return 0; memset(attrval, 0, sizeof(jas_iccattrval_t)); attrval->refcnt = 0; attrval->ops = 0; attrval->type = 0; return attrval; } /******************************************************************************\ * \******************************************************************************/ static int jas_iccxyz_input(jas_iccattrval_t *attrval, jas_stream_t *in, int len) { if (len != 4 * 3) abort(); return jas_iccgetxyz(in, &attrval->data.xyz); } static int jas_iccxyz_output(jas_iccattrval_t *attrval, jas_stream_t *out) { jas_iccxyz_t *xyz = &attrval->data.xyz; if (jas_iccputuint32(out, xyz->x) || jas_iccputuint32(out, xyz->y) || jas_iccputuint32(out, xyz->z)) return -1; return 0; } static int jas_iccxyz_getsize(jas_iccattrval_t *attrval) { /* Avoid compiler warnings about unused parameters. */ attrval = 0; return 12; } static void jas_iccxyz_dump(jas_iccattrval_t *attrval, FILE *out) { jas_iccxyz_t *xyz = &attrval->data.xyz; fprintf(out, "(%f, %f, %f)\n", xyz->x / 65536.0, xyz->y / 65536.0, xyz->z / 65536.0); } /******************************************************************************\ * attribute table class \******************************************************************************/ static void jas_icccurv_destroy(jas_iccattrval_t *attrval) { jas_icccurv_t *curv = &attrval->data.curv; if (curv->ents) jas_free(curv->ents); } static int jas_icccurv_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval) { /* Avoid compiler warnings about unused parameters. */ attrval = 0; othattrval = 0; /* Not yet implemented. */ abort(); return -1; } static int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt) { jas_icccurv_t *curv = &attrval->data.curv; unsigned int i; curv->numents = 0; curv->ents = 0; if (jas_iccgetuint32(in, &curv->numents)) goto error; if (!(curv->ents = jas_malloc(curv->numents * sizeof(jas_iccuint16_t)))) goto error; for (i = 0; i < curv->numents; ++i) { if (jas_iccgetuint16(in, &curv->ents[i])) goto error; } if (JAS_CAST(int, 4 + 2 * curv->numents) != cnt) goto error; return 0; error: jas_icccurv_destroy(attrval); return -1; } static int jas_icccurv_getsize(jas_iccattrval_t *attrval) { jas_icccurv_t *curv = &attrval->data.curv; return 4 + 2 * curv->numents; } static int jas_icccurv_output(jas_iccattrval_t *attrval, jas_stream_t *out) { jas_icccurv_t *curv = &attrval->data.curv; unsigned int i; if (jas_iccputuint32(out, curv->numents)) goto error; for (i = 0; i < curv->numents; ++i) { if (jas_iccputuint16(out, curv->ents[i])) goto error; } return 0; error: return -1; } static void jas_icccurv_dump(jas_iccattrval_t *attrval, FILE *out) { int i; jas_icccurv_t *curv = &attrval->data.curv; fprintf(out, "number of entires = %d\n", curv->numents); if (curv->numents == 1) { fprintf(out, "gamma = %f\n", curv->ents[0] / 256.0); } else { for (i = 0; i < JAS_CAST(int, curv->numents); ++i) { if (i < 3 || i >= JAS_CAST(int, curv->numents) - 3) { fprintf(out, "entry[%d] = %f\n", i, curv->ents[i] / 65535.0); } } } } /******************************************************************************\ * \******************************************************************************/ static void jas_icctxtdesc_destroy(jas_iccattrval_t *attrval) { jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; if (txtdesc->ascdata) jas_free(txtdesc->ascdata); if (txtdesc->ucdata) jas_free(txtdesc->ucdata); } static int jas_icctxtdesc_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval) { jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; /* Avoid compiler warnings about unused parameters. */ attrval = 0; othattrval = 0; txtdesc = 0; /* Not yet implemented. */ abort(); return -1; } static int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt) { int n; int c; jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; txtdesc->ascdata = 0; txtdesc->ucdata = 0; if (jas_iccgetuint32(in, &txtdesc->asclen)) goto error; if (!(txtdesc->ascdata = jas_malloc(txtdesc->asclen))) goto error; if (jas_stream_read(in, txtdesc->ascdata, txtdesc->asclen) != JAS_CAST(int, txtdesc->asclen)) goto error; txtdesc->ascdata[txtdesc->asclen - 1] = '\0'; if (jas_iccgetuint32(in, &txtdesc->uclangcode) || jas_iccgetuint32(in, &txtdesc->uclen)) goto error; if (!(txtdesc->ucdata = jas_malloc(txtdesc->uclen * 2))) goto error; if (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) != JAS_CAST(int, txtdesc->uclen * 2)) goto error; if (jas_iccgetuint16(in, &txtdesc->sccode)) goto error; if ((c = jas_stream_getc(in)) == EOF) goto error; txtdesc->maclen = c; if (jas_stream_read(in, txtdesc->macdata, 67) != 67) goto error; txtdesc->asclen = strlen(txtdesc->ascdata) + 1; #define WORKAROUND_BAD_PROFILES #ifdef WORKAROUND_BAD_PROFILES n = txtdesc->asclen + txtdesc->uclen * 2 + 15 + 67; if (n > cnt) { return -1; } if (n < cnt) { if (jas_stream_gobble(in, cnt - n) != cnt - n) goto error; } #else if (txtdesc->asclen + txtdesc->uclen * 2 + 15 + 67 != cnt) return -1; #endif return 0; error: jas_icctxtdesc_destroy(attrval); return -1; } static int jas_icctxtdesc_getsize(jas_iccattrval_t *attrval) { jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; return strlen(txtdesc->ascdata) + 1 + txtdesc->uclen * 2 + 15 + 67; } static int jas_icctxtdesc_output(jas_iccattrval_t *attrval, jas_stream_t *out) { jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; if (jas_iccputuint32(out, txtdesc->asclen) || jas_stream_puts(out, txtdesc->ascdata) || jas_stream_putc(out, 0) == EOF || jas_iccputuint32(out, txtdesc->uclangcode) || jas_iccputuint32(out, txtdesc->uclen) || jas_stream_write(out, txtdesc->ucdata, txtdesc->uclen * 2) != JAS_CAST(int, txtdesc->uclen * 2) || jas_iccputuint16(out, txtdesc->sccode) || jas_stream_putc(out, txtdesc->maclen) == EOF) goto error; if (txtdesc->maclen > 0) { if (jas_stream_write(out, txtdesc->macdata, 67) != 67) goto error; } else { if (jas_stream_pad(out, 67, 0) != 67) goto error; } return 0; error: return -1; } static void jas_icctxtdesc_dump(jas_iccattrval_t *attrval, FILE *out) { jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc; fprintf(out, "ascii = \"%s\"\n", txtdesc->ascdata); fprintf(out, "uclangcode = %d; uclen = %d\n", txtdesc->uclangcode, txtdesc->uclen); fprintf(out, "sccode = %d\n", txtdesc->sccode); fprintf(out, "maclen = %d\n", txtdesc->maclen); } /******************************************************************************\ * \******************************************************************************/ static void jas_icctxt_destroy(jas_iccattrval_t *attrval) { jas_icctxt_t *txt = &attrval->data.txt; if (txt->string) jas_free(txt->string); } static int jas_icctxt_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval) { jas_icctxt_t *txt = &attrval->data.txt; jas_icctxt_t *othtxt = &othattrval->data.txt; if (!(txt->string = jas_strdup(othtxt->string))) return -1; return 0; } static int jas_icctxt_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt) { jas_icctxt_t *txt = &attrval->data.txt; txt->string = 0; if (!(txt->string = jas_malloc(cnt))) goto error; if (jas_stream_read(in, txt->string, cnt) != cnt) goto error; txt->string[cnt - 1] = '\0'; if (JAS_CAST(int, strlen(txt->string)) + 1 != cnt) goto error; return 0; error: if (txt->string) jas_free(txt->string); return -1; } static int jas_icctxt_getsize(jas_iccattrval_t *attrval) { jas_icctxt_t *txt = &attrval->data.txt; return strlen(txt->string) + 1; } static int jas_icctxt_output(jas_iccattrval_t *attrval, jas_stream_t *out) { jas_icctxt_t *txt = &attrval->data.txt; if (jas_stream_puts(out, txt->string) || jas_stream_putc(out, 0) == EOF) return -1; return 0; } static void jas_icctxt_dump(jas_iccattrval_t *attrval, FILE *out) { jas_icctxt_t *txt = &attrval->data.txt; fprintf(out, "string = \"%s\"\n", txt->string); } /******************************************************************************\ * \******************************************************************************/ static void jas_icclut8_destroy(jas_iccattrval_t *attrval) { jas_icclut8_t *lut8 = &attrval->data.lut8; if (lut8->clut) jas_free(lut8->clut); if (lut8->intabs) jas_free(lut8->intabs); if (lut8->intabsbuf) jas_free(lut8->intabsbuf); if (lut8->outtabs) jas_free(lut8->outtabs); if (lut8->outtabsbuf) jas_free(lut8->outtabsbuf); } static int jas_icclut8_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval) { jas_icclut8_t *lut8 = &attrval->data.lut8; /* Avoid compiler warnings about unused parameters. */ attrval = 0; othattrval = 0; lut8 = 0; abort(); return -1; } static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt) { int i; int j; int clutsize; jas_icclut8_t *lut8 = &attrval->data.lut8; lut8->clut = 0; lut8->intabs = 0; lut8->intabsbuf = 0; lut8->outtabs = 0; lut8->outtabsbuf = 0; if (jas_iccgetuint8(in, &lut8->numinchans) || jas_iccgetuint8(in, &lut8->numoutchans) || jas_iccgetuint8(in, &lut8->clutlen) || jas_stream_getc(in) == EOF) goto error; for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { if (jas_iccgetsint32(in, &lut8->e[i][j])) goto error; } } if (jas_iccgetuint16(in, &lut8->numintabents) || jas_iccgetuint16(in, &lut8->numouttabents)) goto error; clutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans; if (!(lut8->clut = jas_malloc(clutsize * sizeof(jas_iccuint8_t))) || !(lut8->intabsbuf = jas_malloc(lut8->numinchans * lut8->numintabents * sizeof(jas_iccuint8_t))) || !(lut8->intabs = jas_malloc(lut8->numinchans * sizeof(jas_iccuint8_t *)))) goto error; for (i = 0; i < lut8->numinchans; ++i) lut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents]; if (!(lut8->outtabsbuf = jas_malloc(lut8->numoutchans * lut8->numouttabents * sizeof(jas_iccuint8_t))) || !(lut8->outtabs = jas_malloc(lut8->numoutchans * sizeof(jas_iccuint8_t *)))) goto error; for (i = 0; i < lut8->numoutchans; ++i) lut8->outtabs[i] = &lut8->outtabsbuf[i * lut8->numouttabents]; for (i = 0; i < lut8->numinchans; ++i) { for (j = 0; j < JAS_CAST(int, lut8->numintabents); ++j) { if (jas_iccgetuint8(in, &lut8->intabs[i][j])) goto error; } } for (i = 0; i < lut8->numoutchans; ++i) { for (j = 0; j < JAS_CAST(int, lut8->numouttabents); ++j) { if (jas_iccgetuint8(in, &lut8->outtabs[i][j])) goto error; } } for (i = 0; i < clutsize; ++i) { if (jas_iccgetuint8(in, &lut8->clut[i])) goto error; } if (JAS_CAST(int, 44 + lut8->numinchans * lut8->numintabents + lut8->numoutchans * lut8->numouttabents + jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans) != cnt) goto error; return 0; error: jas_icclut8_destroy(attrval); return -1; } static int jas_icclut8_getsize(jas_iccattrval_t *attrval) { jas_icclut8_t *lut8 = &attrval->data.lut8; return 44 + lut8->numinchans * lut8->numintabents + lut8->numoutchans * lut8->numouttabents + jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans; } static int jas_icclut8_output(jas_iccattrval_t *attrval, jas_stream_t *out) { jas_icclut8_t *lut8 = &attrval->data.lut8; int i; int j; int n; lut8->clut = 0; lut8->intabs = 0; lut8->intabsbuf = 0; lut8->outtabs = 0; lut8->outtabsbuf = 0; if (jas_stream_putc(out, lut8->numinchans) == EOF || jas_stream_putc(out, lut8->numoutchans) == EOF || jas_stream_putc(out, lut8->clutlen) == EOF || jas_stream_putc(out, 0) == EOF) goto error; for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { if (jas_iccputsint32(out, lut8->e[i][j])) goto error; } } if (jas_iccputuint16(out, lut8->numintabents) || jas_iccputuint16(out, lut8->numouttabents)) goto error; n = lut8->numinchans * lut8->numintabents; for (i = 0; i < n; ++i) { if (jas_iccputuint8(out, lut8->intabsbuf[i])) goto error; } n = lut8->numoutchans * lut8->numouttabents; for (i = 0; i < n; ++i) { if (jas_iccputuint8(out, lut8->outtabsbuf[i])) goto error; } n = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans; for (i = 0; i < n; ++i) { if (jas_iccputuint8(out, lut8->clut[i])) goto error; } return 0; error: return -1; } static void jas_icclut8_dump(jas_iccattrval_t *attrval, FILE *out) { jas_icclut8_t *lut8 = &attrval->data.lut8; int i; int j; fprintf(out, "numinchans=%d, numoutchans=%d, clutlen=%d\n", lut8->numinchans, lut8->numoutchans, lut8->clutlen); for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { fprintf(out, "e[%d][%d]=%f ", i, j, lut8->e[i][j] / 65536.0); } fprintf(out, "\n"); } fprintf(out, "numintabents=%d, numouttabents=%d\n", lut8->numintabents, lut8->numouttabents); } /******************************************************************************\ * \******************************************************************************/ static void jas_icclut16_destroy(jas_iccattrval_t *attrval) { jas_icclut16_t *lut16 = &attrval->data.lut16; if (lut16->clut) jas_free(lut16->clut); if (lut16->intabs) jas_free(lut16->intabs); if (lut16->intabsbuf) jas_free(lut16->intabsbuf); if (lut16->outtabs) jas_free(lut16->outtabs); if (lut16->outtabsbuf) jas_free(lut16->outtabsbuf); } static int jas_icclut16_copy(jas_iccattrval_t *attrval, jas_iccattrval_t *othattrval) { /* Avoid compiler warnings about unused parameters. */ attrval = 0; othattrval = 0; /* Not yet implemented. */ abort(); return -1; } static int jas_icclut16_input(jas_iccattrval_t *attrval, jas_stream_t *in, int cnt) { int i; int j; int clutsize; jas_icclut16_t *lut16 = &attrval->data.lut16; lut16->clut = 0; lut16->intabs = 0; lut16->intabsbuf = 0; lut16->outtabs = 0; lut16->outtabsbuf = 0; if (jas_iccgetuint8(in, &lut16->numinchans) || jas_iccgetuint8(in, &lut16->numoutchans) || jas_iccgetuint8(in, &lut16->clutlen) || jas_stream_getc(in) == EOF) goto error; for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { if (jas_iccgetsint32(in, &lut16->e[i][j])) goto error; } } if (jas_iccgetuint16(in, &lut16->numintabents) || jas_iccgetuint16(in, &lut16->numouttabents)) goto error; clutsize = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans; if (!(lut16->clut = jas_malloc(clutsize * sizeof(jas_iccuint16_t))) || !(lut16->intabsbuf = jas_malloc(lut16->numinchans * lut16->numintabents * sizeof(jas_iccuint16_t))) || !(lut16->intabs = jas_malloc(lut16->numinchans * sizeof(jas_iccuint16_t *)))) goto error; for (i = 0; i < lut16->numinchans; ++i) lut16->intabs[i] = &lut16->intabsbuf[i * lut16->numintabents]; if (!(lut16->outtabsbuf = jas_malloc(lut16->numoutchans * lut16->numouttabents * sizeof(jas_iccuint16_t))) || !(lut16->outtabs = jas_malloc(lut16->numoutchans * sizeof(jas_iccuint16_t *)))) goto error; for (i = 0; i < lut16->numoutchans; ++i) lut16->outtabs[i] = &lut16->outtabsbuf[i * lut16->numouttabents]; for (i = 0; i < lut16->numinchans; ++i) { for (j = 0; j < JAS_CAST(int, lut16->numintabents); ++j) { if (jas_iccgetuint16(in, &lut16->intabs[i][j])) goto error; } } for (i = 0; i < lut16->numoutchans; ++i) { for (j = 0; j < JAS_CAST(int, lut16->numouttabents); ++j) { if (jas_iccgetuint16(in, &lut16->outtabs[i][j])) goto error; } } for (i = 0; i < clutsize; ++i) { if (jas_iccgetuint16(in, &lut16->clut[i])) goto error; } if (JAS_CAST(int, 44 + 2 * (lut16->numinchans * lut16->numintabents + lut16->numoutchans * lut16->numouttabents + jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans)) != cnt) goto error; return 0; error: jas_icclut16_destroy(attrval); return -1; } static int jas_icclut16_getsize(jas_iccattrval_t *attrval) { jas_icclut16_t *lut16 = &attrval->data.lut16; return 44 + 2 * (lut16->numinchans * lut16->numintabents + lut16->numoutchans * lut16->numouttabents + jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans); } static int jas_icclut16_output(jas_iccattrval_t *attrval, jas_stream_t *out) { jas_icclut16_t *lut16 = &attrval->data.lut16; int i; int j; int n; if (jas_stream_putc(out, lut16->numinchans) == EOF || jas_stream_putc(out, lut16->numoutchans) == EOF || jas_stream_putc(out, lut16->clutlen) == EOF || jas_stream_putc(out, 0) == EOF) goto error; for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { if (jas_iccputsint32(out, lut16->e[i][j])) goto error; } } if (jas_iccputuint16(out, lut16->numintabents) || jas_iccputuint16(out, lut16->numouttabents)) goto error; n = lut16->numinchans * lut16->numintabents; for (i = 0; i < n; ++i) { if (jas_iccputuint16(out, lut16->intabsbuf[i])) goto error; } n = lut16->numoutchans * lut16->numouttabents; for (i = 0; i < n; ++i) { if (jas_iccputuint16(out, lut16->outtabsbuf[i])) goto error; } n = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans; for (i = 0; i < n; ++i) { if (jas_iccputuint16(out, lut16->clut[i])) goto error; } return 0; error: return -1; } static void jas_icclut16_dump(jas_iccattrval_t *attrval, FILE *out) { jas_icclut16_t *lut16 = &attrval->data.lut16; int i; int j; fprintf(out, "numinchans=%d, numoutchans=%d, clutlen=%d\n", lut16->numinchans, lut16->numoutchans, lut16->clutlen); for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { fprintf(out, "e[%d][%d]=%f ", i, j, lut16->e[i][j] / 65536.0); } fprintf(out, "\n"); } fprintf(out, "numintabents=%d, numouttabents=%d\n", lut16->numintabents, lut16->numouttabents); } /******************************************************************************\ * \******************************************************************************/ static int jas_iccgetuint(jas_stream_t *in, int n, ulonglong *val) { int i; int c; ulonglong v; v = 0; for (i = n; i > 0; --i) { if ((c = jas_stream_getc(in)) == EOF) return -1; v = (v << 8) | c; } *val = v; return 0; } static int jas_iccgetuint8(jas_stream_t *in, jas_iccuint8_t *val) { int c; if ((c = jas_stream_getc(in)) == EOF) return -1; *val = c; return 0; } static int jas_iccgetuint16(jas_stream_t *in, jas_iccuint16_t *val) { ulonglong tmp; if (jas_iccgetuint(in, 2, &tmp)) return -1; *val = tmp; return 0; } static int jas_iccgetsint32(jas_stream_t *in, jas_iccsint32_t *val) { ulonglong tmp; if (jas_iccgetuint(in, 4, &tmp)) return -1; *val = (tmp & 0x80000000) ? (-JAS_CAST(longlong, (((~tmp) & 0x7fffffff) + 1))) : JAS_CAST(longlong, tmp); return 0; } static int jas_iccgetuint32(jas_stream_t *in, jas_iccuint32_t *val) { ulonglong tmp; if (jas_iccgetuint(in, 4, &tmp)) return -1; *val = tmp; return 0; } static int jas_iccgetuint64(jas_stream_t *in, jas_iccuint64_t *val) { ulonglong tmp; if (jas_iccgetuint(in, 8, &tmp)) return -1; *val = tmp; return 0; } static int jas_iccputuint(jas_stream_t *out, int n, ulonglong val) { int i; int c; for (i = n; i > 0; --i) { c = (val >> (8 * (i - 1))) & 0xff; if (jas_stream_putc(out, c) == EOF) return -1; } return 0; } static int jas_iccputsint(jas_stream_t *out, int n, longlong val) { ulonglong tmp; tmp = (val < 0) ? (abort(), 0) : val; return jas_iccputuint(out, n, tmp); } /******************************************************************************\ * \******************************************************************************/ static char *jas_iccsigtostr(int sig, char *buf) { int n; int c; char *bufptr; bufptr = buf; for (n = 4; n > 0; --n) { c = (sig >> 24) & 0xff; if (isalpha(c) || isdigit(c)) { *bufptr++ = c; } sig <<= 8; } *bufptr = '\0'; return buf; } static long jas_iccpadtomult(long x, long y) { return ((x + y - 1) / y) * y; } static long jas_iccpowi(int x, int n) { long y; y = 1; while (--n >= 0) y *= x; return y; } jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len) { jas_stream_t *in; jas_iccprof_t *prof; if (!(in = jas_stream_memopen(JAS_CAST(char *, buf), len))) goto error; if (!(prof = jas_iccprof_load(in))) goto error; jas_stream_close(in); return prof; error: return 0; } jas_iccprof_t *jas_iccprof_createfromclrspc(int clrspc) { jas_iccprof_t *prof; switch (clrspc) { case JAS_CLRSPC_SRGB: prof = jas_iccprof_createfrombuf(jas_iccprofdata_srgb, jas_iccprofdata_srgblen); break; case JAS_CLRSPC_SGRAY: prof = jas_iccprof_createfrombuf(jas_iccprofdata_sgray, jas_iccprofdata_sgraylen); break; default: prof = 0; break; } return prof; } jasper-1.900.1/src/libjasper/base/jas_string.c0000644000175000017500000000746410554235551020137 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * String Library * * $Id$ */ /******************************************************************************\ * Includes \******************************************************************************/ #include #include "jasper/jas_malloc.h" #include "jasper/jas_string.h" /******************************************************************************\ * Miscellaneous Functions \******************************************************************************/ /* This function is equivalent to the popular but non-standard (and not-always-available) strdup function. */ char *jas_strdup(const char *s) { int n; char *p; n = strlen(s) + 1; if (!(p = jas_malloc(n * sizeof(char)))) { return 0; } strcpy(p, s); return p; } jasper-1.900.1/src/libjasper/base/jas_tvp.c0000644000175000017500000001534010554235551017432 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tag-Value Parser Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include "jasper/jas_malloc.h" #include "jasper/jas_string.h" #include "jasper/jas_tvp.h" /******************************************************************************\ * Macros. \******************************************************************************/ /* Is the specified character valid for a tag name? */ #define JAS_TVP_ISTAG(x) \ (isalpha(x) || (x) == '_' || isdigit(x)) /******************************************************************************\ * Code for creating and destroying a tag-value parser. \******************************************************************************/ jas_tvparser_t *jas_tvparser_create(const char *s) { jas_tvparser_t *tvp; if (!(tvp = jas_malloc(sizeof(jas_tvparser_t)))) { return 0; } if (!(tvp->buf = jas_strdup(s))) { jas_tvparser_destroy(tvp); return 0; } tvp->pos = tvp->buf; tvp->tag = 0; tvp->val = 0; return tvp; } void jas_tvparser_destroy(jas_tvparser_t *tvp) { if (tvp->buf) { jas_free(tvp->buf); } jas_free(tvp); } /******************************************************************************\ * Main parsing code. \******************************************************************************/ /* Get the next tag-value pair. */ int jas_tvparser_next(jas_tvparser_t *tvp) { char *p; char *tag; char *val; /* Skip any leading whitespace. */ p = tvp->pos; while (*p != '\0' && isspace(*p)) { ++p; } /* Has the end of the input data been reached? */ if (*p == '\0') { /* No more tags are present. */ tvp->pos = p; return 1; } /* Does the tag name begin with a valid character? */ if (!JAS_TVP_ISTAG(*p)) { return -1; } /* Remember where the tag name begins. */ tag = p; /* Find the end of the tag name. */ while (*p != '\0' && JAS_TVP_ISTAG(*p)) { ++p; } /* Has the end of the input data been reached? */ if (*p == '\0') { /* The value field is empty. */ tvp->tag = tag; tvp->val = ""; tvp->pos = p; return 0; } /* Is a value field not present? */ if (*p != '=') { if (*p != '\0' && !isspace(*p)) { return -1; } *p++ = '\0'; tvp->tag = tag; tvp->val = ""; tvp->pos = p; return 0; } *p++ = '\0'; val = p; while (*p != '\0' && !isspace(*p)) { ++p; } if (*p != '\0') { *p++ = '\0'; } tvp->pos = p; tvp->tag = tag; tvp->val = val; return 0; } /******************************************************************************\ * Code for querying the current tag/value. \******************************************************************************/ /* Get the current tag. */ char *jas_tvparser_gettag(jas_tvparser_t *tvp) { return tvp->tag; } /* Get the current value. */ char *jas_tvparser_getval(jas_tvparser_t *tvp) { return tvp->val; } /******************************************************************************\ * Miscellaneous code. \******************************************************************************/ /* Lookup a tag by name. */ jas_taginfo_t *jas_taginfos_lookup(jas_taginfo_t *taginfos, const char *name) { jas_taginfo_t *taginfo; taginfo = taginfos; while (taginfo->id >= 0) { if (!strcmp(taginfo->name, name)) { return taginfo; } ++taginfo; } return 0; } /* This function is simply for convenience. */ /* One can avoid testing for the special case of a null pointer, by using this function. This function never returns a null pointer. */ jas_taginfo_t *jas_taginfo_nonull(jas_taginfo_t *taginfo) { static jas_taginfo_t invalidtaginfo = { -1, 0 }; return taginfo ? taginfo : &invalidtaginfo; } jasper-1.900.1/src/libjasper/base/jas_version.c0000644000175000017500000000607510554235551020313 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #include "jasper/jas_version.h" const char *jas_getversion() { return JAS_VERSION; } jasper-1.900.1/src/libjasper/base/Makefile.am0000644000175000017500000000633210554235551017655 0ustar ernieernie# Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ noinst_LTLIBRARIES = libbase.la libbase_la_SOURCES = \ jas_cm.c \ jas_debug.c \ jas_getopt.c \ jas_image.c \ jas_icc.c \ jas_iccdata.c \ jas_init.c \ jas_malloc.c \ jas_seq.c \ jas_stream.c \ jas_string.c \ jas_tmr.c \ jas_tvp.c \ jas_version.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/include/0000755000175000017500000000000010554237064016327 5ustar ernieerniejasper-1.900.1/src/libjasper/include/Makefile.in0000644000175000017500000004231410554237045020377 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/include DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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 = jasper all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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: jasper-1.900.1/src/libjasper/include/jasper/0000755000175000017500000000000010554237064017613 5ustar ernieerniejasper-1.900.1/src/libjasper/include/jasper/jas_debug.h0000644000175000017500000001021610554235550021705 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Debugging-Related Code * * $Id$ */ #ifndef JAS_DEBUG_H #define JAS_DEBUG_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_types.h" #include "jasper/jas_debug.h" #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Macros and functions. \******************************************************************************/ /* Output debugging information to standard error provided that the debug level is set sufficiently high. */ #if defined(DEBUG) #define JAS_DBGLOG(n, x) \ ((jas_getdbglevel() >= (n)) ? (jas_eprintf x) : 0) #else #define JAS_DBGLOG(n, x) #endif /* Get the library debug level. */ int jas_getdbglevel(void); /* Set the library debug level. */ int jas_setdbglevel(int dbglevel); /* Perform formatted output to standard error. */ int jas_eprintf(const char *fmt, ...); /* Dump memory to a stream. */ int jas_memdump(FILE *out, void *data, size_t len); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/Makefile.in0000644000175000017500000003735210554237045021671 0ustar ernieernie# 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@ # Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/include/jasper DIST_COMMON = $(libjasperinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/jas_config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = jas_config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = 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)$(libjasperincludedir)" libjasperincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libjasperinclude_HEADERS) 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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ libjasperincludedir = $(includedir)/jasper libjasperinclude_HEADERS = \ jasper.h \ jas_config.h \ jas_config2.h \ jas_cm.h \ jas_fix.h \ jas_debug.h \ jas_getopt.h \ jas_icc.h \ jas_image.h \ jas_init.h \ jas_malloc.h \ jas_math.h \ jas_seq.h \ jas_stream.h \ jas_string.h \ jas_tmr.h \ jas_tvp.h \ jas_types.h \ jas_version.h all: jas_config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/include/jasper/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/include/jasper/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh jas_config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/jas_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/libjasper/include/jasper/jas_config.h $(srcdir)/jas_config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f jas_config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-libjasperincludeHEADERS: $(libjasperinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(libjasperincludedir)" || $(mkdir_p) "$(DESTDIR)$(libjasperincludedir)" @list='$(libjasperinclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(libjasperincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libjasperincludedir)/$$f'"; \ $(libjasperincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libjasperincludedir)/$$f"; \ done uninstall-libjasperincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libjasperinclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(libjasperincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(libjasperincludedir)/$$f"; \ 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: $(HEADERS) $(SOURCES) jas_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) jas_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ 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) jas_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) jas_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @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 $(HEADERS) jas_config.h installdirs: for dir in "$(DESTDIR)$(libjasperincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done 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-hdr \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-libjasperincludeHEADERS 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 uninstall-libjasperincludeHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic distclean-hdr \ 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-libjasperincludeHEADERS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libjasperincludeHEADERS # 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: jasper-1.900.1/src/libjasper/include/jasper/jas_config2.h0000644000175000017500000000717210554235550022155 0ustar ernieernie/* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_CONFIG2_H #define JAS_CONFIG2_H /* * Configuration for Microsoft Windows and Microsoft Visual C. * * We are not using a configure-based build. * Try to compensate for this here, by specifying the preprocessor symbols * normally defined by configure. */ #define uchar unsigned char #define ushort unsigned short #define uint unsigned int #define ulong unsigned long #define longlong long long #define ulonglong unsigned long long /*#define ssize_t int*/ #define HAVE_FCNTL_H 1 #define HAVE_LIMITS_H 1 #define HAVE_IO_H 1 #define HAVE_WINDOWS_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STDDEF_H 1 #endif jasper-1.900.1/src/libjasper/include/jasper/jas_cm.h0000644000175000017500000001757210554235550021232 0ustar ernieernie/* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Color Management * * $Id$ */ #ifndef JAS_CM_H #define JAS_CM_H #include #include #ifdef __cplusplus extern "C" { #endif typedef int jas_clrspc_t; /* transform operations */ #define JAS_CMXFORM_OP_FWD 0 #define JAS_CMXFORM_OP_REV 1 #define JAS_CMXFORM_OP_PROOF 2 #define JAS_CMXFORM_OP_GAMUT 3 /* rendering intents */ #define JAS_CMXFORM_INTENT_PER 0 #define JAS_CMXFORM_INTENT_RELCLR 1 #define JAS_CMXFORM_INTENT_ABSCLR 2 #define JAS_CMXFORM_INTENT_SAT 3 #define JAS_CMXFORM_NUMINTENTS 4 #define JAS_CMXFORM_OPTM_SPEED 0 #define JAS_CMXFORM_OPTM_SIZE 1 #define JAS_CMXFORM_OPTM_ACC 2 #define jas_clrspc_create(fam, mbr) (((fam) << 8) | (mbr)) #define jas_clrspc_fam(clrspc) ((clrspc) >> 8) #define jas_clrspc_mbr(clrspc) ((clrspc) & 0xff) #define jas_clrspc_isgeneric(clrspc) (!jas_clrspc_mbr(clrspc)) #define jas_clrspc_isunknown(clrspc) ((clrspc) & JAS_CLRSPC_UNKNOWNMASK) #define JAS_CLRSPC_UNKNOWNMASK 0x4000 /* color space families */ #define JAS_CLRSPC_FAM_UNKNOWN 0 #define JAS_CLRSPC_FAM_XYZ 1 #define JAS_CLRSPC_FAM_LAB 2 #define JAS_CLRSPC_FAM_GRAY 3 #define JAS_CLRSPC_FAM_RGB 4 #define JAS_CLRSPC_FAM_YCBCR 5 /* specific color spaces */ #define JAS_CLRSPC_UNKNOWN JAS_CLRSPC_UNKNOWNMASK #define JAS_CLRSPC_CIEXYZ jas_clrspc_create(JAS_CLRSPC_FAM_XYZ, 1) #define JAS_CLRSPC_CIELAB jas_clrspc_create(JAS_CLRSPC_FAM_LAB, 1) #define JAS_CLRSPC_SGRAY jas_clrspc_create(JAS_CLRSPC_FAM_GRAY, 1) #define JAS_CLRSPC_SRGB jas_clrspc_create(JAS_CLRSPC_FAM_RGB, 1) #define JAS_CLRSPC_SYCBCR jas_clrspc_create(JAS_CLRSPC_FAM_YCBCR, 1) /* generic color spaces */ #define JAS_CLRSPC_GENRGB jas_clrspc_create(JAS_CLRSPC_FAM_RGB, 0) #define JAS_CLRSPC_GENGRAY jas_clrspc_create(JAS_CLRSPC_FAM_GRAY, 0) #define JAS_CLRSPC_GENYCBCR jas_clrspc_create(JAS_CLRSPC_FAM_YCBCR, 0) #define JAS_CLRSPC_CHANIND_YCBCR_Y 0 #define JAS_CLRSPC_CHANIND_YCBCR_CB 1 #define JAS_CLRSPC_CHANIND_YCBCR_CR 2 #define JAS_CLRSPC_CHANIND_RGB_R 0 #define JAS_CLRSPC_CHANIND_RGB_G 1 #define JAS_CLRSPC_CHANIND_RGB_B 2 #define JAS_CLRSPC_CHANIND_GRAY_Y 0 typedef double jas_cmreal_t; struct jas_cmpxform_s; typedef struct { long *buf; int prec; int sgnd; int width; int height; } jas_cmcmptfmt_t; typedef struct { int numcmpts; jas_cmcmptfmt_t *cmptfmts; } jas_cmpixmap_t; typedef struct { void (*destroy)(struct jas_cmpxform_s *pxform); int (*apply)(struct jas_cmpxform_s *pxform, jas_cmreal_t *in, jas_cmreal_t *out, int cnt); void (*dump)(struct jas_cmpxform_s *pxform); } jas_cmpxformops_t; typedef struct { jas_cmreal_t *data; int size; } jas_cmshapmatlut_t; typedef struct { int mono; int order; int useluts; int usemat; jas_cmshapmatlut_t luts[3]; jas_cmreal_t mat[3][4]; } jas_cmshapmat_t; typedef struct { int order; } jas_cmshaplut_t; typedef struct { int inclrspc; int outclrspc; } jas_cmclrspcconv_t; #define jas_align_t double typedef struct jas_cmpxform_s { int refcnt; jas_cmpxformops_t *ops; int numinchans; int numoutchans; union { jas_align_t dummy; jas_cmshapmat_t shapmat; jas_cmshaplut_t shaplut; jas_cmclrspcconv_t clrspcconv; } data; } jas_cmpxform_t; typedef struct { int numpxforms; int maxpxforms; jas_cmpxform_t **pxforms; } jas_cmpxformseq_t; typedef struct { int numinchans; int numoutchans; jas_cmpxformseq_t *pxformseq; } jas_cmxform_t; #define JAS_CMPROF_TYPE_DEV 1 #define JAS_CMPROF_TYPE_CLRSPC 2 #define JAS_CMPROF_NUMPXFORMSEQS 13 typedef struct { int clrspc; int numchans; int refclrspc; int numrefchans; jas_iccprof_t *iccprof; jas_cmpxformseq_t *pxformseqs[JAS_CMPROF_NUMPXFORMSEQS]; } jas_cmprof_t; /* Create a profile. */ /* Destroy a profile. */ void jas_cmprof_destroy(jas_cmprof_t *prof); #if 0 typedef int_fast32_t jas_cmattrname_t; typedef int_fast32_t jas_cmattrval_t; typedef int_fast32_t jas_cmattrtype_t; /* Load a profile. */ int jas_cmprof_load(jas_cmprof_t *prof, jas_stream_t *in, int fmt); /* Save a profile. */ int jas_cmprof_save(jas_cmprof_t *prof, jas_stream_t *out, int fmt); /* Set an attribute of a profile. */ int jas_cm_prof_setattr(jas_cm_prof_t *prof, jas_cm_attrname_t name, void *val); /* Get an attribute of a profile. */ void *jas_cm_prof_getattr(jas_cm_prof_t *prof, jas_cm_attrname_t name); #endif jas_cmxform_t *jas_cmxform_create(jas_cmprof_t *inprof, jas_cmprof_t *outprof, jas_cmprof_t *proofprof, int op, int intent, int optimize); void jas_cmxform_destroy(jas_cmxform_t *xform); /* Apply a transform to data. */ int jas_cmxform_apply(jas_cmxform_t *xform, jas_cmpixmap_t *in, jas_cmpixmap_t *out); int jas_cxform_optimize(jas_cmxform_t *xform, int optimize); int jas_clrspc_numchans(int clrspc); jas_cmprof_t *jas_cmprof_createfromiccprof(jas_iccprof_t *iccprof); jas_cmprof_t *jas_cmprof_createfromclrspc(int clrspc); jas_iccprof_t *jas_iccprof_createfromcmprof(jas_cmprof_t *prof); #define jas_cmprof_clrspc(prof) ((prof)->clrspc) jas_cmprof_t *jas_cmprof_copy(jas_cmprof_t *prof); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_version.h0000644000175000017500000001140310554235550022303 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id$ */ #ifndef JAS_VERSION_H #define JAS_VERSION_H #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants and types. \******************************************************************************/ #if !defined(JAS_VERSION) /* The version information below should match that specified in the "configure.in" file! */ #define JAS_VERSION "unknown" #endif #define JAS_COPYRIGHT \ "Copyright (c) 2001-2006 Michael David Adams.\n" \ "Copyright (c) 1999-2000 Image Power, Inc. and the University of\n" \ " British Columbia.\n" \ "All rights reserved.\n" #define JAS_NOTES \ "For more information about this software, please visit the following\n" \ "web sites/pages:\n" \ " http://www.ece.uvic.ca/~mdadams/jasper\n" \ " http://www.jpeg.org/software\n" \ "To be added to the (moderated) JasPer software announcements\n" \ "mailing list, send an email to:\n" \ " jasper-announce-subscribe@yahoogroups.com\n" \ "To be added to the (unmoderated) JasPer software discussion\n" \ "mailing list, send an email to:\n" \ " jasper-discussion-subscribe@yahoogroups.com\n" \ "Please send any bug reports to:\n" \ " mdadams@ieee.org\n" /******************************************************************************\ * Functions. \******************************************************************************/ const char *jas_getversion(void); /* Get the version information for the JasPer library. */ /* Note: Since libjasper can be built as a shared library, the version returned by this function may not necessarily correspond to JAS_VERSION. */ #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_tmr.h0000644000175000017500000000704510554235550021427 0ustar ernieernie/* * Copyright (c) 2004 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_TMR_H #define JAS_TMR_H #include #include #if defined(HAVE_SYS_TIME_H) #include #endif #ifdef __cplusplus extern "C" { #endif #if defined(HAVE_GETTIMEOFDAY) typedef struct { struct timeval start; struct timeval stop; } jas_tmr_t; #elif defined(HAVE_GETRUSAGE) typedef struct { struct rusage start; struct rusage stop; } jas_tmr_t; #else typedef int jas_tmr_t; #endif void jas_tmr_start(jas_tmr_t *tmr); void jas_tmr_stop(jas_tmr_t *tmr); double jas_tmr_get(jas_tmr_t *tmr); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_init.h0000644000175000017500000000652710554235550021574 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_INIT_H #define JAS_INIT_H #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Functions. \******************************************************************************/ int jas_init(void); void jas_cleanup(void); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_fix.h0000644000175000017500000003172010554235550021410 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Fixed-Point Number Class * * $Id$ */ #ifndef JAS_FIX_H #define JAS_FIX_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants. \******************************************************************************/ /* The representation of the value zero. */ #define JAS_FIX_ZERO(fix_t, fracbits) \ JAS_CAST(fix_t, 0) /* The representation of the value one. */ #define JAS_FIX_ONE(fix_t, fracbits) \ (JAS_CAST(fix_t, 1) << (fracbits)) /* The representation of the value one half. */ #define JAS_FIX_HALF(fix_t, fracbits) \ (JAS_CAST(fix_t, 1) << ((fracbits) - 1)) /******************************************************************************\ * Conversion operations. \******************************************************************************/ /* Convert an int to a fixed-point number. */ #define JAS_INTTOFIX(fix_t, fracbits, x) \ JAS_CAST(fix_t, (x) << (fracbits)) /* Convert a fixed-point number to an int. */ #define JAS_FIXTOINT(fix_t, fracbits, x) \ JAS_CAST(int, (x) >> (fracbits)) /* Convert a fixed-point number to a double. */ #define JAS_FIXTODBL(fix_t, fracbits, x) \ (JAS_CAST(double, x) / (JAS_CAST(fix_t, 1) << (fracbits))) /* Convert a double to a fixed-point number. */ #define JAS_DBLTOFIX(fix_t, fracbits, x) \ JAS_CAST(fix_t, ((x) * JAS_CAST(double, JAS_CAST(fix_t, 1) << (fracbits)))) /******************************************************************************\ * Basic arithmetic operations. * All other arithmetic operations are synthesized from these basic operations. * There are three macros for each type of arithmetic operation. * One macro always performs overflow/underflow checking, one never performs * overflow/underflow checking, and one is generic with its behavior * depending on compile-time flags. * Only the generic macros should be invoked directly by application code. \******************************************************************************/ /* Calculate the sum of two fixed-point numbers. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_ADD JAS_FIX_ADD_FAST #else #define JAS_FIX_ADD JAS_FIX_ADD_OFLOW #endif /* Calculate the sum of two fixed-point numbers without overflow checking. */ #define JAS_FIX_ADD_FAST(fix_t, fracbits, x, y) ((x) + (y)) /* Calculate the sum of two fixed-point numbers with overflow checking. */ #define JAS_FIX_ADD_OFLOW(fix_t, fracbits, x, y) \ ((x) >= 0) ? \ (((y) >= 0) ? ((x) + (y) >= 0 || JAS_FIX_OFLOW(), (x) + (y)) : \ ((x) + (y))) : \ (((y) >= 0) ? ((x) + (y)) : ((x) + (y) < 0 || JAS_FIX_OFLOW(), \ (x) + (y))) /* Calculate the product of two fixed-point numbers. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_MUL JAS_FIX_MUL_FAST #else #define JAS_FIX_MUL JAS_FIX_MUL_OFLOW #endif /* Calculate the product of two fixed-point numbers without overflow checking. */ #define JAS_FIX_MUL_FAST(fix_t, fracbits, bigfix_t, x, y) \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y)) >> \ (fracbits)) /* Calculate the product of two fixed-point numbers with overflow checking. */ #define JAS_FIX_MUL_OFLOW(fix_t, fracbits, bigfix_t, x, y) \ ((JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> (fracbits)) == \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \ (fracbits))) ? \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \ (fracbits))) : JAS_FIX_OFLOW()) /* Calculate the product of a fixed-point number and an int. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_MULBYINT JAS_FIX_MULBYINT_FAST #else #define JAS_FIX_MULBYINT JAS_FIX_MULBYINT_OFLOW #endif /* Calculate the product of a fixed-point number and an int without overflow checking. */ #define JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y) \ JAS_CAST(fix_t, ((x) * (y))) /* Calculate the product of a fixed-point number and an int with overflow checking. */ #define JAS_FIX_MULBYINT_OFLOW(fix_t, fracbits, x, y) \ JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y) /* Calculate the quotient of two fixed-point numbers. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_DIV JAS_FIX_DIV_FAST #else #define JAS_FIX_DIV JAS_FIX_DIV_UFLOW #endif /* Calculate the quotient of two fixed-point numbers without underflow checking. */ #define JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y) \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) << (fracbits)) / (y)) /* Calculate the quotient of two fixed-point numbers with underflow checking. */ #define JAS_FIX_DIV_UFLOW(fix_t, fracbits, bigfix_t, x, y) \ JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y) /* Negate a fixed-point number. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_NEG JAS_FIX_NEG_FAST #else #define JAS_FIX_NEG JAS_FIX_NEG_OFLOW #endif /* Negate a fixed-point number without overflow checking. */ #define JAS_FIX_NEG_FAST(fix_t, fracbits, x) \ (-(x)) /* Negate a fixed-point number with overflow checking. */ /* Yes, overflow is actually possible for two's complement representations, although highly unlikely to occur. */ #define JAS_FIX_NEG_OFLOW(fix_t, fracbits, x) \ (((x) < 0) ? (-(x) > 0 || JAS_FIX_OFLOW(), -(x)) : (-(x))) /* Perform an arithmetic shift left of a fixed-point number. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_ASL JAS_FIX_ASL_FAST #else #define JAS_FIX_ASL JAS_FIX_ASL_OFLOW #endif /* Perform an arithmetic shift left of a fixed-point number without overflow checking. */ #define JAS_FIX_ASL_FAST(fix_t, fracbits, x, n) \ ((x) << (n)) /* Perform an arithmetic shift left of a fixed-point number with overflow checking. */ #define JAS_FIX_ASL_OFLOW(fix_t, fracbits, x, n) \ ((((x) << (n)) >> (n)) == (x) || JAS_FIX_OFLOW(), (x) << (n)) /* Perform an arithmetic shift right of a fixed-point number. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_ASR JAS_FIX_ASR_FAST #else #define JAS_FIX_ASR JAS_FIX_ASR_UFLOW #endif /* Perform an arithmetic shift right of a fixed-point number without underflow checking. */ #define JAS_FIX_ASR_FAST(fix_t, fracbits, x, n) \ ((x) >> (n)) /* Perform an arithmetic shift right of a fixed-point number with underflow checking. */ #define JAS_FIX_ASR_UFLOW(fix_t, fracbits, x, n) \ JAS_FIX_ASR_FAST(fix_t, fracbits, x, n) /******************************************************************************\ * Other basic arithmetic operations. \******************************************************************************/ /* Calculate the difference between two fixed-point numbers. */ #define JAS_FIX_SUB(fix_t, fracbits, x, y) \ JAS_FIX_ADD(fix_t, fracbits, x, JAS_FIX_NEG(fix_t, fracbits, y)) /* Add one fixed-point number to another. */ #define JAS_FIX_PLUSEQ(fix_t, fracbits, x, y) \ ((x) = JAS_FIX_ADD(fix_t, fracbits, x, y)) /* Subtract one fixed-point number from another. */ #define JAS_FIX_MINUSEQ(fix_t, fracbits, x, y) \ ((x) = JAS_FIX_SUB(fix_t, fracbits, x, y)) /* Multiply one fixed-point number by another. */ #define JAS_FIX_MULEQ(fix_t, fracbits, bigfix_t, x, y) \ ((x) = JAS_FIX_MUL(fix_t, fracbits, bigfix_t, x, y)) /******************************************************************************\ * Miscellaneous operations. \******************************************************************************/ /* Calculate the absolute value of a fixed-point number. */ #define JAS_FIX_ABS(fix_t, fracbits, x) \ (((x) >= 0) ? (x) : (JAS_FIX_NEG(fix_t, fracbits, x))) /* Is a fixed-point number an integer? */ #define JAS_FIX_ISINT(fix_t, fracbits, x) \ (JAS_FIX_FLOOR(fix_t, fracbits, x) == (x)) /* Get the sign of a fixed-point number. */ #define JAS_FIX_SGN(fix_t, fracbits, x) \ ((x) >= 0 ? 1 : (-1)) /******************************************************************************\ * Relational operations. \******************************************************************************/ /* Compare two fixed-point numbers. */ #define JAS_FIX_CMP(fix_t, fracbits, x, y) \ ((x) > (y) ? 1 : (((x) == (y)) ? 0 : (-1))) /* Less than. */ #define JAS_FIX_LT(fix_t, fracbits, x, y) \ ((x) < (y)) /* Less than or equal. */ #define JAS_FIX_LTE(fix_t, fracbits, x, y) \ ((x) <= (y)) /* Greater than. */ #define JAS_FIX_GT(fix_t, fracbits, x, y) \ ((x) > (y)) /* Greater than or equal. */ #define JAS_FIX_GTE(fix_t, fracbits, x, y) \ ((x) >= (y)) /******************************************************************************\ * Rounding functions. \******************************************************************************/ /* Round a fixed-point number to the nearest integer. */ #define JAS_FIX_ROUND(fix_t, fracbits, x) \ (((x) < 0) ? JAS_FIX_FLOOR(fix_t, fracbits, JAS_FIX_ADD(fix_t, fracbits, \ (x), JAS_FIX_HALF(fix_t, fracbits))) : \ JAS_FIX_NEG(fix_t, fracbits, JAS_FIX_FLOOR(fix_t, fracbits, \ JAS_FIX_ADD(fix_t, fracbits, (-(x)), JAS_FIX_HALF(fix_t, fracbits))))) /* Round a fixed-point number to the nearest integer in the direction of negative infinity (i.e., the floor function). */ #define JAS_FIX_FLOOR(fix_t, fracbits, x) \ ((x) & (~((JAS_CAST(fix_t, 1) << (fracbits)) - 1))) /* Round a fixed-point number to the nearest integer in the direction of zero. */ #define JAS_FIX_TRUNC(fix_t, fracbits, x) \ (((x) >= 0) ? JAS_FIX_FLOOR(fix_t, fracbits, x) : \ JAS_FIX_CEIL(fix_t, fracbits, x)) /******************************************************************************\ * The below macros are for internal library use only. Do not invoke them * directly in application code. \******************************************************************************/ /* Handle overflow. */ #define JAS_FIX_OFLOW() \ jas_eprintf("overflow error: file %s, line %d\n", __FILE__, __LINE__) /* Handle underflow. */ #define JAS_FIX_UFLOW() \ jas_eprintf("underflow error: file %s, line %d\n", __FILE__, __LINE__) #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_malloc.h0000644000175000017500000001070610554235550022072 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Memory Allocator * * $Id$ */ #ifndef JAS_MALLOC_H #define JAS_MALLOC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Hack follows... \******************************************************************************/ #if defined(DEBUG_MEMALLOC) /* This is somewhat of a hack, but it's a useful hack. :-) */ /* Use my own custom memory allocator for debugging. */ #include "../../../../local/src/memalloc.h" #define jas_malloc MEMALLOC #define jas_free MEMFREE #define jas_realloc MEMREALLOC #define jas_calloc MEMCALLOC #endif /******************************************************************************\ * Functions. \******************************************************************************/ #if !defined(DEBUG_MEMALLOC) /* Allocate memory. */ void *jas_malloc(size_t size); /* Free memory. */ void jas_free(void *ptr); /* Resize a block of allocated memory. */ void *jas_realloc(void *ptr, size_t size); /* Allocate a block of memory and initialize the contents to zero. */ void *jas_calloc(size_t nmemb, size_t size); #endif #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_tvp.h0000644000175000017500000001222710554235550021434 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Tag/Value Parser * * $Id$ */ #ifndef JAS_TVP_H #define JAS_TVP_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Types. \******************************************************************************/ /* Tag information type. */ typedef struct { int id; /* The ID for the tag. */ char *name; /* The name of the tag. */ } jas_taginfo_t; /* Tag-value parser type. */ typedef struct { char *buf; /* The parsing buffer. */ char *tag; /* The current tag name. */ char *val; /* The current value. */ char *pos; /* The current position in the parsing buffer. */ } jas_tvparser_t; /******************************************************************************\ * Tag information functions. \******************************************************************************/ /* Lookup a tag by name. */ jas_taginfo_t *jas_taginfos_lookup(jas_taginfo_t *taginfos, const char *name); /* This function returns a pointer to the specified taginfo object if it exists (i.e., the pointer is nonnull); otherwise, a pointer to a dummy object is returned. This is useful in some situations to avoid checking for a null pointer. */ jas_taginfo_t *jas_taginfo_nonull(jas_taginfo_t *taginfo); /******************************************************************************\ * Tag-value parser functions. \******************************************************************************/ /* Create a tag-value parser for the specified string. */ jas_tvparser_t *jas_tvparser_create(const char *s); /* Destroy a tag-value parser. */ void jas_tvparser_destroy(jas_tvparser_t *tvparser); /* Get the next tag-value pair. */ int jas_tvparser_next(jas_tvparser_t *tvparser); /* Get the tag name for the current tag-value pair. */ char *jas_tvparser_gettag(jas_tvparser_t *tvparser); /* Get the value for the current tag-value pair. */ char *jas_tvparser_getval(jas_tvparser_t *tvparser); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_config.h.in0000644000175000017500000001044010554237064022472 0ustar ernieernie/* src/libjasper/include/jasper/jas_config.h.in. Generated from configure.ac by autoheader. */ /* Avoid problems due to multiple inclusion. */ #ifndef JAS_CONFIG_H #define JAS_CONFIG_H /* This preprocessor symbol identifies the version of JasPer. */ #undef JAS_VERSION /* If configure is being used, this symbol will be defined automatically at this point in the configuration header file. */ /* The preprocessor symbol JAS_WIN_MSVC_BUILD should not be defined unless the JasPer software is being built under Microsoft Windows using Microsoft Visual C. */ #if !defined(JAS_WIN_MSVC_BUILD) /* A configure-based build is being used. */ /* Extra debugging support */ #undef DEBUG /* Debugging memory allocator */ #undef DEBUG_MEMALLOC /* Debugging overflow detection */ #undef DEBUG_OVERFLOW /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IO_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Have variable length arrays */ #undef HAVE_VLA /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* JasPer configure */ #undef JAS_CONFIGURE /* JasPer version */ #undef JAS_VERSION /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `long long' if does not define. */ #undef longlong /* Define to `unsigned' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to `unsigned char' if does not define. */ #undef uchar /* Define to `unsigned int' if does not define. */ #undef uint /* Define to `unsigned long' if does not define. */ #undef ulong /* Define to `unsigned long long' if does not define. */ #undef ulonglong /* Define to `unsigned short' if does not define. */ #undef ushort #else /* A configure-based build is not being used. */ #include #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_icc.h0000644000175000017500000003571110554235550021364 0ustar ernieernie/* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_ICC_H #define JAS_ICC_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* Profile file signature. */ #define JAS_ICC_MAGIC 0x61637370 #define JAS_ICC_HDRLEN 128 /* Profile/device class signatures. */ #define JAS_ICC_CLAS_IN 0x73636e72 /* input device */ #define JAS_ICC_CLAS_DPY 0x6d6e7472 /* display device */ #define JAS_ICC_CLAS_OUT 0x70727472 /* output device */ #define JAS_ICC_CLAS_LNK 0x6c696e6b /* device link */ #define JAS_ICC_CLAS_CNV 0x73706163 /* color space conversion */ #define JAS_ICC_CLAS_ABS 0x61627374 /* abstract */ #define JAS_ICC_CLAS_NAM 0x6e6d636c /* named color */ /* Color space signatures. */ #define JAS_ICC_COLORSPC_XYZ 0x58595a20 /* XYZ */ #define JAS_ICC_COLORSPC_LAB 0x4c616220 /* LAB */ #define JAS_ICC_COLORSPC_LUV 0x4c757620 /* LUV */ #define JAS_ICC_COLORSPC_YCBCR 0x59436272 /* YCbCr */ #define JAS_ICC_COLORSPC_YXY 0x59787920 /* Yxy */ #define JAS_ICC_COLORSPC_RGB 0x52474220 /* RGB */ #define JAS_ICC_COLORSPC_GRAY 0x47524159 /* Gray */ #define JAS_ICC_COLORSPC_HSV 0x48535620 /* HSV */ #define JAS_ICC_COLORSPC_HLS 0x484c5320 /* HLS */ #define JAS_ICC_COLORSPC_CMYK 0x434d594b /* CMYK */ #define JAS_ICC_COLORSPC_CMY 0x434d5920 /* CMY */ #define JAS_ICC_COLORSPC_2 0x32434c52 /* 2 channel color */ #define JAS_ICC_COLORSPC_3 0x33434c52 /* 3 channel color */ #define JAS_ICC_COLORSPC_4 0x34434c52 /* 4 channel color */ #define JAS_ICC_COLORSPC_5 0x35434c52 /* 5 channel color */ #define JAS_ICC_COLORSPC_6 0x36434c52 /* 6 channel color */ #define JAS_ICC_COLORSPC_7 0x37434c52 /* 7 channel color */ #define JAS_ICC_COLORSPC_8 0x38434c52 /* 8 channel color */ #define JAS_ICC_COLORSPC_9 0x39434c52 /* 9 channel color */ #define JAS_ICC_COLORSPC_10 0x41434c52 /* 10 channel color */ #define JAS_ICC_COLORSPC_11 0x42434c52 /* 11 channel color */ #define JAS_ICC_COLORSPC_12 0x43434c52 /* 12 channel color */ #define JAS_ICC_COLORSPC_13 0x44434c52 /* 13 channel color */ #define JAS_ICC_COLORSPC_14 0x45434c52 /* 14 channel color */ #define JAS_ICC_COLORSPC_15 0x46434c52 /* 15 channel color */ /* Profile connection color space (PCS) signatures. */ #define JAS_ICC_REFCOLORSPC_XYZ 0x58595a20 /* CIE XYZ */ #define JAS_ICC_REFCOLORSPC_LAB 0x4c616220 /* CIE Lab */ /* Primary platform signatures. */ #define JAS_ICC_PLATFORM_APPL 0x4150504c /* Apple Computer */ #define JAS_ICC_PLATFORM_MSFT 0x4d534654 /* Microsoft */ #define JAS_ICC_PLATFORM_SGI 0x53474920 /* Silicon Graphics */ #define JAS_ICC_PLATFORM_SUNW 0x53554e57 /* Sun Microsystems */ #define JAS_ICC_PLATFORM_TGNT 0x54474e54 /* Taligent */ /* Profile flags. */ #define JAS_ICC_FLAGS_EMBED 0x01 /* embedded */ #define JAS_ICC_FLAGS_NOSEP 0x02 /* no separate use */ /* Attributes. */ #define JAS_ICC_ATTR_TRANS 0x01 /* transparent */ #define JAS_ICC_ATTR_MATTE 0x02 /* matte */ /* Rendering intents. */ #define JAS_ICC_INTENT_PER 0 /* perceptual */ #define JAS_ICC_INTENT_REL 1 /* relative colorimetric */ #define JAS_ICC_INTENT_SAT 2 /* saturation */ #define JAS_ICC_INTENT_ABS 3 /* absolute colorimetric */ /* Tag signatures. */ #define JAS_ICC_TAG_ATOB0 0x41324230 /* */ #define JAS_ICC_TAG_ATOB1 0x41324231 /* */ #define JAS_ICC_TAG_ATOB2 0x41324232 /* */ #define JAS_ICC_TAG_BLUMATCOL 0x6258595a /* */ #define JAS_ICC_TAG_BLUTRC 0x62545243 /* */ #define JAS_ICC_TAG_BTOA0 0x42324130 /* */ #define JAS_ICC_TAG_BTOA1 0x42324131 /* */ #define JAS_ICC_TAG_BTOA2 0x42324132 /* */ #define JAS_ICC_TAG_CALTIME 0x63616c74 /* */ #define JAS_ICC_TAG_CHARTARGET 0x74617267 /* */ #define JAS_ICC_TAG_CPYRT 0x63707274 /* */ #define JAS_ICC_TAG_CRDINFO 0x63726469 /* */ #define JAS_ICC_TAG_DEVMAKERDESC 0x646d6e64 /* */ #define JAS_ICC_TAG_DEVMODELDESC 0x646d6464 /* */ #define JAS_ICC_TAG_DEVSET 0x64657673 /* */ #define JAS_ICC_TAG_GAMUT 0x67616d74 /* */ #define JAS_ICC_TAG_GRYTRC 0x6b545243 /* */ #define JAS_ICC_TAG_GRNMATCOL 0x6758595a /* */ #define JAS_ICC_TAG_GRNTRC 0x67545243 /* */ #define JAS_ICC_TAG_LUM 0x6c756d69 /* */ #define JAS_ICC_TAG_MEASURE 0x6d656173 /* */ #define JAS_ICC_TAG_MEDIABLKPT 0x626b7074 /* */ #define JAS_ICC_TAG_MEDIAWHIPT 0x77747074 /* */ #define JAS_ICC_TAG_NAMCOLR 0x6e636f6c /* */ #define JAS_ICC_TAG_NAMCOLR2 0x6e636c32 /* */ #define JAS_ICC_TAG_OUTRESP 0x72657370 /* */ #define JAS_ICC_TAG_PREVIEW0 0x70726530 /* */ #define JAS_ICC_TAG_PREVIEW1 0x70726531 /* */ #define JAS_ICC_TAG_PREVIEW2 0x70726532 /* */ #define JAS_ICC_TAG_PROFDESC 0x64657363 /* */ #define JAS_ICC_TAG_PROFSEQDESC 0x70736571 /* */ #define JAS_ICC_TAG_PSDCRD0 0x70736430 /* */ #define JAS_ICC_TAG_PSCRDD1 0x70736431 /* */ #define JAS_ICC_TAG_PSCRDD2 0x70736432 /* */ #define JAS_ICC_TAG_PSCRDD3 0x70736433 /* */ #define JAS_ICC_TAG_PS2CSA 0x70733273 /* */ #define JAS_ICC_TAG_PS2RENINTENT 0x70733269 /* */ #define JAS_ICC_TAG_REDMATCOL 0x7258595a /* */ #define JAS_ICC_TAG_REDTRC 0x72545243 /* */ #define JAS_ICC_TAG_SCRNGDES 0x73637264 /* */ #define JAS_ICC_TAG_SCRNG 0x7363726e /* */ #define JAS_ICC_TAG_TECH 0x74656368 /* */ #define JAS_ICC_TAG_UCRBG 0x62666420 /* */ #define JAS_ICC_TAG_VIEWCONDDESC 0x76756564 /* */ #define JAS_ICC_TAG_VIEWCOND 0x76696577 /* */ /* Type signatures. */ #define JAS_ICC_TYPE_CRDINFO 0x63726469 /* CRD information */ #define JAS_ICC_TYPE_CURV 0x63757276 /* curve */ #define JAS_ICC_TYPE_DATA 0x64617461 /* data */ #define JAS_ICC_TYPE_TIME 0x6474696d /* date/time */ #define JAS_ICC_TYPE_DEVSET 0x64657673 /* device settings */ #define JAS_ICC_TYPE_LUT16 0x6d667432 /* */ #define JAS_ICC_TYPE_LUT8 0x6d667431 /* */ #define JAS_ICC_TYPE_MEASURE 0x6d656173 /* */ #define JAS_ICC_TYPE_NAMCOLR 0x6e636f6c /* */ #define JAS_ICC_TYPE_NAMCOLR2 0x6e636c32 /* */ #define JAS_ICC_TYPE_PROFSEQDESC 0x70736571 /* profile sequence description */ #define JAS_ICC_TYPE_RESPCURVSET16 0x72637332 /* response curve set 16 */ #define JAS_ICC_TYPE_SF32 0x73663332 /* signed 32-bit fixed-point */ #define JAS_ICC_TYPE_SCRNG 0x7363726e /* screening */ #define JAS_ICC_TYPE_SIG 0x73696720 /* signature */ #define JAS_ICC_TYPE_TXTDESC 0x64657363 /* text description */ #define JAS_ICC_TYPE_TXT 0x74657874 /* text */ #define JAS_ICC_TYPE_UF32 0x75663332 /* unsigned 32-bit fixed-point */ #define JAS_ICC_TYPE_UCRBG 0x62666420 /* */ #define JAS_ICC_TYPE_UI16 0x75693136 /* */ #define JAS_ICC_TYPE_UI32 0x75693332 /* */ #define JAS_ICC_TYPE_UI8 0x75693038 /* */ #define JAS_ICC_TYPE_UI64 0x75693634 /* */ #define JAS_ICC_TYPE_VIEWCOND 0x76696577 /* */ #define JAS_ICC_TYPE_XYZ 0x58595a20 /* XYZ */ typedef uint_fast8_t jas_iccuint8_t; typedef uint_fast16_t jas_iccuint16_t; typedef uint_fast32_t jas_iccuint32_t; typedef int_fast32_t jas_iccsint32_t; typedef int_fast32_t jas_iccs15fixed16_t; typedef uint_fast32_t jas_iccu16fixed16_t; typedef uint_fast64_t jas_iccuint64_t; typedef uint_fast32_t jas_iccsig_t; typedef jas_iccsig_t jas_icctagsig_t; typedef jas_iccsig_t jas_icctagtype_t; typedef jas_iccsig_t jas_iccattrname_t; /* Date/time type. */ typedef struct { jas_iccuint16_t year; jas_iccuint16_t month; jas_iccuint16_t day; jas_iccuint16_t hour; jas_iccuint16_t min; jas_iccuint16_t sec; } jas_icctime_t; /* XYZ type. */ typedef struct { jas_iccs15fixed16_t x; jas_iccs15fixed16_t y; jas_iccs15fixed16_t z; } jas_iccxyz_t; /* Curve type. */ typedef struct { jas_iccuint32_t numents; jas_iccuint16_t *ents; } jas_icccurv_t; /* Text description type. */ typedef struct { jas_iccuint32_t asclen; char *ascdata; /* ASCII invariant description */ jas_iccuint32_t uclangcode; /* Unicode language code */ jas_iccuint32_t uclen; /* Unicode localizable description count */ uchar *ucdata; /* Unicode localizable description */ jas_iccuint16_t sccode; /* ScriptCode code */ jas_iccuint8_t maclen; /* Localizable Macintosh description count */ uchar macdata[69]; /* Localizable Macintosh description */ } jas_icctxtdesc_t; /* Text type. */ typedef struct { char *string; /* ASCII character string */ } jas_icctxt_t; typedef struct { jas_iccuint8_t numinchans; jas_iccuint8_t numoutchans; jas_iccsint32_t e[3][3]; jas_iccuint8_t clutlen; jas_iccuint8_t *clut; jas_iccuint16_t numintabents; jas_iccuint8_t **intabs; jas_iccuint8_t *intabsbuf; jas_iccuint16_t numouttabents; jas_iccuint8_t **outtabs; jas_iccuint8_t *outtabsbuf; } jas_icclut8_t; typedef struct { jas_iccuint8_t numinchans; jas_iccuint8_t numoutchans; jas_iccsint32_t e[3][3]; jas_iccuint8_t clutlen; jas_iccuint16_t *clut; jas_iccuint16_t numintabents; jas_iccuint16_t **intabs; jas_iccuint16_t *intabsbuf; jas_iccuint16_t numouttabents; jas_iccuint16_t **outtabs; jas_iccuint16_t *outtabsbuf; } jas_icclut16_t; struct jas_iccattrval_s; typedef struct { void (*destroy)(struct jas_iccattrval_s *); int (*copy)(struct jas_iccattrval_s *, struct jas_iccattrval_s *); int (*input)(struct jas_iccattrval_s *, jas_stream_t *, int); int (*output)(struct jas_iccattrval_s *, jas_stream_t *); int (*getsize)(struct jas_iccattrval_s *); void (*dump)(struct jas_iccattrval_s *, FILE *); } jas_iccattrvalops_t; /* Attribute value type (type and value information). */ typedef struct jas_iccattrval_s { int refcnt; /* reference count */ jas_iccsig_t type; /* type */ jas_iccattrvalops_t *ops; /* type-dependent operations */ union { jas_iccxyz_t xyz; jas_icccurv_t curv; jas_icctxtdesc_t txtdesc; jas_icctxt_t txt; jas_icclut8_t lut8; jas_icclut16_t lut16; } data; /* value */ } jas_iccattrval_t; /* Header type. */ typedef struct { jas_iccuint32_t size; /* profile size */ jas_iccsig_t cmmtype; /* CMM type signature */ jas_iccuint32_t version; /* profile version */ jas_iccsig_t clas; /* profile/device class signature */ jas_iccsig_t colorspc; /* color space of data */ jas_iccsig_t refcolorspc; /* profile connection space */ jas_icctime_t ctime; /* creation time */ jas_iccsig_t magic; /* profile file signature */ jas_iccsig_t platform; /* primary platform */ jas_iccuint32_t flags; /* profile flags */ jas_iccsig_t maker; /* device manufacturer signature */ jas_iccsig_t model; /* device model signature */ jas_iccuint64_t attr; /* device setup attributes */ jas_iccsig_t intent; /* rendering intent */ jas_iccxyz_t illum; /* illuminant */ jas_iccsig_t creator; /* profile creator signature */ } jas_icchdr_t; typedef struct { jas_iccsig_t name; jas_iccattrval_t *val; } jas_iccattr_t; typedef struct { int numattrs; int maxattrs; jas_iccattr_t *attrs; } jas_iccattrtab_t; typedef struct jas_icctagtabent_s { jas_iccuint32_t tag; jas_iccuint32_t off; jas_iccuint32_t len; void *data; struct jas_icctagtabent_s *first; } jas_icctagtabent_t; typedef struct { jas_iccuint32_t numents; jas_icctagtabent_t *ents; } jas_icctagtab_t; /* ICC profile type. */ typedef struct { jas_icchdr_t hdr; jas_icctagtab_t tagtab; jas_iccattrtab_t *attrtab; } jas_iccprof_t; typedef struct { jas_iccuint32_t type; jas_iccattrvalops_t ops; } jas_iccattrvalinfo_t; jas_iccprof_t *jas_iccprof_load(jas_stream_t *in); int jas_iccprof_save(jas_iccprof_t *prof, jas_stream_t *out); void jas_iccprof_destroy(jas_iccprof_t *prof); jas_iccattrval_t *jas_iccprof_getattr(jas_iccprof_t *prof, jas_iccattrname_t name); int jas_iccprof_setattr(jas_iccprof_t *prof, jas_iccattrname_t name, jas_iccattrval_t *val); void jas_iccprof_dump(jas_iccprof_t *prof, FILE *out); jas_iccprof_t *jas_iccprof_copy(jas_iccprof_t *prof); int jas_iccprof_gethdr(jas_iccprof_t *prof, jas_icchdr_t *hdr); int jas_iccprof_sethdr(jas_iccprof_t *prof, jas_icchdr_t *hdr); void jas_iccattrval_destroy(jas_iccattrval_t *attrval); void jas_iccattrval_dump(jas_iccattrval_t *attrval, FILE *out); int jas_iccattrval_allowmodify(jas_iccattrval_t **attrval); jas_iccattrval_t *jas_iccattrval_clone(jas_iccattrval_t *attrval); jas_iccattrval_t *jas_iccattrval_create(jas_iccuint32_t type); void jas_iccattrtab_dump(jas_iccattrtab_t *attrtab, FILE *out); extern uchar jas_iccprofdata_srgb[]; extern int jas_iccprofdata_srgblen; extern uchar jas_iccprofdata_sgray[]; extern int jas_iccprofdata_sgraylen; jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len); jas_iccprof_t *jas_iccprof_createfromclrspc(int clrspc); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_math.h0000644000175000017500000001040110554235550021544 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Math-Related Code * * $Id$ */ #ifndef JAS_MATH_H #define JAS_MATH_H /******************************************************************************\ * Includes \******************************************************************************/ #include #include #include #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Macros \******************************************************************************/ /* Compute the absolute value. */ #define JAS_ABS(x) \ (((x) >= 0) ? (x) : (-(x))) /* Compute the minimum of two values. */ #define JAS_MIN(x, y) \ (((x) < (y)) ? (x) : (y)) /* Compute the maximum of two values. */ #define JAS_MAX(x, y) \ (((x) > (y)) ? (x) : (y)) /* Compute the remainder from division (where division is defined such that the remainder is always nonnegative). */ #define JAS_MOD(x, y) \ (((x) < 0) ? (((-x) % (y)) ? ((y) - ((-(x)) % (y))) : (0)) : ((x) % (y))) /* Compute the integer with the specified number of least significant bits set to one. */ #define JAS_ONES(n) \ ((1 << (n)) - 1) #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_image.h0000644000175000017500000004425210554235550021710 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Image Class * * $Id$ */ #ifndef JAS_IMAGE_H #define JAS_IMAGE_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants. \******************************************************************************/ /* * Miscellaneous constants. */ /* The threshold at which image data is no longer stored in memory. */ #define JAS_IMAGE_INMEMTHRESH (16 * 1024 * 1024) /* * Component types */ #define JAS_IMAGE_CT_UNKNOWN 0x10000 #define JAS_IMAGE_CT_COLOR(n) ((n) & 0x7fff) #define JAS_IMAGE_CT_OPACITY 0x08000 #define JAS_IMAGE_CT_RGB_R 0 #define JAS_IMAGE_CT_RGB_G 1 #define JAS_IMAGE_CT_RGB_B 2 #define JAS_IMAGE_CT_YCBCR_Y 0 #define JAS_IMAGE_CT_YCBCR_CB 1 #define JAS_IMAGE_CT_YCBCR_CR 2 #define JAS_IMAGE_CT_GRAY_Y 0 /******************************************************************************\ * Simple types. \******************************************************************************/ /* Image coordinate. */ typedef int_fast32_t jas_image_coord_t; /* Color space (e.g., RGB, YCbCr). */ typedef int_fast16_t jas_image_colorspc_t; /* Component type (e.g., color, opacity). */ typedef int_fast32_t jas_image_cmpttype_t; /* Component sample data format (e.g., real/integer, signedness, precision). */ typedef int_fast16_t jas_image_smpltype_t; /******************************************************************************\ * Image class and supporting classes. \******************************************************************************/ /* Image component class. */ typedef struct { jas_image_coord_t tlx_; /* The x-coordinate of the top-left corner of the component. */ jas_image_coord_t tly_; /* The y-coordinate of the top-left corner of the component. */ jas_image_coord_t hstep_; /* The horizontal sampling period in units of the reference grid. */ jas_image_coord_t vstep_; /* The vertical sampling period in units of the reference grid. */ jas_image_coord_t width_; /* The component width in samples. */ jas_image_coord_t height_; /* The component height in samples. */ #ifdef FIX_ME int smpltype_; #else int prec_; /* The precision of the sample data (i.e., the number of bits per sample). If the samples are signed values, this quantity includes the sign bit. */ int sgnd_; /* The signedness of the sample data. */ #endif jas_stream_t *stream_; /* The stream containing the component data. */ int cps_; /* The number of characters per sample in the stream. */ jas_image_cmpttype_t type_; /* The type of component (e.g., opacity, red, green, blue, luma). */ } jas_image_cmpt_t; /* Image class. */ typedef struct { jas_image_coord_t tlx_; /* The x-coordinate of the top-left corner of the image bounding box. */ jas_image_coord_t tly_; /* The y-coordinate of the top-left corner of the image bounding box. */ jas_image_coord_t brx_; /* The x-coordinate of the bottom-right corner of the image bounding box (plus one). */ jas_image_coord_t bry_; /* The y-coordinate of the bottom-right corner of the image bounding box (plus one). */ int numcmpts_; /* The number of components. */ int maxcmpts_; /* The maximum number of components that this image can have (i.e., the allocated size of the components array). */ jas_image_cmpt_t **cmpts_; /* Per-component information. */ jas_clrspc_t clrspc_; jas_cmprof_t *cmprof_; bool inmem_; } jas_image_t; /* Component parameters class. */ /* This data type exists solely/mainly for the purposes of the jas_image_create function. */ typedef struct { jas_image_coord_t tlx; /* The x-coordinate of the top-left corner of the component. */ jas_image_coord_t tly; /* The y-coordinate of the top-left corner of the component. */ jas_image_coord_t hstep; /* The horizontal sampling period in units of the reference grid. */ jas_image_coord_t vstep; /* The vertical sampling period in units of the reference grid. */ jas_image_coord_t width; /* The width of the component in samples. */ jas_image_coord_t height; /* The height of the component in samples. */ #ifdef FIX_ME int smpltype; #else int prec; /* The precision of the component sample data. */ int sgnd; /* The signedness of the component sample data. */ #endif } jas_image_cmptparm_t; /******************************************************************************\ * File format related classes. \******************************************************************************/ #define JAS_IMAGE_MAXFMTS 32 /* The maximum number of image data formats supported. */ /* Image format-dependent operations. */ typedef struct { jas_image_t *(*decode)(jas_stream_t *in, char *opts); /* Decode image data from a stream. */ int (*encode)(jas_image_t *image, jas_stream_t *out, char *opts); /* Encode image data to a stream. */ int (*validate)(jas_stream_t *in); /* Determine if stream data is in a particular format. */ } jas_image_fmtops_t; /* Image format information. */ typedef struct { int id; /* The ID for this format. */ char *name; /* The name by which this format is identified. */ char *ext; /* The file name extension associated with this format. */ char *desc; /* A brief description of the format. */ jas_image_fmtops_t ops; /* The operations for this format. */ } jas_image_fmtinfo_t; /******************************************************************************\ * Image operations. \******************************************************************************/ /* Create an image. */ jas_image_t *jas_image_create(int numcmpts, jas_image_cmptparm_t *cmptparms, jas_clrspc_t clrspc); /* Create an "empty" image. */ jas_image_t *jas_image_create0(void); /* Clone an image. */ jas_image_t *jas_image_copy(jas_image_t *image); /* Deallocate any resources associated with an image. */ void jas_image_destroy(jas_image_t *image); /* Get the width of the image in units of the image reference grid. */ #define jas_image_width(image) \ ((image)->brx_ - (image)->tlx_) /* Get the height of the image in units of the image reference grid. */ #define jas_image_height(image) \ ((image)->bry_ - (image)->tly_) /* Get the x-coordinate of the top-left corner of the image bounding box on the reference grid. */ #define jas_image_tlx(image) \ ((image)->tlx_) /* Get the y-coordinate of the top-left corner of the image bounding box on the reference grid. */ #define jas_image_tly(image) \ ((image)->tly_) /* Get the x-coordinate of the bottom-right corner of the image bounding box on the reference grid (plus one). */ #define jas_image_brx(image) \ ((image)->brx_) /* Get the y-coordinate of the bottom-right corner of the image bounding box on the reference grid (plus one). */ #define jas_image_bry(image) \ ((image)->bry_) /* Get the number of image components. */ #define jas_image_numcmpts(image) \ ((image)->numcmpts_) /* Get the color model used by the image. */ #define jas_image_clrspc(image) \ ((image)->clrspc_) /* Set the color model for an image. */ #define jas_image_setclrspc(image, clrspc) \ ((image)->clrspc_ = (clrspc)) #define jas_image_cmpttype(image, cmptno) \ ((image)->cmpts_[(cmptno)]->type_) #define jas_image_setcmpttype(image, cmptno, type) \ ((image)->cmpts_[(cmptno)]->type_ = (type)) /* Get the width of a component. */ #define jas_image_cmptwidth(image, cmptno) \ ((image)->cmpts_[cmptno]->width_) /* Get the height of a component. */ #define jas_image_cmptheight(image, cmptno) \ ((image)->cmpts_[cmptno]->height_) /* Get the signedness of the sample data for a component. */ #define jas_image_cmptsgnd(image, cmptno) \ ((image)->cmpts_[cmptno]->sgnd_) /* Get the precision of the sample data for a component. */ #define jas_image_cmptprec(image, cmptno) \ ((image)->cmpts_[cmptno]->prec_) /* Get the horizontal subsampling factor for a component. */ #define jas_image_cmpthstep(image, cmptno) \ ((image)->cmpts_[cmptno]->hstep_) /* Get the vertical subsampling factor for a component. */ #define jas_image_cmptvstep(image, cmptno) \ ((image)->cmpts_[cmptno]->vstep_) /* Get the x-coordinate of the top-left corner of a component. */ #define jas_image_cmpttlx(image, cmptno) \ ((image)->cmpts_[cmptno]->tlx_) /* Get the y-coordinate of the top-left corner of a component. */ #define jas_image_cmpttly(image, cmptno) \ ((image)->cmpts_[cmptno]->tly_) /* Get the x-coordinate of the bottom-right corner of a component (plus "one"). */ #define jas_image_cmptbrx(image, cmptno) \ ((image)->cmpts_[cmptno]->tlx_ + (image)->cmpts_[cmptno]->width_ * \ (image)->cmpts_[cmptno]->hstep_) /* Get the y-coordinate of the bottom-right corner of a component (plus "one"). */ #define jas_image_cmptbry(image, cmptno) \ ((image)->cmpts_[cmptno]->tly_ + (image)->cmpts_[cmptno]->height_ * \ (image)->cmpts_[cmptno]->vstep_) /* Get the raw size of an image (i.e., the nominal size of the image without any compression. */ uint_fast32_t jas_image_rawsize(jas_image_t *image); /* Create an image from a stream in some specified format. */ jas_image_t *jas_image_decode(jas_stream_t *in, int fmt, char *optstr); /* Write an image to a stream in a specified format. */ int jas_image_encode(jas_image_t *image, jas_stream_t *out, int fmt, char *optstr); /* Read a rectangular region of an image component. */ /* The position and size of the rectangular region to be read is specified relative to the component's coordinate system. */ int jas_image_readcmpt(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, jas_matrix_t *data); /* Write a rectangular region of an image component. */ int jas_image_writecmpt(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, jas_matrix_t *data); /* Delete a component from an image. */ void jas_image_delcmpt(jas_image_t *image, int cmptno); /* Add a component to an image. */ int jas_image_addcmpt(jas_image_t *image, int cmptno, jas_image_cmptparm_t *cmptparm); /* Copy a component from one image to another. */ int jas_image_copycmpt(jas_image_t *dstimage, int dstcmptno, jas_image_t *srcimage, int srccmptno); #define JAS_IMAGE_CDT_GETSGND(dtype) (((dtype) >> 7) & 1) #define JAS_IMAGE_CDT_SETSGND(dtype) (((dtype) & 1) << 7) #define JAS_IMAGE_CDT_GETPREC(dtype) ((dtype) & 0x7f) #define JAS_IMAGE_CDT_SETPREC(dtype) ((dtype) & 0x7f) #define jas_image_cmptdtype(image, cmptno) \ (JAS_IMAGE_CDT_SETSGND((image)->cmpts_[cmptno]->sgnd_) | JAS_IMAGE_CDT_SETPREC((image)->cmpts_[cmptno]->prec_)) int jas_image_depalettize(jas_image_t *image, int cmptno, int numlutents, int_fast32_t *lutents, int dtype, int newcmptno); int jas_image_readcmptsample(jas_image_t *image, int cmptno, int x, int y); void jas_image_writecmptsample(jas_image_t *image, int cmptno, int x, int y, int_fast32_t v); int jas_image_getcmptbytype(jas_image_t *image, int ctype); /******************************************************************************\ * Image format-related operations. \******************************************************************************/ /* Clear the table of image formats. */ void jas_image_clearfmts(void); /* Add entry to table of image formats. */ int jas_image_addfmt(int id, char *name, char *ext, char *desc, jas_image_fmtops_t *ops); /* Get the ID for the image format with the specified name. */ int jas_image_strtofmt(char *s); /* Get the name of the image format with the specified ID. */ char *jas_image_fmttostr(int fmt); /* Lookup image format information by the format ID. */ jas_image_fmtinfo_t *jas_image_lookupfmtbyid(int id); /* Lookup image format information by the format name. */ jas_image_fmtinfo_t *jas_image_lookupfmtbyname(const char *name); /* Guess the format of an image file based on its name. */ int jas_image_fmtfromname(char *filename); /* Get the format of image data in a stream. */ int jas_image_getfmt(jas_stream_t *in); #define jas_image_cmprof(image) ((image)->cmprof_) int jas_image_ishomosamp(jas_image_t *image); int jas_image_sampcmpt(jas_image_t *image, int cmptno, int newcmptno, jas_image_coord_t ho, jas_image_coord_t vo, jas_image_coord_t hs, jas_image_coord_t vs, int sgnd, int prec); int jas_image_writecmpt2(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, long *buf); int jas_image_readcmpt2(jas_image_t *image, int cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, long *buf); #define jas_image_setcmprof(image, cmprof) ((image)->cmprof_ = cmprof) jas_image_t *jas_image_chclrspc(jas_image_t *image, jas_cmprof_t *outprof, int intent); void jas_image_dump(jas_image_t *image, FILE *out); /******************************************************************************\ * Image format-dependent operations. \******************************************************************************/ #if !defined(EXCLUDE_JPG_SUPPORT) /* Format-dependent operations for JPG support. */ jas_image_t *jpg_decode(jas_stream_t *in, char *optstr); int jpg_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int jpg_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_MIF_SUPPORT) /* Format-dependent operations for MIF support. */ jas_image_t *mif_decode(jas_stream_t *in, char *optstr); int mif_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int mif_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_PNM_SUPPORT) /* Format-dependent operations for PNM support. */ jas_image_t *pnm_decode(jas_stream_t *in, char *optstr); int pnm_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int pnm_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_RAS_SUPPORT) /* Format-dependent operations for Sun Rasterfile support. */ jas_image_t *ras_decode(jas_stream_t *in, char *optstr); int ras_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int ras_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_BMP_SUPPORT) /* Format-dependent operations for BMP support. */ jas_image_t *bmp_decode(jas_stream_t *in, char *optstr); int bmp_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int bmp_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_JP2_SUPPORT) /* Format-dependent operations for JP2 support. */ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr); int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int jp2_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_JPC_SUPPORT) /* Format-dependent operations for JPEG-2000 code stream support. */ jas_image_t *jpc_decode(jas_stream_t *in, char *optstr); int jpc_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int jpc_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_PGX_SUPPORT) /* Format-dependent operations for PGX support. */ jas_image_t *pgx_decode(jas_stream_t *in, char *optstr); int pgx_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int pgx_validate(jas_stream_t *in); #endif #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_seq.h0000644000175000017500000002371110554235550021413 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Sequence/Matrix Library * * $Id$ */ #ifndef JAS_SEQ_H #define JAS_SEQ_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants. \******************************************************************************/ /* This matrix is a reference to another matrix. */ #define JAS_MATRIX_REF 0x0001 /******************************************************************************\ * Types. \******************************************************************************/ /* An element in a sequence. */ typedef int_fast32_t jas_seqent_t; /* An element in a matrix. */ typedef int_fast32_t jas_matent_t; /* Matrix. */ typedef struct { /* Additional state information. */ int flags_; /* The starting horizontal index. */ int_fast32_t xstart_; /* The starting vertical index. */ int_fast32_t ystart_; /* The ending horizontal index. */ int_fast32_t xend_; /* The ending vertical index. */ int_fast32_t yend_; /* The number of rows in the matrix. */ int_fast32_t numrows_; /* The number of columns in the matrix. */ int_fast32_t numcols_; /* Pointers to the start of each row. */ jas_seqent_t **rows_; /* The allocated size of the rows array. */ int_fast32_t maxrows_; /* The matrix data buffer. */ jas_seqent_t *data_; /* The allocated size of the data array. */ int_fast32_t datasize_; } jas_matrix_t; typedef jas_matrix_t jas_seq2d_t; typedef jas_matrix_t jas_seq_t; /******************************************************************************\ * Functions/macros for matrix class. \******************************************************************************/ /* Get the number of rows. */ #define jas_matrix_numrows(matrix) \ ((matrix)->numrows_) /* Get the number of columns. */ #define jas_matrix_numcols(matrix) \ ((matrix)->numcols_) /* Get a matrix element. */ #define jas_matrix_get(matrix, i, j) \ ((matrix)->rows_[i][j]) /* Set a matrix element. */ #define jas_matrix_set(matrix, i, j, v) \ ((matrix)->rows_[i][j] = (v)) /* Get an element from a matrix that is known to be a row or column vector. */ #define jas_matrix_getv(matrix, i) \ (((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i]) : \ ((matrix)->rows_[i][0])) /* Set an element in a matrix that is known to be a row or column vector. */ #define jas_matrix_setv(matrix, i, v) \ (((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i] = (v)) : \ ((matrix)->rows_[i][0] = (v))) /* Get the address of an element in a matrix. */ #define jas_matrix_getref(matrix, i, j) \ (&(matrix)->rows_[i][j]) #define jas_matrix_getvref(matrix, i) \ (((matrix)->numrows_ > 1) ? jas_matrix_getref(matrix, i, 0) : jas_matrix_getref(matrix, 0, i)) #define jas_matrix_length(matrix) \ (max((matrix)->numrows_, (matrix)->numcols_)) /* Create a matrix with the specified dimensions. */ jas_matrix_t *jas_matrix_create(int numrows, int numcols); /* Destroy a matrix. */ void jas_matrix_destroy(jas_matrix_t *matrix); /* Resize a matrix. The previous contents of the matrix are lost. */ int jas_matrix_resize(jas_matrix_t *matrix, int numrows, int numcols); int jas_matrix_output(jas_matrix_t *matrix, FILE *out); /* Create a matrix that references part of another matrix. */ void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0, int r1, int c1); /* Create a matrix that is a reference to a row of another matrix. */ #define jas_matrix_bindrow(mat0, mat1, r) \ (jas_matrix_bindsub((mat0), (mat1), (r), 0, (r), (mat1)->numcols_ - 1)) /* Create a matrix that is a reference to a column of another matrix. */ #define jas_matrix_bindcol(mat0, mat1, c) \ (jas_matrix_bindsub((mat0), (mat1), 0, (c), (mat1)->numrows_ - 1, (c))) /* Clip the values of matrix elements to the specified range. */ void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval, jas_seqent_t maxval); /* Arithmetic shift left of all elements in a matrix. */ void jas_matrix_asl(jas_matrix_t *matrix, int n); /* Arithmetic shift right of all elements in a matrix. */ void jas_matrix_asr(jas_matrix_t *matrix, int n); /* Almost-but-not-quite arithmetic shift right of all elements in a matrix. */ void jas_matrix_divpow2(jas_matrix_t *matrix, int n); /* Set all elements of a matrix to the specified value. */ void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val); /* The spacing between rows of a matrix. */ #define jas_matrix_rowstep(matrix) \ (((matrix)->numrows_ > 1) ? ((matrix)->rows_[1] - (matrix)->rows_[0]) : (0)) /* The spacing between columns of a matrix. */ #define jas_matrix_step(matrix) \ (((matrix)->numrows_ > 1) ? (jas_matrix_rowstep(matrix)) : (1)) /* Compare two matrices for equality. */ int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1); jas_matrix_t *jas_matrix_copy(jas_matrix_t *x); jas_matrix_t *jas_matrix_input(FILE *); /******************************************************************************\ * Functions/macros for 2-D sequence class. \******************************************************************************/ jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x); jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend); #define jas_seq2d_destroy(s) \ jas_matrix_destroy(s) #define jas_seq2d_xstart(s) \ ((s)->xstart_) #define jas_seq2d_ystart(s) \ ((s)->ystart_) #define jas_seq2d_xend(s) \ ((s)->xend_) #define jas_seq2d_yend(s) \ ((s)->yend_) #define jas_seq2d_getref(s, x, y) \ (jas_matrix_getref(s, (y) - (s)->ystart_, (x) - (s)->xstart_)) #define jas_seq2d_get(s, x, y) \ (jas_matrix_get(s, (y) - (s)->ystart_, (x) - (s)->xstart_)) #define jas_seq2d_rowstep(s) \ jas_matrix_rowstep(s) #define jas_seq2d_width(s) \ ((s)->xend_ - (s)->xstart_) #define jas_seq2d_height(s) \ ((s)->yend_ - (s)->ystart_) #define jas_seq2d_setshift(s, x, y) \ ((s)->xstart_ = (x), (s)->ystart_ = (y), \ (s)->xend_ = (s)->xstart_ + (s)->numcols_, \ (s)->yend_ = (s)->ystart_ + (s)->numrows_) void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart, int ystart, int xend, int yend); /******************************************************************************\ * Functions/macros for 1-D sequence class. \******************************************************************************/ #define jas_seq_create(start, end) \ (jas_seq2d_create(start, 0, end, 1)) #define jas_seq_destroy(seq) \ (jas_seq2d_destroy(seq)) #define jas_seq_set(seq, i, v) \ ((seq)->rows_[0][(i) - (seq)->xstart_] = (v)) #define jas_seq_getref(seq, i) \ (&(seq)->rows_[0][(i) - (seq)->xstart_]) #define jas_seq_get(seq, i) \ ((seq)->rows_[0][(i) - (seq)->xstart_]) #define jas_seq_start(seq) \ ((seq)->xstart_) #define jas_seq_end(seq) \ ((seq)->xend_) #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jasper.h0000644000175000017500000000716110554235550021253 0ustar ernieernie/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_JASPER_H #define JAS_JASPER_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_types.h0000644000175000017500000001502410554235550021765 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Primitive Types * * $Id$ */ #ifndef JAS_TYPES_H #define JAS_TYPES_H #include #if !defined(JAS_CONFIGURE) #if defined(WIN32) || defined(HAVE_WINDOWS_H) /* We are dealing with Microsoft Windows and most likely Microsoft Visual C (MSVC). (Heaven help us.) Sadly, MSVC does not correctly define some of the standard types specified in ISO/IEC 9899:1999. In particular, it does not define the "long long" and "unsigned long long" types. So, we work around this problem by using the "INT64" and "UINT64" types that are defined in the header file "windows.h". */ #include #undef longlong #define longlong INT64 #undef ulonglong #define ulonglong UINT64 #endif #endif #if defined(HAVE_STDLIB_H) #undef false #undef true #include #endif #if defined(HAVE_STDDEF_H) #include #endif #if defined(HAVE_SYS_TYPES_H) #include #endif #ifndef __cplusplus #if defined(HAVE_STDBOOL_H) /* * The C language implementation does correctly provide the standard header * file "stdbool.h". */ #include #else /* * The C language implementation does not provide the standard header file * "stdbool.h" as required by ISO/IEC 9899:1999. Try to compensate for this * braindamage below. */ #if !defined(bool) #define bool int #endif #if !defined(true) #define true 1 #endif #if !defined(false) #define false 0 #endif #endif #endif #if defined(HAVE_STDINT_H) /* * The C language implementation does correctly provide the standard header * file "stdint.h". */ #include #else /* * The C language implementation does not provide the standard header file * "stdint.h" as required by ISO/IEC 9899:1999. Try to compensate for this * braindamage below. */ #include /**********/ #if !defined(INT_FAST8_MIN) typedef signed char int_fast8_t; #define INT_FAST8_MIN (-127) #define INT_FAST8_MAX 128 #endif /**********/ #if !defined(UINT_FAST8_MAX) typedef unsigned char uint_fast8_t; #define UINT_FAST8_MAX 255 #endif /**********/ #if !defined(INT_FAST16_MIN) typedef short int_fast16_t; #define INT_FAST16_MIN SHRT_MIN #define INT_FAST16_MAX SHRT_MAX #endif /**********/ #if !defined(UINT_FAST16_MAX) typedef unsigned short uint_fast16_t; #define UINT_FAST16_MAX USHRT_MAX #endif /**********/ #if !defined(INT_FAST32_MIN) typedef int int_fast32_t; #define INT_FAST32_MIN INT_MIN #define INT_FAST32_MAX INT_MAX #endif /**********/ #if !defined(UINT_FAST32_MAX) typedef unsigned int uint_fast32_t; #define UINT_FAST32_MAX UINT_MAX #endif /**********/ #if !defined(INT_FAST64_MIN) typedef longlong int_fast64_t; #define INT_FAST64_MIN LLONG_MIN #define INT_FAST64_MAX LLONG_MAX #endif /**********/ #if !defined(UINT_FAST64_MAX) typedef ulonglong uint_fast64_t; #define UINT_FAST64_MAX ULLONG_MAX #endif /**********/ #endif /* Hopefully, these macro definitions will fix more problems than they cause. */ #if !defined(uchar) #define uchar unsigned char #endif #if !defined(ushort) #define ushort unsigned short #endif #if !defined(uint) #define uint unsigned int #endif #if !defined(ulong) #define ulong unsigned long #endif #if !defined(longlong) #define longlong long long #endif #if !defined(ulonglong) #define ulonglong unsigned long long #endif /* The below macro is intended to be used for type casts. By using this macro, type casts can be easily located in the source code with tools like "grep". */ #define JAS_CAST(t, e) \ ((t) (e)) #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_getopt.h0000644000175000017500000001102210554235550022115 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Command Line Option Parsing Code * * $Id$ */ #ifndef JAS_GETOPT_H #define JAS_GETOPT_H #ifdef __cplusplus extern "C" { #endif #include /******************************************************************************\ * Constants. \******************************************************************************/ #define JAS_GETOPT_EOF (-1) #define JAS_GETOPT_ERR '?' /* option flags. */ #define JAS_OPT_HASARG 0x01 /* option has argument */ /******************************************************************************\ * Types. \******************************************************************************/ /* Command line option type. */ typedef struct { int id; /* The unique identifier for this option. */ char *name; /* The name of this option. */ int flags; /* option flags. */ } jas_opt_t; /******************************************************************************\ * External data. \******************************************************************************/ /* The current option index. */ extern int jas_optind; /* The current option argument. */ extern char *jas_optarg; /* The debug level. */ extern int jas_opterr; /******************************************************************************\ * Prototypes. \******************************************************************************/ /* Get the next option. */ int jas_getopt(int argc, char **argv, jas_opt_t *opts); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_stream.h0000644000175000017500000003475110554235550022124 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * I/O Stream Class * * $Id$ */ #ifndef JAS_STREAM_H #define JAS_STREAM_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #if defined(HAVE_FCNTL_H) #include #endif #include #if defined(HAVE_UNISTD_H) #include #endif #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants. \******************************************************************************/ /* On most UNIX systems, we probably need to define O_BINARY ourselves. */ #ifndef O_BINARY #define O_BINARY 0 #endif /* * Stream open flags. */ /* The stream was opened for reading. */ #define JAS_STREAM_READ 0x0001 /* The stream was opened for writing. */ #define JAS_STREAM_WRITE 0x0002 /* The stream was opened for appending. */ #define JAS_STREAM_APPEND 0x0004 /* The stream was opened in binary mode. */ #define JAS_STREAM_BINARY 0x0008 /* The stream should be created/truncated. */ #define JAS_STREAM_CREATE 0x0010 /* * Stream buffering flags. */ /* The stream is unbuffered. */ #define JAS_STREAM_UNBUF 0x0000 /* The stream is line buffered. */ #define JAS_STREAM_LINEBUF 0x0001 /* The stream is fully buffered. */ #define JAS_STREAM_FULLBUF 0x0002 /* The buffering mode mask. */ #define JAS_STREAM_BUFMODEMASK 0x000f /* The memory associated with the buffer needs to be deallocated when the stream is destroyed. */ #define JAS_STREAM_FREEBUF 0x0008 /* The buffer is currently being used for reading. */ #define JAS_STREAM_RDBUF 0x0010 /* The buffer is currently being used for writing. */ #define JAS_STREAM_WRBUF 0x0020 /* * Stream error flags. */ /* The end-of-file has been encountered (on reading). */ #define JAS_STREAM_EOF 0x0001 /* An I/O error has been encountered on the stream. */ #define JAS_STREAM_ERR 0x0002 /* The read/write limit has been exceeded. */ #define JAS_STREAM_RWLIMIT 0x0004 /* The error mask. */ #define JAS_STREAM_ERRMASK \ (JAS_STREAM_EOF | JAS_STREAM_ERR | JAS_STREAM_RWLIMIT) /* * Other miscellaneous constants. */ /* The default buffer size (for fully-buffered operation). */ #define JAS_STREAM_BUFSIZE 8192 /* The default permission mask for file creation. */ #define JAS_STREAM_PERMS 0666 /* The maximum number of characters that can always be put back on a stream. */ #define JAS_STREAM_MAXPUTBACK 16 /******************************************************************************\ * Types. \******************************************************************************/ /* * Generic file object. */ typedef void jas_stream_obj_t; /* * Generic file object operations. */ typedef struct { /* Read characters from a file object. */ int (*read_)(jas_stream_obj_t *obj, char *buf, int cnt); /* Write characters to a file object. */ int (*write_)(jas_stream_obj_t *obj, char *buf, int cnt); /* Set the position for a file object. */ long (*seek_)(jas_stream_obj_t *obj, long offset, int origin); /* Close a file object. */ int (*close_)(jas_stream_obj_t *obj); } jas_stream_ops_t; /* * Stream object. */ typedef struct { /* The mode in which the stream was opened. */ int openmode_; /* The buffering mode. */ int bufmode_; /* The stream status. */ int flags_; /* The start of the buffer area to use for reading/writing. */ uchar *bufbase_; /* The start of the buffer area excluding the extra initial space for character putback. */ uchar *bufstart_; /* The buffer size. */ int bufsize_; /* The current position in the buffer. */ uchar *ptr_; /* The number of characters that must be read/written before the buffer needs to be filled/flushed. */ int cnt_; /* A trivial buffer to be used for unbuffered operation. */ uchar tinybuf_[JAS_STREAM_MAXPUTBACK + 1]; /* The operations for the underlying stream file object. */ jas_stream_ops_t *ops_; /* The underlying stream file object. */ jas_stream_obj_t *obj_; /* The number of characters read/written. */ long rwcnt_; /* The maximum number of characters that may be read/written. */ long rwlimit_; } jas_stream_t; /* * Regular file object. */ /* * File descriptor file object. */ typedef struct { int fd; int flags; char pathname[L_tmpnam + 1]; } jas_stream_fileobj_t; #define JAS_STREAM_FILEOBJ_DELONCLOSE 0x01 #define JAS_STREAM_FILEOBJ_NOCLOSE 0x02 /* * Memory file object. */ typedef struct { /* The data associated with this file. */ uchar *buf_; /* The allocated size of the buffer for holding file data. */ int bufsize_; /* The length of the file. */ int_fast32_t len_; /* The seek position. */ int_fast32_t pos_; /* Is the buffer growable? */ int growable_; /* Was the buffer allocated internally? */ int myalloc_; } jas_stream_memobj_t; /******************************************************************************\ * Macros/functions for opening and closing streams. \******************************************************************************/ /* Open a file as a stream. */ jas_stream_t *jas_stream_fopen(const char *filename, const char *mode); /* Open a memory buffer as a stream. */ jas_stream_t *jas_stream_memopen(char *buf, int bufsize); /* Open a file descriptor as a stream. */ jas_stream_t *jas_stream_fdopen(int fd, const char *mode); /* Open a stdio stream as a stream. */ jas_stream_t *jas_stream_freopen(const char *path, const char *mode, FILE *fp); /* Open a temporary file as a stream. */ jas_stream_t *jas_stream_tmpfile(void); /* Close a stream. */ int jas_stream_close(jas_stream_t *stream); /******************************************************************************\ * Macros/functions for getting/setting the stream state. \******************************************************************************/ /* Get the EOF indicator for a stream. */ #define jas_stream_eof(stream) \ (((stream)->flags_ & JAS_STREAM_EOF) != 0) /* Get the error indicator for a stream. */ #define jas_stream_error(stream) \ (((stream)->flags_ & JAS_STREAM_ERR) != 0) /* Clear the error indicator for a stream. */ #define jas_stream_clearerr(stream) \ ((stream)->flags_ &= ~(JAS_STREAM_ERR | JAS_STREAM_EOF)) /* Get the read/write limit for a stream. */ #define jas_stream_getrwlimit(stream) \ (((const jas_stream_t *)(stream))->rwlimit_) /* Set the read/write limit for a stream. */ int jas_stream_setrwlimit(jas_stream_t *stream, long rwlimit); /* Get the read/write count for a stream. */ #define jas_stream_getrwcount(stream) \ (((const jas_stream_t *)(stream))->rwcnt_) /* Set the read/write count for a stream. */ long jas_stream_setrwcount(jas_stream_t *stream, long rwcnt); /******************************************************************************\ * Macros/functions for I/O. \******************************************************************************/ /* Read a character from a stream. */ #if defined(DEBUG) #define jas_stream_getc(stream) jas_stream_getc_func(stream) #else #define jas_stream_getc(stream) jas_stream_getc_macro(stream) #endif /* Write a character to a stream. */ #if defined(DEBUG) #define jas_stream_putc(stream, c) jas_stream_putc_func(stream, c) #else #define jas_stream_putc(stream, c) jas_stream_putc_macro(stream, c) #endif /* Read characters from a stream into a buffer. */ int jas_stream_read(jas_stream_t *stream, void *buf, int cnt); /* Write characters from a buffer to a stream. */ int jas_stream_write(jas_stream_t *stream, const void *buf, int cnt); /* Write formatted output to a stream. */ int jas_stream_printf(jas_stream_t *stream, const char *fmt, ...); /* Write a string to a stream. */ int jas_stream_puts(jas_stream_t *stream, const char *s); /* Read a line of input from a stream. */ char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize); /* Look at the next character to be read from a stream without actually removing it from the stream. */ #define jas_stream_peekc(stream) \ (((stream)->cnt_ <= 0) ? jas_stream_fillbuf(stream, 0) : \ ((int)(*(stream)->ptr_))) /* Put a character back on a stream. */ int jas_stream_ungetc(jas_stream_t *stream, int c); /******************************************************************************\ * Macros/functions for getting/setting the stream position. \******************************************************************************/ /* Is it possible to seek on this stream? */ int jas_stream_isseekable(jas_stream_t *stream); /* Set the current position within the stream. */ long jas_stream_seek(jas_stream_t *stream, long offset, int origin); /* Get the current position within the stream. */ long jas_stream_tell(jas_stream_t *stream); /* Seek to the beginning of a stream. */ int jas_stream_rewind(jas_stream_t *stream); /******************************************************************************\ * Macros/functions for flushing. \******************************************************************************/ /* Flush any pending output to a stream. */ int jas_stream_flush(jas_stream_t *stream); /******************************************************************************\ * Miscellaneous macros/functions. \******************************************************************************/ /* Copy data from one stream to another. */ int jas_stream_copy(jas_stream_t *dst, jas_stream_t *src, int n); /* Display stream contents (for debugging purposes). */ int jas_stream_display(jas_stream_t *stream, FILE *fp, int n); /* Consume (i.e., discard) characters from stream. */ int jas_stream_gobble(jas_stream_t *stream, int n); /* Write a character multiple times to a stream. */ int jas_stream_pad(jas_stream_t *stream, int n, int c); /* Get the size of the file associated with the specified stream. The specified stream must be seekable. */ long jas_stream_length(jas_stream_t *stream); /******************************************************************************\ * Internal functions. \******************************************************************************/ /* The following functions are for internal use only! If you call them directly, you will die a horrible, miserable, and painful death! */ /* Read a character from a stream. */ #define jas_stream_getc_macro(stream) \ ((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \ JAS_STREAM_RWLIMIT))) ? \ (((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \ (stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \ jas_stream_getc2(stream)) : EOF) #define jas_stream_getc2(stream) \ ((--(stream)->cnt_ < 0) ? jas_stream_fillbuf(stream, 1) : \ (++(stream)->rwcnt_, (int)(*(stream)->ptr_++))) /* Write a character to a stream. */ #define jas_stream_putc_macro(stream, c) \ ((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \ JAS_STREAM_RWLIMIT))) ? \ (((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \ (stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \ jas_stream_putc2(stream, c)) : EOF) #define jas_stream_putc2(stream, c) \ (((stream)->bufmode_ |= JAS_STREAM_WRBUF, --(stream)->cnt_ < 0) ? \ jas_stream_flushbuf((stream), (uchar)(c)) : \ (++(stream)->rwcnt_, (int)(*(stream)->ptr_++ = (c)))) /* These prototypes need to be here for the sake of the stream_getc and stream_putc macros. */ int jas_stream_fillbuf(jas_stream_t *stream, int getflag); int jas_stream_flushbuf(jas_stream_t *stream, int c); int jas_stream_getc_func(jas_stream_t *stream); int jas_stream_putc_func(jas_stream_t *stream, int c); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/jas_string.h0000644000175000017500000000726310554235550022135 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * String Library * * $Id$ */ #ifndef JAS_STRING_H #define JAS_STRING_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Functions. \******************************************************************************/ /* Copy a string (a la strdup). */ char *jas_strdup(const char *); #ifdef __cplusplus } #endif #endif jasper-1.900.1/src/libjasper/include/jasper/Makefile.am0000644000175000017500000000637610554235550021661 0ustar ernieernie# Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ libjasperincludedir = $(includedir)/jasper libjasperinclude_HEADERS = \ jasper.h \ jas_config.h \ jas_config2.h \ jas_cm.h \ jas_fix.h \ jas_debug.h \ jas_getopt.h \ jas_icc.h \ jas_image.h \ jas_init.h \ jas_malloc.h \ jas_math.h \ jas_seq.h \ jas_stream.h \ jas_string.h \ jas_tmr.h \ jas_tvp.h \ jas_types.h \ jas_version.h jasper-1.900.1/src/libjasper/include/jasper/jas_config.h0000644000175000017500000001121710554237063022067 0ustar ernieernie/* src/libjasper/include/jasper/jas_config.h. Generated by configure. */ /* src/libjasper/include/jasper/jas_config.h.in. Generated from configure.ac by autoheader. */ /* Avoid problems due to multiple inclusion. */ #ifndef JAS_CONFIG_H #define JAS_CONFIG_H /* This preprocessor symbol identifies the version of JasPer. */ #define JAS_VERSION "1.900.1" /* If configure is being used, this symbol will be defined automatically at this point in the configuration header file. */ /* The preprocessor symbol JAS_WIN_MSVC_BUILD should not be defined unless the JasPer software is being built under Microsoft Windows using Microsoft Visual C. */ #if !defined(JAS_WIN_MSVC_BUILD) /* A configure-based build is being used. */ /* Extra debugging support */ /* #undef DEBUG */ /* Debugging memory allocator */ /* #undef DEBUG_MEMALLOC */ /* Debugging overflow detection */ /* #undef DEBUG_OVERFLOW */ /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `getrusage' function. */ #define HAVE_GETRUSAGE 1 /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_IO_H */ /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Have variable length arrays */ #define HAVE_VLA 1 /* Define to 1 if you have the `vprintf' function. */ #define HAVE_VPRINTF 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ /* JasPer configure */ #define JAS_CONFIGURE 1 /* JasPer version */ #define JAS_VERSION "1.900.1" /* Name of package */ #define PACKAGE "jasper" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "jasper" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "jasper 1.900.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "jasper" /* Define to the version of this package. */ #define PACKAGE_VERSION "1.900.1" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ #define VERSION "1.900.1" /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `long long' if does not define. */ #define longlong long long /* Define to `unsigned' if does not define. */ /* #undef size_t */ /* Define to `int' if does not define. */ /* #undef ssize_t */ /* Define to `unsigned char' if does not define. */ #define uchar unsigned char /* Define to `unsigned int' if does not define. */ /* #undef uint */ /* Define to `unsigned long' if does not define. */ /* #undef ulong */ /* Define to `unsigned long long' if does not define. */ #define ulonglong unsigned long long /* Define to `unsigned short' if does not define. */ /* #undef ushort */ #else /* A configure-based build is not being used. */ #include #endif #endif jasper-1.900.1/src/libjasper/include/Makefile.am0000644000175000017500000000566410554235550020374 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ SUBDIRS = jasper jasper-1.900.1/src/libjasper/mif/0000755000175000017500000000000010554237065015460 5ustar ernieerniejasper-1.900.1/src/libjasper/mif/Makefile.in0000644000175000017500000004056710554237046017540 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/mif DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmif_la_LIBADD = am_libmif_la_OBJECTS = mif_cod.lo libmif_la_OBJECTS = $(am_libmif_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libmif_la_SOURCES) DIST_SOURCES = $(libmif_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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 noinst_LTLIBRARIES = libmif.la libmif_la_SOURCES = \ mif_cod.h \ mif_cod.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/mif/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/mif/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmif.la: $(libmif_la_OBJECTS) $(libmif_la_DEPENDENCIES) $(LINK) $(libmif_la_LDFLAGS) $(libmif_la_OBJECTS) $(libmif_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mif_cod.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/mif/mif_cod.c0000644000175000017500000004422610554235551017232 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_tvp.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_string.h" #include "jasper/jas_malloc.h" #include "mif_cod.h" /******************************************************************************\ * Local types. \******************************************************************************/ typedef enum { MIF_END = 0, MIF_CMPT } mif_tagid2_t; typedef enum { MIF_TLX = 0, MIF_TLY, MIF_WIDTH, MIF_HEIGHT, MIF_HSAMP, MIF_VSAMP, MIF_PREC, MIF_SGND, MIF_DATA } mif_tagid_t; /******************************************************************************\ * Local functions. \******************************************************************************/ static mif_hdr_t *mif_hdr_create(int maxcmpts); static void mif_hdr_destroy(mif_hdr_t *hdr); static int mif_hdr_growcmpts(mif_hdr_t *hdr, int maxcmpts); static mif_hdr_t *mif_hdr_get(jas_stream_t *in); static int mif_process_cmpt(mif_hdr_t *hdr, char *buf); static int mif_hdr_put(mif_hdr_t *hdr, jas_stream_t *out); static int mif_hdr_addcmpt(mif_hdr_t *hdr, int cmptno, mif_cmpt_t *cmpt); static mif_cmpt_t *mif_cmpt_create(void); static void mif_cmpt_destroy(mif_cmpt_t *cmpt); static char *mif_getline(jas_stream_t *jas_stream, char *buf, int bufsize); static int mif_getc(jas_stream_t *in); static mif_hdr_t *mif_makehdrfromimage(jas_image_t *image); /******************************************************************************\ * Local data. \******************************************************************************/ jas_taginfo_t mif_tags2[] = { {MIF_CMPT, "component"}, {MIF_END, "end"}, {-1, 0} }; jas_taginfo_t mif_tags[] = { {MIF_TLX, "tlx"}, {MIF_TLY, "tly"}, {MIF_WIDTH, "width"}, {MIF_HEIGHT, "height"}, {MIF_HSAMP, "sampperx"}, {MIF_VSAMP, "samppery"}, {MIF_PREC, "prec"}, {MIF_SGND, "sgnd"}, {MIF_DATA, "data"}, {-1, 0} }; /******************************************************************************\ * Code for load operation. \******************************************************************************/ /* Load an image from a stream in the MIF format. */ jas_image_t *mif_decode(jas_stream_t *in, char *optstr) { mif_hdr_t *hdr; jas_image_t *image; jas_image_t *tmpimage; jas_stream_t *tmpstream; int cmptno; mif_cmpt_t *cmpt; jas_image_cmptparm_t cmptparm; jas_seq2d_t *data; int_fast32_t x; int_fast32_t y; int bias; /* Avoid warnings about unused parameters. */ optstr = 0; hdr = 0; image = 0; tmpimage = 0; tmpstream = 0; data = 0; if (!(hdr = mif_hdr_get(in))) { goto error; } if (!(image = jas_image_create0())) { goto error; } for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { cmpt = hdr->cmpts[cmptno]; tmpstream = cmpt->data ? jas_stream_fopen(cmpt->data, "rb") : in; if (!tmpstream) { goto error; } if (!(tmpimage = jas_image_decode(tmpstream, -1, 0))) { goto error; } if (tmpstream != in) { jas_stream_close(tmpstream); tmpstream = 0; } if (!cmpt->width) { cmpt->width = jas_image_cmptwidth(tmpimage, 0); } if (!cmpt->height) { cmpt->height = jas_image_cmptwidth(tmpimage, 0); } if (!cmpt->prec) { cmpt->prec = jas_image_cmptprec(tmpimage, 0); } if (cmpt->sgnd < 0) { cmpt->sgnd = jas_image_cmptsgnd(tmpimage, 0); } cmptparm.tlx = cmpt->tlx; cmptparm.tly = cmpt->tly; cmptparm.hstep = cmpt->sampperx; cmptparm.vstep = cmpt->samppery; cmptparm.width = cmpt->width; cmptparm.height = cmpt->height; cmptparm.prec = cmpt->prec; cmptparm.sgnd = cmpt->sgnd; if (jas_image_addcmpt(image, jas_image_numcmpts(image), &cmptparm)) { goto error; } if (!(data = jas_seq2d_create(0, 0, cmpt->width, cmpt->height))) { goto error; } if (jas_image_readcmpt(tmpimage, 0, 0, 0, cmpt->width, cmpt->height, data)) { goto error; } if (cmpt->sgnd) { bias = 1 << (cmpt->prec - 1); for (y = 0; y < cmpt->height; ++y) { for (x = 0; x < cmpt->width; ++x) { *jas_seq2d_getref(data, x, y) -= bias; } } } if (jas_image_writecmpt(image, jas_image_numcmpts(image) - 1, 0, 0, cmpt->width, cmpt->height, data)) { goto error; } jas_seq2d_destroy(data); data = 0; jas_image_destroy(tmpimage); tmpimage = 0; } mif_hdr_destroy(hdr); hdr = 0; return image; error: if (image) { jas_image_destroy(image); } if (hdr) { mif_hdr_destroy(hdr); } if (tmpstream && tmpstream != in) { jas_stream_close(tmpstream); } if (tmpimage) { jas_image_destroy(tmpimage); } if (data) { jas_seq2d_destroy(data); } return 0; } /******************************************************************************\ * Code for save operation. \******************************************************************************/ /* Save an image to a stream in the the MIF format. */ int mif_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { mif_hdr_t *hdr; jas_image_t *tmpimage; int fmt; int cmptno; mif_cmpt_t *cmpt; jas_image_cmptparm_t cmptparm; jas_seq2d_t *data; int_fast32_t x; int_fast32_t y; int bias; hdr = 0; tmpimage = 0; data = 0; if (optstr && *optstr != '\0') { jas_eprintf("warning: ignoring unsupported options\n"); } if ((fmt = jas_image_strtofmt("pnm")) < 0) { jas_eprintf("error: PNM support required\n"); goto error; } if (!(hdr = mif_makehdrfromimage(image))) { goto error; } if (mif_hdr_put(hdr, out)) { goto error; } /* Output component data. */ for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { cmpt = hdr->cmpts[cmptno]; if (!cmpt->data) { if (!(tmpimage = jas_image_create0())) { goto error; } cmptparm.tlx = 0; cmptparm.tly = 0; cmptparm.hstep = cmpt->sampperx; cmptparm.vstep = cmpt->samppery; cmptparm.width = cmpt->width; cmptparm.height = cmpt->height; cmptparm.prec = cmpt->prec; cmptparm.sgnd = false; if (jas_image_addcmpt(tmpimage, jas_image_numcmpts(tmpimage), &cmptparm)) { goto error; } if (!(data = jas_seq2d_create(0, 0, cmpt->width, cmpt->height))) { goto error; } if (jas_image_readcmpt(image, cmptno, 0, 0, cmpt->width, cmpt->height, data)) { goto error; } if (cmpt->sgnd) { bias = 1 << (cmpt->prec - 1); for (y = 0; y < cmpt->height; ++y) { for (x = 0; x < cmpt->width; ++x) { *jas_seq2d_getref(data, x, y) += bias; } } } if (jas_image_writecmpt(tmpimage, 0, 0, 0, cmpt->width, cmpt->height, data)) { goto error; } jas_seq2d_destroy(data); data = 0; if (jas_image_encode(tmpimage, out, fmt, 0)) { goto error; } jas_image_destroy(tmpimage); tmpimage = 0; } } mif_hdr_destroy(hdr); return 0; error: if (hdr) { mif_hdr_destroy(hdr); } if (tmpimage) { jas_image_destroy(tmpimage); } if (data) { jas_seq2d_destroy(data); } return -1; } /******************************************************************************\ * Code for validate operation. \******************************************************************************/ int mif_validate(jas_stream_t *in) { uchar buf[MIF_MAGICLEN]; uint_fast32_t magic; int i; int n; assert(JAS_STREAM_MAXPUTBACK >= MIF_MAGICLEN); /* Read the validation data (i.e., the data used for detecting the format). */ if ((n = jas_stream_read(in, buf, MIF_MAGICLEN)) < 0) { return -1; } /* Put the validation data back onto the stream, so that the stream position will not be changed. */ for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } /* Was enough data read? */ if (n < MIF_MAGICLEN) { return -1; } /* Compute the signature value. */ magic = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; /* Ensure that the signature is correct for this format. */ if (magic != MIF_MAGIC) { return -1; } return 0; } /******************************************************************************\ * Code for MIF header class. \******************************************************************************/ static mif_hdr_t *mif_hdr_create(int maxcmpts) { mif_hdr_t *hdr; if (!(hdr = jas_malloc(sizeof(mif_hdr_t)))) { return 0; } hdr->numcmpts = 0; hdr->maxcmpts = 0; hdr->cmpts = 0; if (mif_hdr_growcmpts(hdr, maxcmpts)) { mif_hdr_destroy(hdr); return 0; } return hdr; } static void mif_hdr_destroy(mif_hdr_t *hdr) { int cmptno; if (hdr->cmpts) { for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { mif_cmpt_destroy(hdr->cmpts[cmptno]); } jas_free(hdr->cmpts); } jas_free(hdr); } static int mif_hdr_growcmpts(mif_hdr_t *hdr, int maxcmpts) { int cmptno; mif_cmpt_t **newcmpts; assert(maxcmpts >= hdr->numcmpts); newcmpts = (!hdr->cmpts) ? jas_malloc(maxcmpts * sizeof(mif_cmpt_t *)) : jas_realloc(hdr->cmpts, maxcmpts * sizeof(mif_cmpt_t *)); if (!newcmpts) { return -1; } hdr->maxcmpts = maxcmpts; hdr->cmpts = newcmpts; for (cmptno = hdr->numcmpts; cmptno < hdr->maxcmpts; ++cmptno) { hdr->cmpts[cmptno] = 0; } return 0; } static mif_hdr_t *mif_hdr_get(jas_stream_t *in) { uchar magicbuf[MIF_MAGICLEN]; char buf[4096]; mif_hdr_t *hdr; bool done; jas_tvparser_t *tvp; int id; hdr = 0; if (jas_stream_read(in, magicbuf, MIF_MAGICLEN) != MIF_MAGICLEN) { goto error; } if (magicbuf[0] != (MIF_MAGIC >> 24) || magicbuf[1] != ((MIF_MAGIC >> 16) & 0xff) || magicbuf[2] != ((MIF_MAGIC >> 8) & 0xff) || magicbuf[3] != (MIF_MAGIC & 0xff)) { jas_eprintf("error: bad signature\n"); goto error; } if (!(hdr = mif_hdr_create(0))) { goto error; } done = false; do { if (!mif_getline(in, buf, sizeof(buf))) { goto error; } if (buf[0] == '\0') { continue; } if (!(tvp = jas_tvparser_create(buf))) { goto error; } if (jas_tvparser_next(tvp)) { abort(); } id = jas_taginfo_nonull(jas_taginfos_lookup(mif_tags2, jas_tvparser_gettag(tvp)))->id; jas_tvparser_destroy(tvp); switch (id) { case MIF_CMPT: mif_process_cmpt(hdr, buf); break; case MIF_END: done = 1; break; } } while (!done); return hdr; error: if (hdr) { mif_hdr_destroy(hdr); } return 0; } static int mif_process_cmpt(mif_hdr_t *hdr, char *buf) { jas_tvparser_t *tvp; mif_cmpt_t *cmpt; int id; cmpt = 0; tvp = 0; if (!(cmpt = mif_cmpt_create())) { goto error; } cmpt->tlx = 0; cmpt->tly = 0; cmpt->sampperx = 0; cmpt->samppery = 0; cmpt->width = 0; cmpt->height = 0; cmpt->prec = 0; cmpt->sgnd = -1; cmpt->data = 0; if (!(tvp = jas_tvparser_create(buf))) { goto error; } while (!(id = jas_tvparser_next(tvp))) { switch (jas_taginfo_nonull(jas_taginfos_lookup(mif_tags, jas_tvparser_gettag(tvp)))->id) { case MIF_TLX: cmpt->tlx = atoi(jas_tvparser_getval(tvp)); break; case MIF_TLY: cmpt->tly = atoi(jas_tvparser_getval(tvp)); break; case MIF_WIDTH: cmpt->width = atoi(jas_tvparser_getval(tvp)); break; case MIF_HEIGHT: cmpt->height = atoi(jas_tvparser_getval(tvp)); break; case MIF_HSAMP: cmpt->sampperx = atoi(jas_tvparser_getval(tvp)); break; case MIF_VSAMP: cmpt->samppery = atoi(jas_tvparser_getval(tvp)); break; case MIF_PREC: cmpt->prec = atoi(jas_tvparser_getval(tvp)); break; case MIF_SGND: cmpt->sgnd = atoi(jas_tvparser_getval(tvp)); break; case MIF_DATA: if (!(cmpt->data = jas_strdup(jas_tvparser_getval(tvp)))) { return -1; } break; } } jas_tvparser_destroy(tvp); if (!cmpt->sampperx || !cmpt->samppery) { goto error; } if (mif_hdr_addcmpt(hdr, hdr->numcmpts, cmpt)) { goto error; } return 0; error: if (cmpt) { mif_cmpt_destroy(cmpt); } if (tvp) { jas_tvparser_destroy(tvp); } return -1; } static int mif_hdr_put(mif_hdr_t *hdr, jas_stream_t *out) { int cmptno; mif_cmpt_t *cmpt; /* Output signature. */ jas_stream_putc(out, (MIF_MAGIC >> 24) & 0xff); jas_stream_putc(out, (MIF_MAGIC >> 16) & 0xff); jas_stream_putc(out, (MIF_MAGIC >> 8) & 0xff); jas_stream_putc(out, MIF_MAGIC & 0xff); /* Output component information. */ for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { cmpt = hdr->cmpts[cmptno]; jas_stream_printf(out, "component tlx=%ld tly=%ld " "sampperx=%ld samppery=%ld width=%ld height=%ld prec=%d sgnd=%d", cmpt->tlx, cmpt->tly, cmpt->sampperx, cmpt->samppery, cmpt->width, cmpt->height, cmpt->prec, cmpt->sgnd); if (cmpt->data) { jas_stream_printf(out, " data=%s", cmpt->data); } jas_stream_printf(out, "\n"); } /* Output end of header indicator. */ jas_stream_printf(out, "end\n"); return 0; } static int mif_hdr_addcmpt(mif_hdr_t *hdr, int cmptno, mif_cmpt_t *cmpt) { assert(cmptno >= hdr->numcmpts); if (hdr->numcmpts >= hdr->maxcmpts) { if (mif_hdr_growcmpts(hdr, hdr->numcmpts + 128)) { return -1; } } hdr->cmpts[hdr->numcmpts] = cmpt; ++hdr->numcmpts; return 0; } /******************************************************************************\ * Code for MIF component class. \******************************************************************************/ static mif_cmpt_t *mif_cmpt_create() { mif_cmpt_t *cmpt; if (!(cmpt = jas_malloc(sizeof(mif_cmpt_t)))) { return 0; } memset(cmpt, 0, sizeof(mif_cmpt_t)); return cmpt; } static void mif_cmpt_destroy(mif_cmpt_t *cmpt) { if (cmpt->data) { jas_free(cmpt->data); } jas_free(cmpt); } /******************************************************************************\ * MIF parsing code. \******************************************************************************/ static char *mif_getline(jas_stream_t *stream, char *buf, int bufsize) { int c; char *bufptr; assert(bufsize > 0); bufptr = buf; while (bufsize > 1) { if ((c = mif_getc(stream)) == EOF) { break; } *bufptr++ = c; --bufsize; if (c == '\n') { break; } } *bufptr = '\0'; if (!(bufptr = strchr(buf, '\n'))) { return 0; } *bufptr = '\0'; return buf; } static int mif_getc(jas_stream_t *in) { int c; bool done; done = false; do { switch (c = jas_stream_getc(in)) { case EOF: done = 1; break; case '#': for (;;) { if ((c = jas_stream_getc(in)) == EOF) { done = 1; break; } if (c == '\n') { break; } } break; case '\\': if (jas_stream_peekc(in) == '\n') { jas_stream_getc(in); } break; default: done = 1; break; } } while (!done); return c; } /******************************************************************************\ * Miscellaneous functions. \******************************************************************************/ static mif_hdr_t *mif_makehdrfromimage(jas_image_t *image) { mif_hdr_t *hdr; int cmptno; mif_cmpt_t *cmpt; if (!(hdr = mif_hdr_create(jas_image_numcmpts(image)))) { return 0; } hdr->magic = MIF_MAGIC; hdr->numcmpts = jas_image_numcmpts(image); for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { hdr->cmpts[cmptno] = jas_malloc(sizeof(mif_cmpt_t)); cmpt = hdr->cmpts[cmptno]; cmpt->tlx = jas_image_cmpttlx(image, cmptno); cmpt->tly = jas_image_cmpttly(image, cmptno); cmpt->width = jas_image_cmptwidth(image, cmptno); cmpt->height = jas_image_cmptheight(image, cmptno); cmpt->sampperx = jas_image_cmpthstep(image, cmptno); cmpt->samppery = jas_image_cmptvstep(image, cmptno); cmpt->prec = jas_image_cmptprec(image, cmptno); cmpt->sgnd = jas_image_cmptsgnd(image, cmptno); cmpt->data = 0; } return hdr; } jasper-1.900.1/src/libjasper/mif/README0000644000175000017500000000010010554235551016325 0ustar ernieernieThis directory contains the code for support of the MIF format. jasper-1.900.1/src/libjasper/mif/mif_cod.h0000644000175000017500000001005010554235551017223 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef MIF_COD_H #define MIF_COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" /******************************************************************************\ * Constants. \******************************************************************************/ #define MIF_MAGIC 0x4d49460a /* signature */ #define MIF_MAGICLEN 4 /* length of signature in bytes */ /******************************************************************************\ * Types. \******************************************************************************/ /* Per-component information. */ typedef struct { int_fast32_t tlx; int_fast32_t tly; int_fast32_t width; int_fast32_t height; int_fast32_t sampperx; int_fast32_t samppery; int_fast16_t prec; int_fast16_t sgnd; char *data; } mif_cmpt_t; /* MIF header. */ typedef struct { uint_fast32_t magic; int numcmpts; int maxcmpts; mif_cmpt_t **cmpts; } mif_hdr_t; #endif jasper-1.900.1/src/libjasper/mif/Makefile.am0000644000175000017500000000607010554235551017515 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ EXTRA_DIST = README noinst_LTLIBRARIES = libmif.la libmif_la_SOURCES = \ mif_cod.h \ mif_cod.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/bmp/0000755000175000017500000000000010554237065015463 5ustar ernieerniejasper-1.900.1/src/libjasper/bmp/Makefile.in0000644000175000017500000004105110554237045017527 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/bmp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbmp_la_LIBADD = am_libbmp_la_OBJECTS = bmp_cod.lo bmp_dec.lo bmp_enc.lo libbmp_la_OBJECTS = $(am_libbmp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libbmp_la_SOURCES) DIST_SOURCES = $(libbmp_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ noinst_LTLIBRARIES = libbmp.la libbmp_la_SOURCES = \ bmp_cod.h \ bmp_enc.h \ bmp_cod.c \ bmp_dec.c \ bmp_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/bmp/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/bmp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbmp.la: $(libbmp_la_OBJECTS) $(libbmp_la_DEPENDENCIES) $(LINK) $(libbmp_la_LDFLAGS) $(libbmp_la_OBJECTS) $(libbmp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp_cod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp_enc.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/bmp/bmp_cod.c0000644000175000017500000001107710554235553017240 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Windows Bitmap File Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_types.h" #include "jasper/jas_image.h" #include "jasper/jas_malloc.h" #include "bmp_cod.h" /******************************************************************************\ * Constructors and destructors. \******************************************************************************/ bmp_info_t *bmp_info_create() { bmp_info_t *info; if (!(info = jas_malloc(sizeof(bmp_info_t)))) { return 0; } info->palents = 0; return info; } void bmp_info_destroy(bmp_info_t *info) { if (info->palents) { jas_free(info->palents); } jas_free(info); } /******************************************************************************\ * Miscellaneous functions. \******************************************************************************/ int bmp_isgrayscalepal(bmp_palent_t *palents, int numpalents) { bmp_palent_t *palent; int i; for (i = numpalents, palent = palents; i > 0; --i, ++palent) { if (palent->red != palent->grn || palent->red != palent->blu) { return 0; } } return 1; } int bmp_numcmpts(bmp_info_t *info) { int numcmpts; if (info->depth == 24) { numcmpts = 3; } else if (info->depth == 8) { numcmpts = bmp_isgrayscalepal(info->palents, info->numcolors) ? 1 : 3; } else { numcmpts = 0; abort(); } return numcmpts; } jasper-1.900.1/src/libjasper/bmp/bmp_cod.h0000644000175000017500000001525010554235553017242 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Windows Bitmap File Library * * $Id$ */ #ifndef BMP_COD_H #define BMP_COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" /******************************************************************************\ * Constants and macros. \******************************************************************************/ #define BMP_MAGIC 0x4d42 /* The signature for a BMP file. */ #define BMP_HDRLEN 14 /* The nominal header length. */ #define BMP_INFOLEN 40 /* The nominal info length. */ #define BMP_PALLEN(info) ((info)->numcolors * 4) /* The length of the palette. */ #define BMP_HASPAL(info) ((info)->numcolors > 0) /* Is this a palettized image? */ /* Encoding types. */ #define BMP_ENC_RGB 0 /* No special encoding. */ #define BMP_ENC_RLE8 1 /* Run length encoding. */ #define BMP_ENC_RLE4 2 /* Run length encoding. */ /******************************************************************************\ * Types. \******************************************************************************/ /* BMP header. */ typedef struct { int_fast16_t magic; /* The signature (a.k.a. the magic number). */ int_fast32_t siz; /* The size of the file in 32-bit words. */ int_fast16_t reserved1; /* Ask Bill Gates what this is all about. */ int_fast16_t reserved2; /* Ditto. */ int_fast32_t off; /* The offset of the bitmap data from the bitmap file header in bytes. */ } bmp_hdr_t; /* Palette entry. */ typedef struct { int_fast16_t red; /* The red component. */ int_fast16_t grn; /* The green component. */ int_fast16_t blu; /* The blue component. */ int_fast16_t res; /* Reserved. */ } bmp_palent_t; /* BMP info. */ typedef struct { int_fast32_t len; /* The length of the bitmap information header in bytes. */ int_fast32_t width; /* The width of the bitmap in pixels. */ int_fast32_t height; /* The height of the bitmap in pixels. */ int_fast8_t topdown; /* The bitmap data is specified in top-down order. */ int_fast16_t numplanes; /* The number of planes. This must be set to a value of one. */ int_fast16_t depth; /* The number of bits per pixel. */ int_fast32_t enctype; /* The type of compression used. */ int_fast32_t siz; /* The size of the image in bytes. */ int_fast32_t hres; /* The horizontal resolution in pixels/metre. */ int_fast32_t vres; /* The vertical resolution in pixels/metre. */ int_fast32_t numcolors; /* The number of color indices used by the bitmap. */ int_fast32_t mincolors; /* The number of color indices important for displaying the bitmap. */ bmp_palent_t *palents; /* The colors should be listed in order of importance. */ } bmp_info_t; /******************************************************************************\ * Functions and macros. \******************************************************************************/ #define bmp_issupported(hdr, info) \ ((hdr)->magic == BMP_MAGIC && !(hdr)->reserved1 && \ !(hdr)->reserved2 && (info)->numplanes == 1 && \ ((info)->depth == 8 || (info)->depth == 24) && \ (info)->enctype == BMP_ENC_RGB) /* Is this type of BMP file supported? */ #define bmp_haspal(info) \ ((info)->depth == 8) /* Is there a palette? */ int bmp_numcmpts(bmp_info_t *info); /* Get the number of components. */ bmp_info_t *bmp_info_create(void); /* Create BMP information. */ void bmp_info_destroy(bmp_info_t *info); /* Destroy BMP information. */ int bmp_isgrayscalepal(bmp_palent_t *palents, int numpalents); /* Does the specified palette correspond to a grayscale image? */ #endif jasper-1.900.1/src/libjasper/bmp/bmp_enc.h0000644000175000017500000000611410554235553017241 0ustar ernieernie/* * Copyright (c) 2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef BMP_ENC_H #define BMP_ENC_H typedef struct { int numcmpts; int cmpts[4]; } bmp_enc_t; #endif jasper-1.900.1/src/libjasper/bmp/bmp_enc.c0000644000175000017500000002636410554235553017245 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Windows Bitmap File Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_types.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_debug.h" #include "bmp_enc.h" #include "bmp_cod.h" /******************************************************************************\ * Local prototypes. \******************************************************************************/ static int bmp_puthdr(jas_stream_t *out, bmp_hdr_t *hdr); static int bmp_putinfo(jas_stream_t *out, bmp_info_t *info); static int bmp_putdata(jas_stream_t *out, bmp_info_t *info, jas_image_t *image, int *cmpts); static int bmp_putint16(jas_stream_t *in, int_fast16_t val); static int bmp_putint32(jas_stream_t *out, int_fast32_t val); /******************************************************************************\ * Interface functions. \******************************************************************************/ int bmp_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { jas_image_coord_t width; jas_image_coord_t height; int depth; int cmptno; bmp_hdr_t hdr; bmp_info_t *info; int_fast32_t datalen; int numpad; bmp_enc_t encbuf; bmp_enc_t *enc = &encbuf; jas_clrspc_t clrspc; if (optstr) { jas_eprintf("warning: ignoring BMP encoder options\n"); } clrspc = jas_image_clrspc(image); switch (jas_clrspc_fam(clrspc)) { case JAS_CLRSPC_FAM_RGB: if (clrspc != JAS_CLRSPC_SRGB) jas_eprintf("warning: inaccurate color\n"); break; case JAS_CLRSPC_FAM_GRAY: if (clrspc != JAS_CLRSPC_SGRAY) jas_eprintf("warning: inaccurate color\n"); break; default: jas_eprintf("error: BMP format does not support color space\n"); return -1; break; } switch (jas_clrspc_fam(clrspc)) { case JAS_CLRSPC_FAM_RGB: enc->numcmpts = 3; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R))) < 0 || (enc->cmpts[1] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G))) < 0 || (enc->cmpts[2] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B))) < 0) { jas_eprintf("error: missing color component\n"); return -1; } break; case JAS_CLRSPC_FAM_GRAY: enc->numcmpts = 1; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y))) < 0) { jas_eprintf("error: missing color component\n"); return -1; } break; default: abort(); break; } width = jas_image_cmptwidth(image, enc->cmpts[0]); height = jas_image_cmptheight(image, enc->cmpts[0]); depth = jas_image_cmptprec(image, enc->cmpts[0]); /* Check to ensure that the image to be saved can actually be represented using the BMP format. */ for (cmptno = 0; cmptno < enc->numcmpts; ++cmptno) { if (jas_image_cmptwidth(image, enc->cmpts[cmptno]) != width || jas_image_cmptheight(image, enc->cmpts[cmptno]) != height || jas_image_cmptprec(image, enc->cmpts[cmptno]) != depth || jas_image_cmptsgnd(image, enc->cmpts[cmptno]) != false || jas_image_cmpttlx(image, enc->cmpts[cmptno]) != 0 || jas_image_cmpttly(image, enc->cmpts[cmptno]) != 0) { jas_eprintf("The BMP format cannot be used to represent an image with this geometry.\n"); return -1; } } /* The component depths must be 1, 4, or 8. */ if (depth != 1 && depth != 4 && depth != 8) { return -1; } numpad = (width * enc->numcmpts) % 4; if (numpad) { numpad = 4 - numpad; } datalen = (enc->numcmpts * width + numpad) * height; if (!(info = bmp_info_create())) { return -1; } info->len = BMP_INFOLEN; info->width = width; info->height = height; info->numplanes = 1; info->depth = enc->numcmpts * depth; info->enctype = BMP_ENC_RGB; info->siz = datalen; info->hres = 0; info->vres = 0; info->numcolors = (enc->numcmpts == 1) ? 256 : 0; info->mincolors = 0; hdr.magic = BMP_MAGIC; hdr.siz = BMP_HDRLEN + BMP_INFOLEN + 0 + datalen; hdr.off = BMP_HDRLEN + BMP_INFOLEN + BMP_PALLEN(info); /* Write the bitmap header. */ if (bmp_puthdr(out, &hdr)) { return -1; } /* Write the bitmap information. */ if (bmp_putinfo(out, info)) { return -1; } /* Write the bitmap data. */ if (bmp_putdata(out, info, image, enc->cmpts)) { return -1; } bmp_info_destroy(info); return 0; } /******************************************************************************\ * Code for aggregate types. \******************************************************************************/ static int bmp_puthdr(jas_stream_t *out, bmp_hdr_t *hdr) { assert(hdr->magic == BMP_MAGIC); if (bmp_putint16(out, hdr->magic) || bmp_putint32(out, hdr->siz) || bmp_putint32(out, 0) || bmp_putint32(out, hdr->off)) { return -1; } return 0; } static int bmp_putinfo(jas_stream_t *out, bmp_info_t *info) { int i; info->len = 40; if (bmp_putint32(out, info->len) || bmp_putint32(out, info->width) || bmp_putint32(out, info->height) || bmp_putint16(out, info->numplanes) || bmp_putint16(out, info->depth) || bmp_putint32(out, info->enctype) || bmp_putint32(out, info->siz) || bmp_putint32(out, info->hres) || bmp_putint32(out, info->vres) || bmp_putint32(out, info->numcolors) || bmp_putint32(out, info->mincolors)) { return -1; } for (i = 0; i < info->numcolors; ++i) { if (jas_stream_putc(out, i) == EOF || jas_stream_putc(out, i) == EOF || jas_stream_putc(out, i) == EOF || jas_stream_putc(out, 0) == EOF) { return -1; } } return 0; } static int bmp_putdata(jas_stream_t *out, bmp_info_t *info, jas_image_t *image, int *cmpts) { int i; int j; jas_matrix_t *bufs[3]; int numpad; unsigned char red; unsigned char grn; unsigned char blu; int ret; int numcmpts; int v; int cmptno; numcmpts = (info->depth == 24) ? 3:1; /* We do not support palettized images. */ if (BMP_HASPAL(info) && numcmpts == 3) { jas_eprintf("no palettized image support for BMP format\n"); return -1; } ret = 0; for (i = 0; i < numcmpts; ++i) { bufs[i] = 0; } /* Create temporary matrices to hold component data. */ for (i = 0; i < numcmpts; ++i) { if (!(bufs[i] = jas_matrix_create(1, info->width))) { ret = -1; goto bmp_putdata_done; } } /* Calculate number of padding bytes per row of image data. */ numpad = (numcmpts * info->width) % 4; if (numpad) { numpad = 4 - numpad; } /* Put the image data. */ for (i = info->height - 1; i >= 0; --i) { for (cmptno = 0; cmptno < numcmpts; ++cmptno) { if (jas_image_readcmpt(image, cmptno, 0, i, info->width, 1, bufs[cmpts[cmptno]])) { ret = -1; goto bmp_putdata_done; } } for (j = 0; j < info->width; ++j) { if (numcmpts == 3) { red = (jas_matrix_getv(bufs[0], j)); grn = (jas_matrix_getv(bufs[1], j)); blu = (jas_matrix_getv(bufs[2], j)); if (jas_stream_putc(out, blu) == EOF || jas_stream_putc(out, grn) == EOF || jas_stream_putc(out, red) == EOF) { ret = -1; goto bmp_putdata_done; } } else if (numcmpts == 1) { v = (jas_matrix_getv(bufs[cmpts[0]], j)); if (jas_stream_putc(out, v) == EOF) { ret = -1; goto bmp_putdata_done; } } else { abort(); } } for (j = numpad; j > 0; --j) { if (jas_stream_putc(out, 0) == EOF) { ret = -1; goto bmp_putdata_done; } } } bmp_putdata_done: /* Destroy the temporary matrices. */ for (i = 0; i < numcmpts; ++i) { if (bufs[i]) { jas_matrix_destroy(bufs[i]); } } return ret; } /******************************************************************************\ * Code for primitive types. \******************************************************************************/ static int bmp_putint16(jas_stream_t *in, int_fast16_t val) { if (jas_stream_putc(in, val & 0xff) == EOF || jas_stream_putc(in, (val >> 8) & 0xff) == EOF) { return -1; } return 0; } static int bmp_putint32(jas_stream_t *out, int_fast32_t val) { int n; int_fast32_t v; /* This code needs to be changed if we want to handle negative values. */ assert(val >= 0); v = val; for (n = 4;;) { if (jas_stream_putc(out, v & 0xff) == EOF) { return -1; } if (--n <= 0) { break; } v >>= 8; } return 0; } jasper-1.900.1/src/libjasper/bmp/bmp_dec.c0000644000175000017500000003045610554235553017230 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Windows Bitmap File Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_types.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_malloc.h" #include "bmp_cod.h" /******************************************************************************\ * Local prototypes. \******************************************************************************/ static int bmp_gethdr(jas_stream_t *in, bmp_hdr_t *hdr); static bmp_info_t *bmp_getinfo(jas_stream_t *in); static int bmp_getdata(jas_stream_t *in, bmp_info_t *info, jas_image_t *image); static int bmp_getint16(jas_stream_t *in, int_fast16_t *val); static int bmp_getint32(jas_stream_t *in, int_fast32_t *val); static int bmp_gobble(jas_stream_t *in, long n); /******************************************************************************\ * Interface functions. \******************************************************************************/ jas_image_t *bmp_decode(jas_stream_t *in, char *optstr) { jas_image_t *image; bmp_hdr_t hdr; bmp_info_t *info; uint_fast16_t cmptno; jas_image_cmptparm_t cmptparms[3]; jas_image_cmptparm_t *cmptparm; uint_fast16_t numcmpts; long n; if (optstr) { jas_eprintf("warning: ignoring BMP decoder options\n"); } jas_eprintf( "THE BMP FORMAT IS NOT FULLY SUPPORTED!\n" "THAT IS, THE JASPER SOFTWARE CANNOT DECODE ALL TYPES OF BMP DATA.\n" "IF YOU HAVE ANY PROBLEMS, PLEASE TRY CONVERTING YOUR IMAGE DATA\n" "TO THE PNM FORMAT, AND USING THIS FORMAT INSTEAD.\n" ); /* Read the bitmap header. */ if (bmp_gethdr(in, &hdr)) { jas_eprintf("cannot get header\n"); return 0; } /* Read the bitmap information. */ if (!(info = bmp_getinfo(in))) { jas_eprintf("cannot get info\n"); return 0; } /* Ensure that we support this type of BMP file. */ if (!bmp_issupported(&hdr, info)) { jas_eprintf("error: unsupported BMP encoding\n"); bmp_info_destroy(info); return 0; } /* Skip over any useless data between the end of the palette and start of the bitmap data. */ if ((n = hdr.off - (BMP_HDRLEN + BMP_INFOLEN + BMP_PALLEN(info))) < 0) { jas_eprintf("error: possibly bad bitmap offset?\n"); return 0; } if (n > 0) { jas_eprintf("skipping unknown data in BMP file\n"); if (bmp_gobble(in, n)) { bmp_info_destroy(info); return 0; } } /* Get the number of components. */ numcmpts = bmp_numcmpts(info); for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno, ++cmptparm) { cmptparm->tlx = 0; cmptparm->tly = 0; cmptparm->hstep = 1; cmptparm->vstep = 1; cmptparm->width = info->width; cmptparm->height = info->height; cmptparm->prec = 8; cmptparm->sgnd = false; } /* Create image object. */ if (!(image = jas_image_create(numcmpts, cmptparms, JAS_CLRSPC_UNKNOWN))) { bmp_info_destroy(info); return 0; } if (numcmpts == 3) { jas_image_setclrspc(image, JAS_CLRSPC_SRGB); jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); jas_image_setcmpttype(image, 1, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); jas_image_setcmpttype(image, 2, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); } else { jas_image_setclrspc(image, JAS_CLRSPC_SGRAY); jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); } /* Read the bitmap data. */ if (bmp_getdata(in, info, image)) { bmp_info_destroy(info); jas_image_destroy(image); return 0; } bmp_info_destroy(info); return image; } int bmp_validate(jas_stream_t *in) { int n; int i; uchar buf[2]; assert(JAS_STREAM_MAXPUTBACK >= 2); /* Read the first two characters that constitute the signature. */ if ((n = jas_stream_read(in, (char *) buf, 2)) < 0) { return -1; } /* Put the characters read back onto the stream. */ for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } /* Did we read enough characters? */ if (n < 2) { return -1; } /* Is the signature correct for the BMP format? */ if (buf[0] == (BMP_MAGIC & 0xff) && buf[1] == (BMP_MAGIC >> 8)) { return 0; } return -1; } /******************************************************************************\ * Code for aggregate types. \******************************************************************************/ static int bmp_gethdr(jas_stream_t *in, bmp_hdr_t *hdr) { if (bmp_getint16(in, &hdr->magic) || hdr->magic != BMP_MAGIC || bmp_getint32(in, &hdr->siz) || bmp_getint16(in, &hdr->reserved1) || bmp_getint16(in, &hdr->reserved2) || bmp_getint32(in, &hdr->off)) { return -1; } return 0; } static bmp_info_t *bmp_getinfo(jas_stream_t *in) { bmp_info_t *info; int i; bmp_palent_t *palent; if (!(info = bmp_info_create())) { return 0; } if (bmp_getint32(in, &info->len) || info->len != 40 || bmp_getint32(in, &info->width) || bmp_getint32(in, &info->height) || bmp_getint16(in, &info->numplanes) || bmp_getint16(in, &info->depth) || bmp_getint32(in, &info->enctype) || bmp_getint32(in, &info->siz) || bmp_getint32(in, &info->hres) || bmp_getint32(in, &info->vres) || bmp_getint32(in, &info->numcolors) || bmp_getint32(in, &info->mincolors)) { bmp_info_destroy(info); return 0; } if (info->height < 0) { info->topdown = 1; info->height = -info->height; } else { info->topdown = 0; } if (info->width <= 0 || info->height <= 0 || info->numplanes <= 0 || info->depth <= 0 || info->numcolors < 0 || info->mincolors < 0) { bmp_info_destroy(info); return 0; } if (info->enctype != BMP_ENC_RGB) { jas_eprintf("unsupported BMP encoding\n"); bmp_info_destroy(info); return 0; } if (info->numcolors > 0) { if (!(info->palents = jas_malloc(info->numcolors * sizeof(bmp_palent_t)))) { bmp_info_destroy(info); return 0; } } else { info->palents = 0; } for (i = 0; i < info->numcolors; ++i) { palent = &info->palents[i]; if ((palent->blu = jas_stream_getc(in)) == EOF || (palent->grn = jas_stream_getc(in)) == EOF || (palent->red = jas_stream_getc(in)) == EOF || (palent->res = jas_stream_getc(in)) == EOF) { bmp_info_destroy(info); return 0; } } return info; } static int bmp_getdata(jas_stream_t *in, bmp_info_t *info, jas_image_t *image) { int i; int j; int y; jas_matrix_t *cmpts[3]; int numpad; int red; int grn; int blu; int ret; int numcmpts; int cmptno; int ind; bmp_palent_t *palent; int mxind; int haspal; assert(info->depth == 8 || info->depth == 24); assert(info->enctype == BMP_ENC_RGB); numcmpts = bmp_numcmpts(info); haspal = bmp_haspal(info); ret = 0; for (i = 0; i < numcmpts; ++i) { cmpts[i] = 0; } /* Create temporary matrices to hold component data. */ for (i = 0; i < numcmpts; ++i) { if (!(cmpts[i] = jas_matrix_create(1, info->width))) { ret = -1; goto bmp_getdata_done; } } /* Calculate number of padding bytes per row of image data. */ numpad = (numcmpts * info->width) % 4; if (numpad) { numpad = 4 - numpad; } mxind = (1 << info->depth) - 1; for (i = 0; i < info->height; ++i) { for (j = 0; j < info->width; ++j) { if (haspal) { if ((ind = jas_stream_getc(in)) == EOF) { ret = -1; goto bmp_getdata_done; } if (ind > mxind) { ret = -1; goto bmp_getdata_done; } if (ind < info->numcolors) { palent = &info->palents[ind]; red = palent->red; grn = palent->grn; blu = palent->blu; } else { red = ind; grn = ind; blu = ind; } } else { if ((blu = jas_stream_getc(in)) == EOF || (grn = jas_stream_getc(in)) == EOF || (red = jas_stream_getc(in)) == EOF) { ret = -1; goto bmp_getdata_done; } } if (numcmpts == 3) { jas_matrix_setv(cmpts[0], j, red); jas_matrix_setv(cmpts[1], j, grn); jas_matrix_setv(cmpts[2], j, blu); } else { jas_matrix_setv(cmpts[0], j, red); } } for (j = numpad; j > 0; --j) { if (jas_stream_getc(in) == EOF) { ret = -1; goto bmp_getdata_done; } } for (cmptno = 0; cmptno < numcmpts; ++cmptno) { y = info->topdown ? i : (info->height - 1 - i); if (jas_image_writecmpt(image, cmptno, 0, y, info->width, 1, cmpts[cmptno])) { ret = -1; goto bmp_getdata_done; } } } bmp_getdata_done: /* Destroy the temporary matrices. */ for (i = 0; i < numcmpts; ++i) { if (cmpts[i]) { jas_matrix_destroy(cmpts[i]); } } return ret; } /******************************************************************************\ * Code for primitive types. \******************************************************************************/ static int bmp_getint16(jas_stream_t *in, int_fast16_t *val) { int lo; int hi; if ((lo = jas_stream_getc(in)) == EOF || (hi = jas_stream_getc(in)) == EOF) { return -1; } if (val) { *val = (hi << 8) | lo; } return 0; } static int bmp_getint32(jas_stream_t *in, int_fast32_t *val) { int n; uint_fast32_t v; int c; for (n = 4, v = 0;;) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } v |= (c << 24); if (--n <= 0) { break; } v >>= 8; } if (val) { *val = v; } return 0; } static int bmp_gobble(jas_stream_t *in, long n) { while (--n >= 0) { if (jas_stream_getc(in) == EOF) { return -1; } } return 0; } jasper-1.900.1/src/libjasper/bmp/Makefile.am0000644000175000017500000000611210554235553017517 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ noinst_LTLIBRARIES = libbmp.la libbmp_la_SOURCES = \ bmp_cod.h \ bmp_enc.h \ bmp_cod.c \ bmp_dec.c \ bmp_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/dummy.c0000644000175000017500000000011310554235553016177 0ustar ernieernie/* This source file only exists to keep libtool happy. */ char jas_dummy; jasper-1.900.1/src/libjasper/README0000644000175000017500000000013410554235553015563 0ustar ernieernieThis directory hierarchy contains the source code for the JasPer library (i.e., libjasper). jasper-1.900.1/src/libjasper/jpg/0000755000175000017500000000000010554237065015465 5ustar ernieerniejasper-1.900.1/src/libjasper/jpg/Makefile.in0000644000175000017500000004212110554237046017531 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/jpg DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libjpg_la_LIBADD = am__libjpg_la_SOURCES_DIST = jpg_cod.h jpg_enc.h jpg_jpeglib.h \ jpg_dummy.c jpg_dec.c jpg_enc.c jpg_val.c @HAVE_LIBJPEG_FALSE@am__objects_1 = jpg_dummy.lo @HAVE_LIBJPEG_TRUE@am__objects_1 = jpg_dec.lo jpg_enc.lo am_libjpg_la_OBJECTS = $(am__objects_1) jpg_val.lo libjpg_la_OBJECTS = $(am_libjpg_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libjpg_la_SOURCES) $(EXTRA_libjpg_la_SOURCES) DIST_SOURCES = $(am__libjpg_la_SOURCES_DIST) \ $(EXTRA_libjpg_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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 @HAVE_LIBJPEG_FALSE@MISCSOURCES = jpg_dummy.c @HAVE_LIBJPEG_TRUE@MISCSOURCES = jpg_dec.c jpg_enc.c noinst_LTLIBRARIES = libjpg.la libjpg_la_SOURCES = \ jpg_cod.h \ jpg_enc.h \ jpg_jpeglib.h \ $(MISCSOURCES) \ jpg_val.c EXTRA_libjpg_la_SOURCES = \ jpg_dec.c \ jpg_enc.c \ jpg_dummy.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/jpg/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/jpg/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjpg.la: $(libjpg_la_OBJECTS) $(libjpg_la_DEPENDENCIES) $(LINK) $(libjpg_la_LDFLAGS) $(libjpg_la_OBJECTS) $(libjpg_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpg_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpg_dummy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpg_enc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpg_val.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/jpg/jpg_dummy.c0000644000175000017500000001105110554235550017617 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_tvp.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_string.h" #include "jpg_cod.h" /******************************************************************************\ * \******************************************************************************/ #define JPG_IJGINFO \ "The source code for the IJG JPEG library can be downloaded from:\n" \ " http://www.ijg.org\n" /******************************************************************************\ * Code for load operation. \******************************************************************************/ /* Load an image from a stream in the JPG format. */ jas_image_t *jpg_decode(jas_stream_t *in, char *optstr) { jas_eprintf("error: JPEG decoder not available\n"); jas_eprintf("The IJG JPEG library is required for JPEG decoding support.\n"); jas_eprintf("%s", JPG_IJGINFO); return 0; } /******************************************************************************\ * Code for save operation. \******************************************************************************/ /* Save an image to a stream in the the JPG format. */ int jpg_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { jas_eprintf("error: JPEG encoder not available\n"); jas_eprintf("The IJG JPEG library is required for JPEG encoding support.\n"); jas_eprintf("%s", JPG_IJGINFO); return -1; } jasper-1.900.1/src/libjasper/jpg/jpg_enc.c0000644000175000017500000002773310554235550017247 0ustar ernieernie/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_types.h" #include "jasper/jas_tvp.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_string.h" #include "jasper/jas_debug.h" #include "jpg_jpeglib.h" #include "jpg_cod.h" #include "jpg_enc.h" /******************************************************************************\ * Types. \******************************************************************************/ typedef struct jpg_src_s { /* Output buffer. */ JSAMPARRAY buffer; /* Height of output buffer. */ JDIMENSION buffer_height; /* The current row. */ JDIMENSION row; /* The image used to hold the decompressed sample data. */ jas_image_t *image; /* The row buffer. */ jas_matrix_t *data; /* The error indicator. If this is nonzero, something has gone wrong during decompression. */ int error; jpg_enc_t *enc; } jpg_src_t; typedef struct { int qual; } jpg_encopts_t; typedef enum { OPT_QUAL } jpg_optid_t; jas_taginfo_t jpg_opttab[] = { {OPT_QUAL, "quality"}, {-1, 0} }; /******************************************************************************\ * Local prototypes. \******************************************************************************/ static int jpg_copyfiletostream(jas_stream_t *out, FILE *in); static void jpg_start_input(j_compress_ptr cinfo, struct jpg_src_s *sinfo); static JDIMENSION jpg_get_pixel_rows(j_compress_ptr cinfo, struct jpg_src_s *sinfo); static void jpg_finish_input(j_compress_ptr cinfo, struct jpg_src_s *sinfo); static J_COLOR_SPACE tojpgcs(int colorspace); static int jpg_parseencopts(char *optstr, jpg_encopts_t *encopts); /******************************************************************************\ * \******************************************************************************/ static int jpg_copyfiletostream(jas_stream_t *out, FILE *in) { int c; while ((c = fgetc(in)) != EOF) { if (jas_stream_putc(out, c) == EOF) { return -1; } } return 0; } static void jpg_start_input(j_compress_ptr cinfo, struct jpg_src_s *sinfo) { /* Avoid compiler warnings about unused parameters. */ cinfo = 0; sinfo->row = 0; } static JDIMENSION jpg_get_pixel_rows(j_compress_ptr cinfo, struct jpg_src_s *sinfo) { JSAMPLE *bufptr; int i; int cmptno; int width; int *cmpts; cmpts = sinfo->enc->cmpts; width = jas_image_width(sinfo->image); if (sinfo->error) { return 0; } for (cmptno = 0; cmptno < cinfo->input_components; ++cmptno) { if (jas_image_readcmpt(sinfo->image, cmpts[cmptno], 0, sinfo->row, width, 1, sinfo->data)) { ; } bufptr = (sinfo->buffer[0]) + cmptno; for (i = 0; i < width; ++i) { *bufptr = jas_matrix_get(sinfo->data, 0, i); bufptr += cinfo->input_components; } } ++sinfo->row; return 1; } static void jpg_finish_input(j_compress_ptr cinfo, struct jpg_src_s *sinfo) { /* Avoid compiler warnings about unused parameters. */ cinfo = 0; sinfo = 0; } /******************************************************************************\ * Code for save operation. \******************************************************************************/ /* Save an image to a stream in the the JPG format. */ int jpg_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { JDIMENSION numscanlines; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; jas_image_coord_t width; jas_image_coord_t height; jpg_src_t src_mgr_buf; jpg_src_t *src_mgr = &src_mgr_buf; FILE *output_file; int cmptno; jpg_enc_t encbuf; jpg_enc_t *enc = &encbuf; jpg_encopts_t encopts; output_file = 0; if (jpg_parseencopts(optstr, &encopts)) goto error; switch (jas_clrspc_fam(jas_image_clrspc(image))) { case JAS_CLRSPC_FAM_RGB: if (jas_image_clrspc(image) != JAS_CLRSPC_SRGB) jas_eprintf("warning: inaccurate color\n"); enc->numcmpts = 3; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R))) < 0 || (enc->cmpts[1] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G))) < 0 || (enc->cmpts[2] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B))) < 0) { jas_eprintf("error: missing color component\n"); goto error; } break; case JAS_CLRSPC_FAM_YCBCR: if (jas_image_clrspc(image) != JAS_CLRSPC_SYCBCR) jas_eprintf("warning: inaccurate color\n"); enc->numcmpts = 3; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y))) < 0 || (enc->cmpts[1] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB))) < 0 || (enc->cmpts[2] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR))) < 0) { jas_eprintf("error: missing color component\n"); goto error; } break; case JAS_CLRSPC_FAM_GRAY: if (jas_image_clrspc(image) != JAS_CLRSPC_SGRAY) jas_eprintf("warning: inaccurate color\n"); enc->numcmpts = 1; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y))) < 0) { jas_eprintf("error: missing color component\n"); goto error; } break; default: jas_eprintf("error: JPG format does not support color space\n"); goto error; break; } width = jas_image_width(image); height = jas_image_height(image); for (cmptno = 0; cmptno < enc->numcmpts; ++cmptno) { if (jas_image_cmptwidth(image, enc->cmpts[cmptno]) != width || jas_image_cmptheight(image, enc->cmpts[cmptno]) != height || jas_image_cmpttlx(image, enc->cmpts[cmptno]) != 0 || jas_image_cmpttly(image, enc->cmpts[cmptno]) != 0 || jas_image_cmpthstep(image, enc->cmpts[cmptno]) != 1 || jas_image_cmptvstep(image, enc->cmpts[cmptno]) != 1 || jas_image_cmptprec(image, enc->cmpts[cmptno]) != 8 || jas_image_cmptsgnd(image, enc->cmpts[cmptno]) != false) { jas_eprintf("error: The JPG encoder cannot handle an image with this geometry.\n"); goto error; } } if (!(output_file = tmpfile())) { goto error; } /* Create a JPEG compression object. */ cinfo.err = jpeg_std_error(&jerr); jpeg_create_compress(&cinfo); /* Specify data destination for compression */ jpeg_stdio_dest(&cinfo, output_file); cinfo.in_color_space = tojpgcs(jas_image_clrspc(image)); cinfo.image_width = width; cinfo.image_height = height; cinfo.input_components = enc->numcmpts; jpeg_set_defaults(&cinfo); src_mgr->error = 0; src_mgr->image = image; src_mgr->data = jas_matrix_create(1, width); assert(src_mgr->data); src_mgr->buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo, JPOOL_IMAGE, (JDIMENSION) width * cinfo.input_components, (JDIMENSION) 1); src_mgr->buffer_height = 1; src_mgr->enc = enc; /* Read the input file header to obtain file size & colorspace. */ jpg_start_input(&cinfo, src_mgr); if (encopts.qual >= 0) { jpeg_set_quality(&cinfo, encopts.qual, TRUE); } /* Now that we know input colorspace, fix colorspace-dependent defaults */ jpeg_default_colorspace(&cinfo); /* Start compressor */ jpeg_start_compress(&cinfo, TRUE); /* Process data */ while (cinfo.next_scanline < cinfo.image_height) { if ((numscanlines = jpg_get_pixel_rows(&cinfo, src_mgr)) <= 0) { break; } jpeg_write_scanlines(&cinfo, src_mgr->buffer, numscanlines); } /* Finish compression and release memory */ jpg_finish_input(&cinfo, src_mgr); jpeg_finish_compress(&cinfo); jpeg_destroy_compress(&cinfo); jas_matrix_destroy(src_mgr->data); rewind(output_file); jpg_copyfiletostream(out, output_file); fclose(output_file); output_file = 0; return 0; error: if (output_file) { fclose(output_file); } return -1; } static J_COLOR_SPACE tojpgcs(int colorspace) { switch (jas_clrspc_fam(colorspace)) { case JAS_CLRSPC_FAM_RGB: return JCS_RGB; break; case JAS_CLRSPC_FAM_YCBCR: return JCS_YCbCr; break; case JAS_CLRSPC_FAM_GRAY: return JCS_GRAYSCALE; break; default: abort(); break; } } /* Parse the encoder options string. */ static int jpg_parseencopts(char *optstr, jpg_encopts_t *encopts) { jas_tvparser_t *tvp; char *qual_str; int ret; tvp = 0; /* Initialize default values for encoder options. */ encopts->qual = -1; /* Create the tag-value parser. */ if (!(tvp = jas_tvparser_create(optstr ? optstr : ""))) { goto error; } /* Get tag-value pairs, and process as necessary. */ while (!(ret = jas_tvparser_next(tvp))) { switch (jas_taginfo_nonull(jas_taginfos_lookup(jpg_opttab, jas_tvparser_gettag(tvp)))->id) { case OPT_QUAL: qual_str = jas_tvparser_getval(tvp); if (sscanf(qual_str, "%d", &encopts->qual) != 1) { jas_eprintf("ignoring bad quality specifier %s\n", jas_tvparser_getval(tvp)); encopts->qual = -1; } break; default: jas_eprintf("warning: ignoring invalid option %s\n", jas_tvparser_gettag(tvp)); break; } } if (ret < 0) { goto error; } /* Destroy the tag-value parser. */ jas_tvparser_destroy(tvp); return 0; error: if (tvp) { jas_tvparser_destroy(tvp); } return -1; } jasper-1.900.1/src/libjasper/jpg/README0000644000175000017500000000055110554235550016343 0ustar ernieernieThis directory contains code to support the JPEG image format. In order for the code in this directory to be useful, the free JPEG library from the Independent JPEG Group (IJG) is needed. For legal reasons, the IJG JPEG software is not included in the JasPer software distribution. The IJG JPEG software can be obtained, however, from: http://www.ijg.org jasper-1.900.1/src/libjasper/jpg/jpg_enc.h0000644000175000017500000000611210554235550017240 0ustar ernieernie/* * Copyright (c) 2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JPG_ENC_H #define JPG_ENC_H typedef struct { int numcmpts; int cmpts[4]; } jpg_enc_t; #endif jasper-1.900.1/src/libjasper/jpg/jpg_cod.h0000644000175000017500000000671310554235550017247 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JPG Format Library * * $Id$ */ #ifndef JPG_COD_H #define JPG_COD_H /******************************************************************************\ * Includes. \******************************************************************************/ /******************************************************************************\ * Constants. \******************************************************************************/ #define JPG_MAGIC 0xffd8 #define JPG_MAGICLEN 2 #endif jasper-1.900.1/src/libjasper/jpg/jpg_val.c0000644000175000017500000001021210554235550017244 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jpg_cod.h" /******************************************************************************\ * Code for validate operation. \******************************************************************************/ int jpg_validate(jas_stream_t *in) { uchar buf[JPG_MAGICLEN]; int i; int n; assert(JAS_STREAM_MAXPUTBACK >= JPG_MAGICLEN); /* Read the validation data (i.e., the data used for detecting the format). */ if ((n = jas_stream_read(in, buf, JPG_MAGICLEN)) < 0) { return -1; } /* Put the validation data back onto the stream, so that the stream position will not be changed. */ for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } /* Did we read enough data? */ if (n < JPG_MAGICLEN) { return -1; } /* Does this look like JPEG? */ if (buf[0] != (JPG_MAGIC >> 8) || buf[1] != (JPG_MAGIC & 0xff)) { return -1; } return 0; } jasper-1.900.1/src/libjasper/jpg/jpg_jpeglib.h0000644000175000017500000000655410554235550020121 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JPG_JPEGLIB_H #define JPG_JPEGLIB_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_types.h" /* Note: The jpeglib.h header file does not include definitions of FILE, size_t, etc. */ #include #endif jasper-1.900.1/src/libjasper/jpg/Makefile.am0000644000175000017500000000640310554235550017521 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ EXTRA_DIST = README if HAVE_LIBJPEG MISCSOURCES = jpg_dec.c jpg_enc.c else MISCSOURCES = jpg_dummy.c endif noinst_LTLIBRARIES = libjpg.la libjpg_la_SOURCES = \ jpg_cod.h \ jpg_enc.h \ jpg_jpeglib.h \ $(MISCSOURCES) \ jpg_val.c EXTRA_libjpg_la_SOURCES = \ jpg_dec.c \ jpg_enc.c \ jpg_dummy.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/jpg/jpg_dec.c0000644000175000017500000002415310554235550017226 0ustar ernieernie/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include "jasper/jas_tvp.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_string.h" #include "jpg_jpeglib.h" #include "jpg_cod.h" /******************************************************************************\ * Types. \******************************************************************************/ /* JPEG decoder data sink type. */ typedef struct jpg_dest_s { /* Initialize output. */ void (*start_output)(j_decompress_ptr cinfo, struct jpg_dest_s *dinfo); /* Output rows of decompressed data. */ void (*put_pixel_rows)(j_decompress_ptr cinfo, struct jpg_dest_s *dinfo, JDIMENSION rows_supplied); /* Cleanup output. */ void (*finish_output)(j_decompress_ptr cinfo, struct jpg_dest_s *dinfo); /* Output buffer. */ JSAMPARRAY buffer; /* Height of output buffer. */ JDIMENSION buffer_height; /* The current row. */ JDIMENSION row; /* The image used to hold the decompressed sample data. */ jas_image_t *image; /* The row buffer. */ jas_matrix_t *data; /* The error indicator. If this is nonzero, something has gone wrong during decompression. */ int error; } jpg_dest_t; /******************************************************************************\ * Local functions. \******************************************************************************/ static void jpg_start_output(j_decompress_ptr cinfo, jpg_dest_t *dinfo); static void jpg_put_pixel_rows(j_decompress_ptr cinfo, jpg_dest_t *dinfo, JDIMENSION rows_supplied); static void jpg_finish_output(j_decompress_ptr cinfo, jpg_dest_t *dinfo); static int jpg_copystreamtofile(FILE *out, jas_stream_t *in); static jas_image_t *jpg_mkimage(j_decompress_ptr cinfo); /******************************************************************************\ * Code for load operation. \******************************************************************************/ /* Load an image from a stream in the JPG format. */ jas_image_t *jpg_decode(jas_stream_t *in, char *optstr) { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; FILE *input_file; jpg_dest_t dest_mgr_buf; jpg_dest_t *dest_mgr = &dest_mgr_buf; int num_scanlines; jas_image_t *image; /* Avoid compiler warnings about unused parameters. */ optstr = 0; image = 0; input_file = 0; if (!(input_file = tmpfile())) { goto error; } if (jpg_copystreamtofile(input_file, in)) { goto error; } rewind(input_file); /* Allocate and initialize a JPEG decompression object. */ cinfo.err = jpeg_std_error(&jerr); jpeg_create_decompress(&cinfo); /* Specify the data source for decompression. */ jpeg_stdio_src(&cinfo, input_file); /* Read the file header to obtain the image information. */ jpeg_read_header(&cinfo, TRUE); /* Start the decompressor. */ jpeg_start_decompress(&cinfo); /* Create an image object to hold the decoded data. */ if (!(image = jpg_mkimage(&cinfo))) { goto error; } /* Initialize the data sink object. */ dest_mgr->image = image; dest_mgr->data = jas_matrix_create(1, cinfo.output_width); dest_mgr->start_output = jpg_start_output; dest_mgr->put_pixel_rows = jpg_put_pixel_rows; dest_mgr->finish_output = jpg_finish_output; dest_mgr->buffer = (*cinfo.mem->alloc_sarray) ((j_common_ptr) &cinfo, JPOOL_IMAGE, cinfo.output_width * cinfo.output_components, (JDIMENSION) 1); dest_mgr->buffer_height = 1; dest_mgr->error = 0; /* Process the compressed data. */ (*dest_mgr->start_output)(&cinfo, dest_mgr); while (cinfo.output_scanline < cinfo.output_height) { num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, dest_mgr->buffer_height); (*dest_mgr->put_pixel_rows)(&cinfo, dest_mgr, num_scanlines); } (*dest_mgr->finish_output)(&cinfo, dest_mgr); /* Complete the decompression process. */ jpeg_finish_decompress(&cinfo); /* Destroy the JPEG decompression object. */ jpeg_destroy_decompress(&cinfo); jas_matrix_destroy(dest_mgr->data); fclose(input_file); if (dest_mgr->error) { goto error; } return image; error: if (image) { jas_image_destroy(image); } if (input_file) { fclose(input_file); } return 0; } /******************************************************************************\ * \******************************************************************************/ static jas_image_t *jpg_mkimage(j_decompress_ptr cinfo) { jas_image_t *image; int cmptno; jas_image_cmptparm_t cmptparm; int numcmpts; image = 0; numcmpts = cinfo->output_components; if (!(image = jas_image_create0())) { goto error; } for (cmptno = 0; cmptno < numcmpts; ++cmptno) { cmptparm.tlx = 0; cmptparm.tly = 0; cmptparm.hstep = 1; cmptparm.vstep = 1; cmptparm.width = cinfo->image_width; cmptparm.height = cinfo->image_height; cmptparm.prec = 8; cmptparm.sgnd = false; if (jas_image_addcmpt(image, cmptno, &cmptparm)) { goto error; } } if (numcmpts == 3) { jas_image_setclrspc(image, JAS_CLRSPC_SRGB); jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); jas_image_setcmpttype(image, 1, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); jas_image_setcmpttype(image, 2, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); } else { jas_image_setclrspc(image, JAS_CLRSPC_SGRAY); jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); } return image; error: if (image) { jas_image_destroy(image); } return 0; } /******************************************************************************\ * Data source code. \******************************************************************************/ static int jpg_copystreamtofile(FILE *out, jas_stream_t *in) { int c; while ((c = jas_stream_getc(in)) != EOF) { if (fputc(c, out) == EOF) { return -1; } } if (jas_stream_error(in)) { return -1; } return 0; } /******************************************************************************\ * Data sink code. \******************************************************************************/ static void jpg_start_output(j_decompress_ptr cinfo, jpg_dest_t *dinfo) { /* Avoid compiler warnings about unused parameters. */ cinfo = 0; dinfo->row = 0; } static void jpg_put_pixel_rows(j_decompress_ptr cinfo, jpg_dest_t *dinfo, JDIMENSION rows_supplied) { JSAMPLE *bufptr; int cmptno; JDIMENSION x; uint_fast32_t width; if (dinfo->error) { return; } assert(cinfo->output_components == jas_image_numcmpts(dinfo->image)); for (cmptno = 0; cmptno < cinfo->output_components; ++cmptno) { width = jas_image_cmptwidth(dinfo->image, cmptno); bufptr = (dinfo->buffer[0]) + cmptno; for (x = 0; x < width; ++x) { jas_matrix_set(dinfo->data, 0, x, GETJSAMPLE(*bufptr)); bufptr += cinfo->output_components; } if (jas_image_writecmpt(dinfo->image, cmptno, 0, dinfo->row, width, 1, dinfo->data)) { dinfo->error = 1; } } dinfo->row += rows_supplied; } static void jpg_finish_output(j_decompress_ptr cinfo, jpg_dest_t *dinfo) { /* Avoid compiler warnings about unused parameters. */ cinfo = 0; dinfo = 0; } jasper-1.900.1/src/libjasper/jp2/0000755000175000017500000000000010554237065015400 5ustar ernieerniejasper-1.900.1/src/libjasper/jp2/Makefile.in0000644000175000017500000004105110554237046017445 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/jp2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libjp2_la_LIBADD = am_libjp2_la_OBJECTS = jp2_cod.lo jp2_dec.lo jp2_enc.lo libjp2_la_OBJECTS = $(am_libjp2_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libjp2_la_SOURCES) DIST_SOURCES = $(libjp2_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ noinst_LTLIBRARIES = libjp2.la libjp2_la_SOURCES = \ jp2_cod.h \ jp2_dec.h \ jp2_cod.c \ jp2_dec.c \ jp2_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/jp2/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/jp2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjp2.la: $(libjp2_la_OBJECTS) $(libjp2_la_DEPENDENCIES) $(LINK) $(libjp2_la_LDFLAGS) $(libjp2_la_OBJECTS) $(libjp2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jp2_cod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jp2_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jp2_enc.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/jp2/jp2_dec.c0000644000175000017500000003763610554235551017067 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JP2 Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_image.h" #include "jasper/jas_stream.h" #include "jasper/jas_math.h" #include "jasper/jas_debug.h" #include "jasper/jas_malloc.h" #include "jasper/jas_version.h" #include "jp2_cod.h" #include "jp2_dec.h" #define JP2_VALIDATELEN (JAS_MIN(JP2_JP_LEN + 16, JAS_STREAM_MAXPUTBACK)) static jp2_dec_t *jp2_dec_create(void); static void jp2_dec_destroy(jp2_dec_t *dec); static int jp2_getcs(jp2_colr_t *colr); static int fromiccpcs(int cs); static int jp2_getct(int colorspace, int type, int assoc); /******************************************************************************\ * Functions. \******************************************************************************/ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) { jp2_box_t *box; int found; jas_image_t *image; jp2_dec_t *dec; bool samedtype; int dtype; unsigned int i; jp2_cmap_t *cmapd; jp2_pclr_t *pclrd; jp2_cdef_t *cdefd; unsigned int channo; int newcmptno; int_fast32_t *lutents; #if 0 jp2_cdefchan_t *cdefent; int cmptno; #endif jp2_cmapent_t *cmapent; jas_icchdr_t icchdr; jas_iccprof_t *iccprof; dec = 0; box = 0; image = 0; if (!(dec = jp2_dec_create())) { goto error; } /* Get the first box. This should be a JP box. */ if (!(box = jp2_box_get(in))) { jas_eprintf("error: cannot get box\n"); goto error; } if (box->type != JP2_BOX_JP) { jas_eprintf("error: expecting signature box\n"); goto error; } if (box->data.jp.magic != JP2_JP_MAGIC) { jas_eprintf("incorrect magic number\n"); goto error; } jp2_box_destroy(box); box = 0; /* Get the second box. This should be a FTYP box. */ if (!(box = jp2_box_get(in))) { goto error; } if (box->type != JP2_BOX_FTYP) { jas_eprintf("expecting file type box\n"); goto error; } jp2_box_destroy(box); box = 0; /* Get more boxes... */ found = 0; while ((box = jp2_box_get(in))) { if (jas_getdbglevel() >= 1) { jas_eprintf("box type %s\n", box->info->name); } switch (box->type) { case JP2_BOX_JP2C: found = 1; break; case JP2_BOX_IHDR: if (!dec->ihdr) { dec->ihdr = box; box = 0; } break; case JP2_BOX_BPCC: if (!dec->bpcc) { dec->bpcc = box; box = 0; } break; case JP2_BOX_CDEF: if (!dec->cdef) { dec->cdef = box; box = 0; } break; case JP2_BOX_PCLR: if (!dec->pclr) { dec->pclr = box; box = 0; } break; case JP2_BOX_CMAP: if (!dec->cmap) { dec->cmap = box; box = 0; } break; case JP2_BOX_COLR: if (!dec->colr) { dec->colr = box; box = 0; } break; } if (box) { jp2_box_destroy(box); box = 0; } if (found) { break; } } if (!found) { jas_eprintf("error: no code stream found\n"); goto error; } if (!(dec->image = jpc_decode(in, optstr))) { jas_eprintf("error: cannot decode code stream\n"); goto error; } /* An IHDR box must be present. */ if (!dec->ihdr) { jas_eprintf("error: missing IHDR box\n"); goto error; } /* Does the number of components indicated in the IHDR box match the value specified in the code stream? */ if (dec->ihdr->data.ihdr.numcmpts != JAS_CAST(uint, jas_image_numcmpts(dec->image))) { jas_eprintf("warning: number of components mismatch\n"); } /* At least one component must be present. */ if (!jas_image_numcmpts(dec->image)) { jas_eprintf("error: no components\n"); goto error; } /* Determine if all components have the same data type. */ samedtype = true; dtype = jas_image_cmptdtype(dec->image, 0); for (i = 1; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) { if (jas_image_cmptdtype(dec->image, i) != dtype) { samedtype = false; break; } } /* Is the component data type indicated in the IHDR box consistent with the data in the code stream? */ if ((samedtype && dec->ihdr->data.ihdr.bpc != JP2_DTYPETOBPC(dtype)) || (!samedtype && dec->ihdr->data.ihdr.bpc != JP2_IHDR_BPCNULL)) { jas_eprintf("warning: component data type mismatch\n"); } /* Is the compression type supported? */ if (dec->ihdr->data.ihdr.comptype != JP2_IHDR_COMPTYPE) { jas_eprintf("error: unsupported compression type\n"); goto error; } if (dec->bpcc) { /* Is the number of components indicated in the BPCC box consistent with the code stream data? */ if (dec->bpcc->data.bpcc.numcmpts != JAS_CAST(uint, jas_image_numcmpts( dec->image))) { jas_eprintf("warning: number of components mismatch\n"); } /* Is the component data type information indicated in the BPCC box consistent with the code stream data? */ if (!samedtype) { for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) { if (jas_image_cmptdtype(dec->image, i) != JP2_BPCTODTYPE(dec->bpcc->data.bpcc.bpcs[i])) { jas_eprintf("warning: component data type mismatch\n"); } } } else { jas_eprintf("warning: superfluous BPCC box\n"); } } /* A COLR box must be present. */ if (!dec->colr) { jas_eprintf("error: no COLR box\n"); goto error; } switch (dec->colr->data.colr.method) { case JP2_COLR_ENUM: jas_image_setclrspc(dec->image, jp2_getcs(&dec->colr->data.colr)); break; case JP2_COLR_ICC: iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp, dec->colr->data.colr.iccplen); assert(iccprof); jas_iccprof_gethdr(iccprof, &icchdr); jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc); jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc)); dec->image->cmprof_ = jas_cmprof_createfromiccprof(iccprof); assert(dec->image->cmprof_); jas_iccprof_destroy(iccprof); break; } /* If a CMAP box is present, a PCLR box must also be present. */ if (dec->cmap && !dec->pclr) { jas_eprintf("warning: missing PCLR box or superfluous CMAP box\n"); jp2_box_destroy(dec->cmap); dec->cmap = 0; } /* If a CMAP box is not present, a PCLR box must not be present. */ if (!dec->cmap && dec->pclr) { jas_eprintf("warning: missing CMAP box or superfluous PCLR box\n"); jp2_box_destroy(dec->pclr); dec->pclr = 0; } /* Determine the number of channels (which is essentially the number of components after any palette mappings have been applied). */ dec->numchans = dec->cmap ? dec->cmap->data.cmap.numchans : JAS_CAST(uint, jas_image_numcmpts(dec->image)); /* Perform a basic sanity check on the CMAP box if present. */ if (dec->cmap) { for (i = 0; i < dec->numchans; ++i) { /* Is the component number reasonable? */ if (dec->cmap->data.cmap.ents[i].cmptno >= JAS_CAST(uint, jas_image_numcmpts(dec->image))) { jas_eprintf("error: invalid component number in CMAP box\n"); goto error; } /* Is the LUT index reasonable? */ if (dec->cmap->data.cmap.ents[i].pcol >= dec->pclr->data.pclr.numchans) { jas_eprintf("error: invalid CMAP LUT index\n"); goto error; } } } /* Allocate space for the channel-number to component-number LUT. */ if (!(dec->chantocmptlut = jas_malloc(dec->numchans * sizeof(uint_fast16_t)))) { jas_eprintf("error: no memory\n"); goto error; } if (!dec->cmap) { for (i = 0; i < dec->numchans; ++i) { dec->chantocmptlut[i] = i; } } else { cmapd = &dec->cmap->data.cmap; pclrd = &dec->pclr->data.pclr; cdefd = &dec->cdef->data.cdef; for (channo = 0; channo < cmapd->numchans; ++channo) { cmapent = &cmapd->ents[channo]; if (cmapent->map == JP2_CMAP_DIRECT) { dec->chantocmptlut[channo] = channo; } else if (cmapent->map == JP2_CMAP_PALETTE) { lutents = jas_malloc(pclrd->numlutents * sizeof(int_fast32_t)); for (i = 0; i < pclrd->numlutents; ++i) { lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans]; } newcmptno = jas_image_numcmpts(dec->image); jas_image_depalettize(dec->image, cmapent->cmptno, pclrd->numlutents, lutents, JP2_BPCTODTYPE(pclrd->bpc[cmapent->pcol]), newcmptno); dec->chantocmptlut[channo] = newcmptno; jas_free(lutents); #if 0 if (dec->cdef) { cdefent = jp2_cdef_lookup(cdefd, channo); if (!cdefent) { abort(); } jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), cdefent->type, cdefent->assoc)); } else { jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), 0, channo + 1)); } #endif } } } /* Mark all components as being of unknown type. */ for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) { jas_image_setcmpttype(dec->image, i, JAS_IMAGE_CT_UNKNOWN); } /* Determine the type of each component. */ if (dec->cdef) { for (i = 0; i < dec->numchans; ++i) { jas_image_setcmpttype(dec->image, dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo], jp2_getct(jas_image_clrspc(dec->image), dec->cdef->data.cdef.ents[i].type, dec->cdef->data.cdef.ents[i].assoc)); } } else { for (i = 0; i < dec->numchans; ++i) { jas_image_setcmpttype(dec->image, dec->chantocmptlut[i], jp2_getct(jas_image_clrspc(dec->image), 0, i + 1)); } } /* Delete any components that are not of interest. */ for (i = jas_image_numcmpts(dec->image); i > 0; --i) { if (jas_image_cmpttype(dec->image, i - 1) == JAS_IMAGE_CT_UNKNOWN) { jas_image_delcmpt(dec->image, i - 1); } } /* Ensure that some components survived. */ if (!jas_image_numcmpts(dec->image)) { jas_eprintf("error: no components\n"); goto error; } #if 0 jas_eprintf("no of components is %d\n", jas_image_numcmpts(dec->image)); #endif /* Prevent the image from being destroyed later. */ image = dec->image; dec->image = 0; jp2_dec_destroy(dec); return image; error: if (box) { jp2_box_destroy(box); } if (dec) { jp2_dec_destroy(dec); } return 0; } int jp2_validate(jas_stream_t *in) { char buf[JP2_VALIDATELEN]; int i; int n; #if 0 jas_stream_t *tmpstream; jp2_box_t *box; #endif assert(JAS_STREAM_MAXPUTBACK >= JP2_VALIDATELEN); /* Read the validation data (i.e., the data used for detecting the format). */ if ((n = jas_stream_read(in, buf, JP2_VALIDATELEN)) < 0) { return -1; } /* Put the validation data back onto the stream, so that the stream position will not be changed. */ for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } /* Did we read enough data? */ if (n < JP2_VALIDATELEN) { return -1; } /* Is the box type correct? */ if (((buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]) != JP2_BOX_JP) { return -1; } return 0; } static jp2_dec_t *jp2_dec_create(void) { jp2_dec_t *dec; if (!(dec = jas_malloc(sizeof(jp2_dec_t)))) { return 0; } dec->ihdr = 0; dec->bpcc = 0; dec->cdef = 0; dec->pclr = 0; dec->image = 0; dec->chantocmptlut = 0; dec->cmap = 0; dec->colr = 0; return dec; } static void jp2_dec_destroy(jp2_dec_t *dec) { if (dec->ihdr) { jp2_box_destroy(dec->ihdr); } if (dec->bpcc) { jp2_box_destroy(dec->bpcc); } if (dec->cdef) { jp2_box_destroy(dec->cdef); } if (dec->pclr) { jp2_box_destroy(dec->pclr); } if (dec->image) { jas_image_destroy(dec->image); } if (dec->cmap) { jp2_box_destroy(dec->cmap); } if (dec->colr) { jp2_box_destroy(dec->colr); } if (dec->chantocmptlut) { jas_free(dec->chantocmptlut); } jas_free(dec); } static int jp2_getct(int colorspace, int type, int assoc) { if (type == 1 && assoc == 0) { return JAS_IMAGE_CT_OPACITY; } if (type == 0 && assoc >= 1 && assoc <= 65534) { switch (colorspace) { case JAS_CLRSPC_FAM_RGB: switch (assoc) { case JP2_CDEF_RGB_R: return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R); break; case JP2_CDEF_RGB_G: return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G); break; case JP2_CDEF_RGB_B: return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B); break; } break; case JAS_CLRSPC_FAM_YCBCR: switch (assoc) { case JP2_CDEF_YCBCR_Y: return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y); break; case JP2_CDEF_YCBCR_CB: return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB); break; case JP2_CDEF_YCBCR_CR: return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR); break; } break; case JAS_CLRSPC_FAM_GRAY: switch (assoc) { case JP2_CDEF_GRAY_Y: return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y); break; } break; default: return JAS_IMAGE_CT_COLOR(assoc - 1); break; } } return JAS_IMAGE_CT_UNKNOWN; } static int jp2_getcs(jp2_colr_t *colr) { if (colr->method == JP2_COLR_ENUM) { switch (colr->csid) { case JP2_COLR_SRGB: return JAS_CLRSPC_SRGB; break; case JP2_COLR_SYCC: return JAS_CLRSPC_SYCBCR; break; case JP2_COLR_SGRAY: return JAS_CLRSPC_SGRAY; break; } } return JAS_CLRSPC_UNKNOWN; } static int fromiccpcs(int cs) { switch (cs) { case ICC_CS_RGB: return JAS_CLRSPC_GENRGB; break; case ICC_CS_YCBCR: return JAS_CLRSPC_GENYCBCR; break; case ICC_CS_GRAY: return JAS_CLRSPC_GENGRAY; break; } return JAS_CLRSPC_UNKNOWN; } jasper-1.900.1/src/libjasper/jp2/jp2_dec.h0000644000175000017500000000663110554235551017063 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JP2_DEC_H #define JP2_DEC_H #include "jasper/jas_image.h" #include "jasper/jas_stream.h" #include "jp2_cod.h" typedef struct { jp2_box_t *pclr; jp2_box_t *cdef; jp2_box_t *ihdr; jp2_box_t *bpcc; jp2_box_t *cmap; jp2_box_t *colr; jas_image_t *image; uint_fast16_t numchans; uint_fast16_t *chantocmptlut; } jp2_dec_t; #endif jasper-1.900.1/src/libjasper/jp2/jp2_cod.h0000644000175000017500000002117710554235551017077 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JP2 Library * * $Id$ */ #ifndef JP2_COD_H #define JP2_COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" /******************************************************************************\ * Macros. \******************************************************************************/ #define JP2_SPTOBPC(s, p) \ ((((p) - 1) & 0x7f) | (((s) & 1) << 7)) /******************************************************************************\ * Box class. \******************************************************************************/ #define JP2_BOX_HDRLEN(ext) ((ext) ? 16 : 8) /* Box types. */ #define JP2_BOX_JP 0x6a502020 /* Signature */ #define JP2_BOX_FTYP 0x66747970 /* File Type */ #define JP2_BOX_JP2H 0x6a703268 /* JP2 Header */ #define JP2_BOX_IHDR 0x69686472 /* Image Header */ #define JP2_BOX_BPCC 0x62706363 /* Bits Per Component */ #define JP2_BOX_COLR 0x636f6c72 /* Color Specification */ #define JP2_BOX_PCLR 0x70636c72 /* Palette */ #define JP2_BOX_CMAP 0x636d6170 /* Component Mapping */ #define JP2_BOX_CDEF 0x63646566 /* Channel Definition */ #define JP2_BOX_RES 0x72657320 /* Resolution */ #define JP2_BOX_RESC 0x72657363 /* Capture Resolution */ #define JP2_BOX_RESD 0x72657364 /* Default Display Resolution */ #define JP2_BOX_JP2C 0x6a703263 /* Contiguous Code Stream */ #define JP2_BOX_JP2I 0x6a703269 /* Intellectual Property */ #define JP2_BOX_XML 0x786d6c20 /* XML */ #define JP2_BOX_UUID 0x75756964 /* UUID */ #define JP2_BOX_UINF 0x75696e66 /* UUID Info */ #define JP2_BOX_ULST 0x75637374 /* UUID List */ #define JP2_BOX_URL 0x75726c20 /* URL */ #define JP2_BOX_SUPER 0x01 #define JP2_BOX_NODATA 0x02 /* JP box data. */ #define JP2_JP_MAGIC 0x0d0a870a #define JP2_JP_LEN 12 typedef struct { uint_fast32_t magic; } jp2_jp_t; /* FTYP box data. */ #define JP2_FTYP_MAXCOMPATCODES 32 #define JP2_FTYP_MAJVER 0x6a703220 #define JP2_FTYP_MINVER 0 #define JP2_FTYP_COMPATCODE JP2_FTYP_MAJVER typedef struct { uint_fast32_t majver; uint_fast32_t minver; uint_fast32_t numcompatcodes; uint_fast32_t compatcodes[JP2_FTYP_MAXCOMPATCODES]; } jp2_ftyp_t; /* IHDR box data. */ #define JP2_IHDR_COMPTYPE 7 #define JP2_IHDR_BPCNULL 255 typedef struct { uint_fast32_t width; uint_fast32_t height; uint_fast16_t numcmpts; uint_fast8_t bpc; uint_fast8_t comptype; uint_fast8_t csunk; uint_fast8_t ipr; } jp2_ihdr_t; /* BPCC box data. */ typedef struct { uint_fast16_t numcmpts; uint_fast8_t *bpcs; } jp2_bpcc_t; /* COLR box data. */ #define JP2_COLR_ENUM 1 #define JP2_COLR_ICC 2 #define JP2_COLR_PRI 0 #define JP2_COLR_SRGB 16 #define JP2_COLR_SGRAY 17 #define JP2_COLR_SYCC 18 typedef struct { uint_fast8_t method; uint_fast8_t pri; uint_fast8_t approx; uint_fast32_t csid; uint_fast8_t *iccp; int iccplen; /* XXX - Someday we ought to add ICC profile data here. */ } jp2_colr_t; /* PCLR box data. */ typedef struct { uint_fast16_t numlutents; uint_fast8_t numchans; int_fast32_t *lutdata; uint_fast8_t *bpc; } jp2_pclr_t; /* CDEF box per-channel data. */ #define JP2_CDEF_RGB_R 1 #define JP2_CDEF_RGB_G 2 #define JP2_CDEF_RGB_B 3 #define JP2_CDEF_YCBCR_Y 1 #define JP2_CDEF_YCBCR_CB 2 #define JP2_CDEF_YCBCR_CR 3 #define JP2_CDEF_GRAY_Y 1 #define JP2_CDEF_TYPE_COLOR 0 #define JP2_CDEF_TYPE_OPACITY 1 #define JP2_CDEF_TYPE_UNSPEC 65535 #define JP2_CDEF_ASOC_ALL 0 #define JP2_CDEF_ASOC_NONE 65535 typedef struct { uint_fast16_t channo; uint_fast16_t type; uint_fast16_t assoc; } jp2_cdefchan_t; /* CDEF box data. */ typedef struct { uint_fast16_t numchans; jp2_cdefchan_t *ents; } jp2_cdef_t; typedef struct { uint_fast16_t cmptno; uint_fast8_t map; uint_fast8_t pcol; } jp2_cmapent_t; typedef struct { uint_fast16_t numchans; jp2_cmapent_t *ents; } jp2_cmap_t; #define JP2_CMAP_DIRECT 0 #define JP2_CMAP_PALETTE 1 /* Generic box. */ struct jp2_boxops_s; typedef struct { struct jp2_boxops_s *ops; struct jp2_boxinfo_s *info; uint_fast32_t type; /* The length of the box including the (variable-length) header. */ uint_fast32_t len; /* The length of the box data. */ uint_fast32_t datalen; union { jp2_jp_t jp; jp2_ftyp_t ftyp; jp2_ihdr_t ihdr; jp2_bpcc_t bpcc; jp2_colr_t colr; jp2_pclr_t pclr; jp2_cdef_t cdef; jp2_cmap_t cmap; } data; } jp2_box_t; typedef struct jp2_boxops_s { void (*init)(jp2_box_t *box); void (*destroy)(jp2_box_t *box); int (*getdata)(jp2_box_t *box, jas_stream_t *in); int (*putdata)(jp2_box_t *box, jas_stream_t *out); void (*dumpdata)(jp2_box_t *box, FILE *out); } jp2_boxops_t; /******************************************************************************\ * \******************************************************************************/ typedef struct jp2_boxinfo_s { int type; char *name; int flags; jp2_boxops_t ops; } jp2_boxinfo_t; /******************************************************************************\ * Box class. \******************************************************************************/ jp2_box_t *jp2_box_create(int type); void jp2_box_destroy(jp2_box_t *box); jp2_box_t *jp2_box_get(jas_stream_t *in); int jp2_box_put(jp2_box_t *box, jas_stream_t *out); #define JP2_DTYPETOBPC(dtype) \ ((JAS_IMAGE_CDT_GETSGND(dtype) << 7) | (JAS_IMAGE_CDT_GETPREC(dtype) - 1)) #define JP2_BPCTODTYPE(bpc) \ (JAS_IMAGE_CDT_SETSGND(bpc >> 7) | JAS_IMAGE_CDT_SETPREC((bpc & 0x7f) + 1)) #define ICC_CS_RGB 0x52474220 #define ICC_CS_YCBCR 0x59436272 #define ICC_CS_GRAY 0x47524159 jp2_cdefchan_t *jp2_cdef_lookup(jp2_cdef_t *cdef, int channo); #endif jasper-1.900.1/src/libjasper/jp2/Makefile.am0000644000175000017500000000611210554235551017432 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ noinst_LTLIBRARIES = libjp2.la libjp2_la_SOURCES = \ jp2_cod.h \ jp2_dec.h \ jp2_cod.c \ jp2_dec.c \ jp2_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/jp2/jp2_enc.c0000644000175000017500000002644110554235551017071 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JP2 Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_malloc.h" #include "jasper/jas_image.h" #include "jasper/jas_stream.h" #include "jasper/jas_cm.h" #include "jasper/jas_icc.h" #include "jp2_cod.h" static uint_fast32_t jp2_gettypeasoc(int colorspace, int ctype); static int clrspctojp2(jas_clrspc_t clrspc); /******************************************************************************\ * Functions. \******************************************************************************/ int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { jp2_box_t *box; jp2_ftyp_t *ftyp; jp2_ihdr_t *ihdr; jas_stream_t *tmpstream; int allcmptssame; jp2_bpcc_t *bpcc; long len; uint_fast16_t cmptno; jp2_colr_t *colr; char buf[4096]; uint_fast32_t overhead; jp2_cdefchan_t *cdefchanent; jp2_cdef_t *cdef; int i; uint_fast32_t typeasoc; jas_iccprof_t *iccprof; jas_stream_t *iccstream; int pos; int needcdef; int prec; int sgnd; box = 0; tmpstream = 0; allcmptssame = 1; sgnd = jas_image_cmptsgnd(image, 0); prec = jas_image_cmptprec(image, 0); for (i = 1; i < jas_image_numcmpts(image); ++i) { if (jas_image_cmptsgnd(image, i) != sgnd || jas_image_cmptprec(image, i) != prec) { allcmptssame = 0; break; } } /* Output the signature box. */ if (!(box = jp2_box_create(JP2_BOX_JP))) { goto error; } box->data.jp.magic = JP2_JP_MAGIC; if (jp2_box_put(box, out)) { goto error; } jp2_box_destroy(box); box = 0; /* Output the file type box. */ if (!(box = jp2_box_create(JP2_BOX_FTYP))) { goto error; } ftyp = &box->data.ftyp; ftyp->majver = JP2_FTYP_MAJVER; ftyp->minver = JP2_FTYP_MINVER; ftyp->numcompatcodes = 1; ftyp->compatcodes[0] = JP2_FTYP_COMPATCODE; if (jp2_box_put(box, out)) { goto error; } jp2_box_destroy(box); box = 0; /* * Generate the data portion of the JP2 header box. * We cannot simply output the header for this box * since we do not yet know the correct value for the length * field. */ if (!(tmpstream = jas_stream_memopen(0, 0))) { goto error; } /* Generate image header box. */ if (!(box = jp2_box_create(JP2_BOX_IHDR))) { goto error; } ihdr = &box->data.ihdr; ihdr->width = jas_image_width(image); ihdr->height = jas_image_height(image); ihdr->numcmpts = jas_image_numcmpts(image); ihdr->bpc = allcmptssame ? JP2_SPTOBPC(jas_image_cmptsgnd(image, 0), jas_image_cmptprec(image, 0)) : JP2_IHDR_BPCNULL; ihdr->comptype = JP2_IHDR_COMPTYPE; ihdr->csunk = 0; ihdr->ipr = 0; if (jp2_box_put(box, tmpstream)) { goto error; } jp2_box_destroy(box); box = 0; /* Generate bits per component box. */ if (!allcmptssame) { if (!(box = jp2_box_create(JP2_BOX_BPCC))) { goto error; } bpcc = &box->data.bpcc; bpcc->numcmpts = jas_image_numcmpts(image); if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) { goto error; } for (cmptno = 0; cmptno < bpcc->numcmpts; ++cmptno) { bpcc->bpcs[cmptno] = JP2_SPTOBPC(jas_image_cmptsgnd(image, cmptno), jas_image_cmptprec(image, cmptno)); } if (jp2_box_put(box, tmpstream)) { goto error; } jp2_box_destroy(box); box = 0; } /* Generate color specification box. */ if (!(box = jp2_box_create(JP2_BOX_COLR))) { goto error; } colr = &box->data.colr; switch (jas_image_clrspc(image)) { case JAS_CLRSPC_SRGB: case JAS_CLRSPC_SYCBCR: case JAS_CLRSPC_SGRAY: colr->method = JP2_COLR_ENUM; colr->csid = clrspctojp2(jas_image_clrspc(image)); colr->pri = JP2_COLR_PRI; colr->approx = 0; break; default: colr->method = JP2_COLR_ICC; colr->pri = JP2_COLR_PRI; colr->approx = 0; iccprof = jas_iccprof_createfromcmprof(jas_image_cmprof(image)); assert(iccprof); iccstream = jas_stream_memopen(0, 0); assert(iccstream); if (jas_iccprof_save(iccprof, iccstream)) abort(); if ((pos = jas_stream_tell(iccstream)) < 0) abort(); colr->iccplen = pos; colr->iccp = jas_malloc(pos); assert(colr->iccp); jas_stream_rewind(iccstream); if (jas_stream_read(iccstream, colr->iccp, colr->iccplen) != colr->iccplen) abort(); jas_stream_close(iccstream); jas_iccprof_destroy(iccprof); break; } if (jp2_box_put(box, tmpstream)) { goto error; } jp2_box_destroy(box); box = 0; needcdef = 1; switch (jas_clrspc_fam(jas_image_clrspc(image))) { case JAS_CLRSPC_FAM_RGB: if (jas_image_cmpttype(image, 0) == JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R) && jas_image_cmpttype(image, 1) == JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G) && jas_image_cmpttype(image, 2) == JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)) needcdef = 0; break; case JAS_CLRSPC_FAM_YCBCR: if (jas_image_cmpttype(image, 0) == JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y) && jas_image_cmpttype(image, 1) == JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB) && jas_image_cmpttype(image, 2) == JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR)) needcdef = 0; break; case JAS_CLRSPC_FAM_GRAY: if (jas_image_cmpttype(image, 0) == JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_GRAY_Y)) needcdef = 0; break; default: abort(); break; } if (needcdef) { if (!(box = jp2_box_create(JP2_BOX_CDEF))) { goto error; } cdef = &box->data.cdef; cdef->numchans = jas_image_numcmpts(image); cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)); for (i = 0; i < jas_image_numcmpts(image); ++i) { cdefchanent = &cdef->ents[i]; cdefchanent->channo = i; typeasoc = jp2_gettypeasoc(jas_image_clrspc(image), jas_image_cmpttype(image, i)); cdefchanent->type = typeasoc >> 16; cdefchanent->assoc = typeasoc & 0x7fff; } if (jp2_box_put(box, tmpstream)) { goto error; } jp2_box_destroy(box); box = 0; } /* Determine the total length of the JP2 header box. */ len = jas_stream_tell(tmpstream); jas_stream_rewind(tmpstream); /* * Output the JP2 header box and all of the boxes which it contains. */ if (!(box = jp2_box_create(JP2_BOX_JP2H))) { goto error; } box->len = len + JP2_BOX_HDRLEN(false); if (jp2_box_put(box, out)) { goto error; } jp2_box_destroy(box); box = 0; if (jas_stream_copy(out, tmpstream, len)) { goto error; } jas_stream_close(tmpstream); tmpstream = 0; /* * Output the contiguous code stream box. */ if (!(box = jp2_box_create(JP2_BOX_JP2C))) { goto error; } box->len = 0; if (jp2_box_put(box, out)) { goto error; } jp2_box_destroy(box); box = 0; /* Output the JPEG-2000 code stream. */ overhead = jas_stream_getrwcount(out); sprintf(buf, "%s\n_jp2overhead=%lu\n", (optstr ? optstr : ""), (unsigned long) overhead); if (jpc_encode(image, out, buf)) { goto error; } return 0; abort(); error: if (box) { jp2_box_destroy(box); } if (tmpstream) { jas_stream_close(tmpstream); } return -1; } static uint_fast32_t jp2_gettypeasoc(int colorspace, int ctype) { int type; int asoc; if (ctype & JAS_IMAGE_CT_OPACITY) { type = JP2_CDEF_TYPE_OPACITY; asoc = JP2_CDEF_ASOC_ALL; goto done; } type = JP2_CDEF_TYPE_UNSPEC; asoc = JP2_CDEF_ASOC_NONE; switch (jas_clrspc_fam(colorspace)) { case JAS_CLRSPC_FAM_RGB: switch (JAS_IMAGE_CT_COLOR(ctype)) { case JAS_IMAGE_CT_RGB_R: type = JP2_CDEF_TYPE_COLOR; asoc = JP2_CDEF_RGB_R; break; case JAS_IMAGE_CT_RGB_G: type = JP2_CDEF_TYPE_COLOR; asoc = JP2_CDEF_RGB_G; break; case JAS_IMAGE_CT_RGB_B: type = JP2_CDEF_TYPE_COLOR; asoc = JP2_CDEF_RGB_B; break; } break; case JAS_CLRSPC_FAM_YCBCR: switch (JAS_IMAGE_CT_COLOR(ctype)) { case JAS_IMAGE_CT_YCBCR_Y: type = JP2_CDEF_TYPE_COLOR; asoc = JP2_CDEF_YCBCR_Y; break; case JAS_IMAGE_CT_YCBCR_CB: type = JP2_CDEF_TYPE_COLOR; asoc = JP2_CDEF_YCBCR_CB; break; case JAS_IMAGE_CT_YCBCR_CR: type = JP2_CDEF_TYPE_COLOR; asoc = JP2_CDEF_YCBCR_CR; break; } break; case JAS_CLRSPC_FAM_GRAY: type = JP2_CDEF_TYPE_COLOR; asoc = JP2_CDEF_GRAY_Y; break; } done: return (type << 16) | asoc; } static int clrspctojp2(jas_clrspc_t clrspc) { switch (clrspc) { case JAS_CLRSPC_SRGB: return JP2_COLR_SRGB; case JAS_CLRSPC_SYCBCR: return JP2_COLR_SYCC; case JAS_CLRSPC_SGRAY: return JP2_COLR_SGRAY; default: abort(); break; } } jasper-1.900.1/src/libjasper/jp2/jp2_cod.c0000644000175000017500000005576210554235551017101 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * JP2 Library * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_stream.h" #include "jasper/jas_malloc.h" #include "jasper/jas_debug.h" #include "jp2_cod.h" /******************************************************************************\ * Function prototypes. \******************************************************************************/ #define ONES(n) ((1 << (n)) - 1) jp2_boxinfo_t *jp2_boxinfolookup(int type); static int jp2_getuint8(jas_stream_t *in, uint_fast8_t *val); static int jp2_getuint16(jas_stream_t *in, uint_fast16_t *val); static int jp2_getuint32(jas_stream_t *in, uint_fast32_t *val); static int jp2_getuint64(jas_stream_t *in, uint_fast64_t *val); static int jp2_putuint8(jas_stream_t *out, uint_fast8_t val); static int jp2_putuint16(jas_stream_t *out, uint_fast16_t val); static int jp2_putuint32(jas_stream_t *out, uint_fast32_t val); static int jp2_putuint64(jas_stream_t *out, uint_fast64_t val); static int jp2_getint(jas_stream_t *in, int s, int n, int_fast32_t *val); jp2_box_t *jp2_box_get(jas_stream_t *in); void jp2_box_dump(jp2_box_t *box, FILE *out); static int jp2_jp_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_jp_putdata(jp2_box_t *box, jas_stream_t *out); static int jp2_ftyp_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_ftyp_putdata(jp2_box_t *box, jas_stream_t *out); static int jp2_ihdr_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_ihdr_putdata(jp2_box_t *box, jas_stream_t *out); static void jp2_bpcc_destroy(jp2_box_t *box); static int jp2_bpcc_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_bpcc_putdata(jp2_box_t *box, jas_stream_t *out); static int jp2_colr_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_colr_putdata(jp2_box_t *box, jas_stream_t *out); static void jp2_colr_dumpdata(jp2_box_t *box, FILE *out); static void jp2_colr_destroy(jp2_box_t *box); static void jp2_cdef_destroy(jp2_box_t *box); static int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_cdef_putdata(jp2_box_t *box, jas_stream_t *out); static void jp2_cdef_dumpdata(jp2_box_t *box, FILE *out); static void jp2_cmap_destroy(jp2_box_t *box); static int jp2_cmap_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_cmap_putdata(jp2_box_t *box, jas_stream_t *out); static void jp2_cmap_dumpdata(jp2_box_t *box, FILE *out); static void jp2_pclr_destroy(jp2_box_t *box); static int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in); static int jp2_pclr_putdata(jp2_box_t *box, jas_stream_t *out); static void jp2_pclr_dumpdata(jp2_box_t *box, FILE *out); /******************************************************************************\ * Local data. \******************************************************************************/ jp2_boxinfo_t jp2_boxinfos[] = { {JP2_BOX_JP, "JP", 0, {0, 0, jp2_jp_getdata, jp2_jp_putdata, 0}}, {JP2_BOX_FTYP, "FTYP", 0, {0, 0, jp2_ftyp_getdata, jp2_ftyp_putdata, 0}}, {JP2_BOX_JP2H, "JP2H", JP2_BOX_SUPER, {0, 0, 0, 0, 0}}, {JP2_BOX_IHDR, "IHDR", 0, {0, 0, jp2_ihdr_getdata, jp2_ihdr_putdata, 0}}, {JP2_BOX_BPCC, "BPCC", 0, {0, jp2_bpcc_destroy, jp2_bpcc_getdata, jp2_bpcc_putdata, 0}}, {JP2_BOX_COLR, "COLR", 0, {0, jp2_colr_destroy, jp2_colr_getdata, jp2_colr_putdata, jp2_colr_dumpdata}}, {JP2_BOX_PCLR, "PCLR", 0, {0, jp2_pclr_destroy, jp2_pclr_getdata, jp2_pclr_putdata, jp2_pclr_dumpdata}}, {JP2_BOX_CMAP, "CMAP", 0, {0, jp2_cmap_destroy, jp2_cmap_getdata, jp2_cmap_putdata, jp2_cmap_dumpdata}}, {JP2_BOX_CDEF, "CDEF", 0, {0, jp2_cdef_destroy, jp2_cdef_getdata, jp2_cdef_putdata, jp2_cdef_dumpdata}}, {JP2_BOX_RES, "RES", JP2_BOX_SUPER, {0, 0, 0, 0, 0}}, {JP2_BOX_RESC, "RESC", 0, {0, 0, 0, 0, 0}}, {JP2_BOX_RESD, "RESD", 0, {0, 0, 0, 0, 0}}, {JP2_BOX_JP2C, "JP2C", JP2_BOX_NODATA, {0, 0, 0, 0, 0}}, {JP2_BOX_JP2I, "JP2I", 0, {0, 0, 0, 0, 0}}, {JP2_BOX_XML, "XML", 0, {0, 0, 0, 0, 0}}, {JP2_BOX_UUID, "UUID", 0, {0, 0, 0, 0, 0}}, {JP2_BOX_UINF, "UINF", JP2_BOX_SUPER, {0, 0, 0, 0, 0}}, {JP2_BOX_ULST, "ULST", 0, {0, 0, 0, 0, 0}}, {JP2_BOX_URL, "URL", 0, {0, 0, 0, 0, 0}}, {0, 0, 0, {0, 0, 0, 0, 0}}, }; jp2_boxinfo_t jp2_boxinfo_unk = { 0, "Unknown", 0, {0, 0, 0, 0, 0} }; /******************************************************************************\ * Box constructor. \******************************************************************************/ jp2_box_t *jp2_box_create(int type) { jp2_box_t *box; jp2_boxinfo_t *boxinfo; if (!(box = jas_malloc(sizeof(jp2_box_t)))) { return 0; } memset(box, 0, sizeof(jp2_box_t)); box->type = type; box->len = 0; if (!(boxinfo = jp2_boxinfolookup(type))) { return 0; } box->info = boxinfo; box->ops = &boxinfo->ops; return box; } /******************************************************************************\ * Box destructor. \******************************************************************************/ void jp2_box_destroy(jp2_box_t *box) { if (box->ops->destroy) { (*box->ops->destroy)(box); } jas_free(box); } static void jp2_bpcc_destroy(jp2_box_t *box) { jp2_bpcc_t *bpcc = &box->data.bpcc; if (bpcc->bpcs) { jas_free(bpcc->bpcs); bpcc->bpcs = 0; } } static void jp2_cdef_destroy(jp2_box_t *box) { jp2_cdef_t *cdef = &box->data.cdef; if (cdef->ents) { jas_free(cdef->ents); cdef->ents = 0; } } /******************************************************************************\ * Box input. \******************************************************************************/ jp2_box_t *jp2_box_get(jas_stream_t *in) { jp2_box_t *box; jp2_boxinfo_t *boxinfo; jas_stream_t *tmpstream; uint_fast32_t len; uint_fast64_t extlen; bool dataflag; box = 0; tmpstream = 0; if (!(box = jas_malloc(sizeof(jp2_box_t)))) { goto error; } box->ops = &jp2_boxinfo_unk.ops; if (jp2_getuint32(in, &len) || jp2_getuint32(in, &box->type)) { goto error; } boxinfo = jp2_boxinfolookup(box->type); box->info = boxinfo; box->ops = &boxinfo->ops; box->len = len; if (box->len == 1) { if (jp2_getuint64(in, &extlen)) { goto error; } if (extlen > 0xffffffffUL) { jas_eprintf("warning: cannot handle large 64-bit box length\n"); extlen = 0xffffffffUL; } box->len = extlen; box->datalen = extlen - JP2_BOX_HDRLEN(true); } else { box->datalen = box->len - JP2_BOX_HDRLEN(false); } if (box->len != 0 && box->len < 8) { goto error; } dataflag = !(box->info->flags & (JP2_BOX_SUPER | JP2_BOX_NODATA)); if (dataflag) { if (!(tmpstream = jas_stream_memopen(0, 0))) { goto error; } if (jas_stream_copy(tmpstream, in, box->datalen)) { jas_eprintf("cannot copy box data\n"); goto error; } jas_stream_rewind(tmpstream); if (box->ops->getdata) { if ((*box->ops->getdata)(box, tmpstream)) { jas_eprintf("cannot parse box data\n"); goto error; } } jas_stream_close(tmpstream); } if (jas_getdbglevel() >= 1) { jp2_box_dump(box, stderr); } return box; abort(); error: if (box) { jp2_box_destroy(box); } if (tmpstream) { jas_stream_close(tmpstream); } return 0; } void jp2_box_dump(jp2_box_t *box, FILE *out) { jp2_boxinfo_t *boxinfo; boxinfo = jp2_boxinfolookup(box->type); assert(boxinfo); fprintf(out, "JP2 box: "); fprintf(out, "type=%c%s%c (0x%08x); length=%d\n", '"', boxinfo->name, '"', box->type, box->len); if (box->ops->dumpdata) { (*box->ops->dumpdata)(box, out); } } static int jp2_jp_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_jp_t *jp = &box->data.jp; if (jp2_getuint32(in, &jp->magic)) { return -1; } return 0; } static int jp2_ftyp_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_ftyp_t *ftyp = &box->data.ftyp; unsigned int i; if (jp2_getuint32(in, &ftyp->majver) || jp2_getuint32(in, &ftyp->minver)) { return -1; } ftyp->numcompatcodes = (box->datalen - 8) / 4; if (ftyp->numcompatcodes > JP2_FTYP_MAXCOMPATCODES) { return -1; } for (i = 0; i < ftyp->numcompatcodes; ++i) { if (jp2_getuint32(in, &ftyp->compatcodes[i])) { return -1; } } return 0; } static int jp2_ihdr_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_ihdr_t *ihdr = &box->data.ihdr; if (jp2_getuint32(in, &ihdr->height) || jp2_getuint32(in, &ihdr->width) || jp2_getuint16(in, &ihdr->numcmpts) || jp2_getuint8(in, &ihdr->bpc) || jp2_getuint8(in, &ihdr->comptype) || jp2_getuint8(in, &ihdr->csunk) || jp2_getuint8(in, &ihdr->ipr)) { return -1; } return 0; } static int jp2_bpcc_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_bpcc_t *bpcc = &box->data.bpcc; unsigned int i; bpcc->numcmpts = box->datalen; if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) { return -1; } for (i = 0; i < bpcc->numcmpts; ++i) { if (jp2_getuint8(in, &bpcc->bpcs[i])) { return -1; } } return 0; } static void jp2_colr_dumpdata(jp2_box_t *box, FILE *out) { jp2_colr_t *colr = &box->data.colr; fprintf(out, "method=%d; pri=%d; approx=%d\n", (int)colr->method, (int)colr->pri, (int)colr->approx); switch (colr->method) { case JP2_COLR_ENUM: fprintf(out, "csid=%d\n", (int)colr->csid); break; case JP2_COLR_ICC: jas_memdump(out, colr->iccp, colr->iccplen); break; } } static int jp2_colr_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_colr_t *colr = &box->data.colr; colr->csid = 0; colr->iccp = 0; colr->iccplen = 0; if (jp2_getuint8(in, &colr->method) || jp2_getuint8(in, &colr->pri) || jp2_getuint8(in, &colr->approx)) { return -1; } switch (colr->method) { case JP2_COLR_ENUM: if (jp2_getuint32(in, &colr->csid)) { return -1; } break; case JP2_COLR_ICC: colr->iccplen = box->datalen - 3; if (!(colr->iccp = jas_malloc(colr->iccplen * sizeof(uint_fast8_t)))) { return -1; } if (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) { return -1; } break; } return 0; } static void jp2_cdef_dumpdata(jp2_box_t *box, FILE *out) { jp2_cdef_t *cdef = &box->data.cdef; unsigned int i; for (i = 0; i < cdef->numchans; ++i) { fprintf(out, "channo=%d; type=%d; assoc=%d\n", cdef->ents[i].channo, cdef->ents[i].type, cdef->ents[i].assoc); } } static void jp2_colr_destroy(jp2_box_t *box) { jp2_colr_t *colr = &box->data.colr; if (colr->iccp) { jas_free(colr->iccp); } } static int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_cdef_t *cdef = &box->data.cdef; jp2_cdefchan_t *chan; unsigned int channo; if (jp2_getuint16(in, &cdef->numchans)) { return -1; } if (!(cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)))) { return -1; } for (channo = 0; channo < cdef->numchans; ++channo) { chan = &cdef->ents[channo]; if (jp2_getuint16(in, &chan->channo) || jp2_getuint16(in, &chan->type) || jp2_getuint16(in, &chan->assoc)) { return -1; } } return 0; } /******************************************************************************\ * Box output. \******************************************************************************/ int jp2_box_put(jp2_box_t *box, jas_stream_t *out) { jas_stream_t *tmpstream; bool extlen; bool dataflag; tmpstream = 0; dataflag = !(box->info->flags & (JP2_BOX_SUPER | JP2_BOX_NODATA)); if (dataflag) { tmpstream = jas_stream_memopen(0, 0); if (box->ops->putdata) { if ((*box->ops->putdata)(box, tmpstream)) { goto error; } } box->len = jas_stream_tell(tmpstream) + JP2_BOX_HDRLEN(false); jas_stream_rewind(tmpstream); } extlen = (box->len >= (((uint_fast64_t)1) << 32)) != 0; if (jp2_putuint32(out, extlen ? 1 : box->len)) { goto error; } if (jp2_putuint32(out, box->type)) { goto error; } if (extlen) { if (jp2_putuint64(out, box->len)) { goto error; } } if (dataflag) { if (jas_stream_copy(out, tmpstream, box->len - JP2_BOX_HDRLEN(false))) { goto error; } jas_stream_close(tmpstream); } return 0; abort(); error: if (tmpstream) { jas_stream_close(tmpstream); } return -1; } static int jp2_jp_putdata(jp2_box_t *box, jas_stream_t *out) { jp2_jp_t *jp = &box->data.jp; if (jp2_putuint32(out, jp->magic)) { return -1; } return 0; } static int jp2_ftyp_putdata(jp2_box_t *box, jas_stream_t *out) { jp2_ftyp_t *ftyp = &box->data.ftyp; unsigned int i; if (jp2_putuint32(out, ftyp->majver) || jp2_putuint32(out, ftyp->minver)) { return -1; } for (i = 0; i < ftyp->numcompatcodes; ++i) { if (jp2_putuint32(out, ftyp->compatcodes[i])) { return -1; } } return 0; } static int jp2_ihdr_putdata(jp2_box_t *box, jas_stream_t *out) { jp2_ihdr_t *ihdr = &box->data.ihdr; if (jp2_putuint32(out, ihdr->height) || jp2_putuint32(out, ihdr->width) || jp2_putuint16(out, ihdr->numcmpts) || jp2_putuint8(out, ihdr->bpc) || jp2_putuint8(out, ihdr->comptype) || jp2_putuint8(out, ihdr->csunk) || jp2_putuint8(out, ihdr->ipr)) { return -1; } return 0; } static int jp2_bpcc_putdata(jp2_box_t *box, jas_stream_t *out) { jp2_bpcc_t *bpcc = &box->data.bpcc; unsigned int i; for (i = 0; i < bpcc->numcmpts; ++i) { if (jp2_putuint8(out, bpcc->bpcs[i])) { return -1; } } return 0; } static int jp2_colr_putdata(jp2_box_t *box, jas_stream_t *out) { jp2_colr_t *colr = &box->data.colr; if (jp2_putuint8(out, colr->method) || jp2_putuint8(out, colr->pri) || jp2_putuint8(out, colr->approx)) { return -1; } switch (colr->method) { case JP2_COLR_ENUM: if (jp2_putuint32(out, colr->csid)) { return -1; } break; case JP2_COLR_ICC: if (jas_stream_write(out, colr->iccp, JAS_CAST(int, colr->iccplen)) != JAS_CAST(int, colr->iccplen)) return -1; break; } return 0; } static int jp2_cdef_putdata(jp2_box_t *box, jas_stream_t *out) { jp2_cdef_t *cdef = &box->data.cdef; unsigned int i; jp2_cdefchan_t *ent; if (jp2_putuint16(out, cdef->numchans)) { return -1; } for (i = 0; i < cdef->numchans; ++i) { ent = &cdef->ents[i]; if (jp2_putuint16(out, ent->channo) || jp2_putuint16(out, ent->type) || jp2_putuint16(out, ent->assoc)) { return -1; } } return 0; } /******************************************************************************\ * Input operations for primitive types. \******************************************************************************/ static int jp2_getuint8(jas_stream_t *in, uint_fast8_t *val) { int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } if (val) { *val = c; } return 0; } static int jp2_getuint16(jas_stream_t *in, uint_fast16_t *val) { uint_fast16_t v; int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if (val) { *val = v; } return 0; } static int jp2_getuint32(jas_stream_t *in, uint_fast32_t *val) { uint_fast32_t v; int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; if (val) { *val = v; } return 0; } static int jp2_getuint64(jas_stream_t *in, uint_fast64_t *val) { uint_fast64_t tmpval; int i; int c; tmpval = 0; for (i = 0; i < 8; ++i) { tmpval <<= 8; if ((c = jas_stream_getc(in)) == EOF) { return -1; } tmpval |= (c & 0xff); } *val = tmpval; return 0; } /******************************************************************************\ * Output operations for primitive types. \******************************************************************************/ static int jp2_putuint8(jas_stream_t *out, uint_fast8_t val) { if (jas_stream_putc(out, val & 0xff) == EOF) { return -1; } return 0; } static int jp2_putuint16(jas_stream_t *out, uint_fast16_t val) { if (jas_stream_putc(out, (val >> 8) & 0xff) == EOF || jas_stream_putc(out, val & 0xff) == EOF) { return -1; } return 0; } static int jp2_putuint32(jas_stream_t *out, uint_fast32_t val) { if (jas_stream_putc(out, (val >> 24) & 0xff) == EOF || jas_stream_putc(out, (val >> 16) & 0xff) == EOF || jas_stream_putc(out, (val >> 8) & 0xff) == EOF || jas_stream_putc(out, val & 0xff) == EOF) { return -1; } return 0; } static int jp2_putuint64(jas_stream_t *out, uint_fast64_t val) { if (jp2_putuint32(out, (val >> 32) & 0xffffffffUL) || jp2_putuint32(out, val & 0xffffffffUL)) { return -1; } return 0; } /******************************************************************************\ * Miscellaneous code. \******************************************************************************/ jp2_boxinfo_t *jp2_boxinfolookup(int type) { jp2_boxinfo_t *boxinfo; for (boxinfo = jp2_boxinfos; boxinfo->name; ++boxinfo) { if (boxinfo->type == type) { return boxinfo; } } return &jp2_boxinfo_unk; } static void jp2_cmap_destroy(jp2_box_t *box) { jp2_cmap_t *cmap = &box->data.cmap; if (cmap->ents) { jas_free(cmap->ents); } } static int jp2_cmap_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_cmap_t *cmap = &box->data.cmap; jp2_cmapent_t *ent; unsigned int i; cmap->numchans = (box->datalen) / 4; if (!(cmap->ents = jas_malloc(cmap->numchans * sizeof(jp2_cmapent_t)))) { return -1; } for (i = 0; i < cmap->numchans; ++i) { ent = &cmap->ents[i]; if (jp2_getuint16(in, &ent->cmptno) || jp2_getuint8(in, &ent->map) || jp2_getuint8(in, &ent->pcol)) { return -1; } } return 0; } static int jp2_cmap_putdata(jp2_box_t *box, jas_stream_t *out) { /* Eliminate compiler warning about unused variables. */ box = 0; out = 0; return -1; } static void jp2_cmap_dumpdata(jp2_box_t *box, FILE *out) { jp2_cmap_t *cmap = &box->data.cmap; unsigned int i; jp2_cmapent_t *ent; fprintf(out, "numchans = %d\n", (int) cmap->numchans); for (i = 0; i < cmap->numchans; ++i) { ent = &cmap->ents[i]; fprintf(out, "cmptno=%d; map=%d; pcol=%d\n", (int) ent->cmptno, (int) ent->map, (int) ent->pcol); } } static void jp2_pclr_destroy(jp2_box_t *box) { jp2_pclr_t *pclr = &box->data.pclr; if (pclr->lutdata) { jas_free(pclr->lutdata); } if (pclr->bpc) jas_free(pclr->bpc); } static int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_pclr_t *pclr = &box->data.pclr; int lutsize; unsigned int i; unsigned int j; int_fast32_t x; pclr->lutdata = 0; if (jp2_getuint16(in, &pclr->numlutents) || jp2_getuint8(in, &pclr->numchans)) { return -1; } lutsize = pclr->numlutents * pclr->numchans; if (!(pclr->lutdata = jas_malloc(lutsize * sizeof(int_fast32_t)))) { return -1; } if (!(pclr->bpc = jas_malloc(pclr->numchans * sizeof(uint_fast8_t)))) { return -1; } for (i = 0; i < pclr->numchans; ++i) { if (jp2_getuint8(in, &pclr->bpc[i])) { return -1; } } for (i = 0; i < pclr->numlutents; ++i) { for (j = 0; j < pclr->numchans; ++j) { if (jp2_getint(in, (pclr->bpc[j] & 0x80) != 0, (pclr->bpc[j] & 0x7f) + 1, &x)) { return -1; } pclr->lutdata[i * pclr->numchans + j] = x; } } return 0; } static int jp2_pclr_putdata(jp2_box_t *box, jas_stream_t *out) { #if 0 jp2_pclr_t *pclr = &box->data.pclr; #endif /* Eliminate warning about unused variable. */ box = 0; out = 0; return -1; } static void jp2_pclr_dumpdata(jp2_box_t *box, FILE *out) { jp2_pclr_t *pclr = &box->data.pclr; unsigned int i; int j; fprintf(out, "numents=%d; numchans=%d\n", (int) pclr->numlutents, (int) pclr->numchans); for (i = 0; i < pclr->numlutents; ++i) { for (j = 0; j < pclr->numchans; ++j) { fprintf(out, "LUT[%d][%d]=%d\n", i, j, pclr->lutdata[i * pclr->numchans + j]); } } } static int jp2_getint(jas_stream_t *in, int s, int n, int_fast32_t *val) { int c; int i; uint_fast32_t v; int m; m = (n + 7) / 8; v = 0; for (i = 0; i < m; ++i) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | c; } v &= ONES(n); if (s) { int sb; sb = v & (1 << (8 * m - 1)); *val = ((~v) + 1) & ONES(8 * m); if (sb) { *val = -*val; } } else { *val = v; } return 0; } jp2_cdefchan_t *jp2_cdef_lookup(jp2_cdef_t *cdef, int channo) { unsigned int i; jp2_cdefchan_t *cdefent; for (i = 0; i < cdef->numchans; ++i) { cdefent = &cdef->ents[i]; if (cdefent->channo == JAS_CAST(unsigned int, channo)) { return cdefent; } } return 0; } jasper-1.900.1/src/libjasper/pgx/0000755000175000017500000000000010554237065015503 5ustar ernieerniejasper-1.900.1/src/libjasper/pgx/Makefile.in0000644000175000017500000004105110554237046017550 0ustar ernieernie# 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@ # Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/pgx DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libpgx_la_LIBADD = am_libpgx_la_OBJECTS = pgx_cod.lo pgx_dec.lo pgx_enc.lo libpgx_la_OBJECTS = $(am_libpgx_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libpgx_la_SOURCES) DIST_SOURCES = $(libpgx_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ noinst_LTLIBRARIES = libpgx.la libpgx_la_SOURCES = \ pgx_cod.h \ pgx_enc.h \ pgx_cod.c \ pgx_dec.c \ pgx_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/pgx/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/pgx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpgx.la: $(libpgx_la_OBJECTS) $(libpgx_la_DEPENDENCIES) $(LINK) $(libpgx_la_LDFLAGS) $(libpgx_la_OBJECTS) $(libpgx_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgx_cod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgx_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgx_enc.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/pgx/pgx_dec.c0000644000175000017500000002336710554235553017273 0ustar ernieernie/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include "jasper/jas_tvp.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_string.h" #include "pgx_cod.h" /******************************************************************************\ * Local prototypes. \******************************************************************************/ static int pgx_gethdr(jas_stream_t *in, pgx_hdr_t *hdr); static int pgx_getdata(jas_stream_t *in, pgx_hdr_t *hdr, jas_image_t *image); static int_fast32_t pgx_getword(jas_stream_t *in, bool bigendian, int prec); static int pgx_getsgnd(jas_stream_t *in, bool *sgnd); static int pgx_getbyteorder(jas_stream_t *in, bool *bigendian); static int pgx_getc(jas_stream_t *in); static int pgx_getuint32(jas_stream_t *in, uint_fast32_t *val); static jas_seqent_t pgx_wordtoint(uint_fast32_t word, int prec, bool sgnd); /******************************************************************************\ * Code for load operation. \******************************************************************************/ /* Load an image from a stream in the PGX format. */ jas_image_t *pgx_decode(jas_stream_t *in, char *optstr) { jas_image_t *image; pgx_hdr_t hdr; jas_image_cmptparm_t cmptparm; /* Avoid compiler warnings about unused parameters. */ optstr = 0; image = 0; if (pgx_gethdr(in, &hdr)) { goto error; } #ifdef PGX_DEBUG pgx_dumphdr(stderr, &hdr); #endif if (!(image = jas_image_create0())) { goto error; } cmptparm.tlx = 0; cmptparm.tly = 0; cmptparm.hstep = 1; cmptparm.vstep = 1; cmptparm.width = hdr.width; cmptparm.height = hdr.height; cmptparm.prec = hdr.prec; cmptparm.sgnd = hdr.sgnd; if (jas_image_addcmpt(image, 0, &cmptparm)) { goto error; } if (pgx_getdata(in, &hdr, image)) { goto error; } jas_image_setclrspc(image, JAS_CLRSPC_SGRAY); jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); return image; error: if (image) { jas_image_destroy(image); } return 0; } /******************************************************************************\ * Code for validate operation. \******************************************************************************/ int pgx_validate(jas_stream_t *in) { uchar buf[PGX_MAGICLEN]; uint_fast32_t magic; int i; int n; assert(JAS_STREAM_MAXPUTBACK >= PGX_MAGICLEN); /* Read the validation data (i.e., the data used for detecting the format). */ if ((n = jas_stream_read(in, buf, PGX_MAGICLEN)) < 0) { return -1; } /* Put the validation data back onto the stream, so that the stream position will not be changed. */ for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } /* Did we read enough data? */ if (n < PGX_MAGICLEN) { return -1; } /* Compute the signature value. */ magic = (buf[0] << 8) | buf[1]; /* Ensure that the signature is correct for this format. */ if (magic != PGX_MAGIC) { return -1; } return 0; } /******************************************************************************\ * \******************************************************************************/ static int pgx_gethdr(jas_stream_t *in, pgx_hdr_t *hdr) { int c; uchar buf[2]; if ((c = jas_stream_getc(in)) == EOF) { goto error; } buf[0] = c; if ((c = jas_stream_getc(in)) == EOF) { goto error; } buf[1] = c; hdr->magic = buf[0] << 8 | buf[1]; if (hdr->magic != PGX_MAGIC) { goto error; } if ((c = pgx_getc(in)) == EOF || !isspace(c)) { goto error; } if (pgx_getbyteorder(in, &hdr->bigendian)) { goto error; } if (pgx_getsgnd(in, &hdr->sgnd)) { goto error; } if (pgx_getuint32(in, &hdr->prec)) { goto error; } if (pgx_getuint32(in, &hdr->width)) { goto error; } if (pgx_getuint32(in, &hdr->height)) { goto error; } return 0; error: return -1; } static int pgx_getdata(jas_stream_t *in, pgx_hdr_t *hdr, jas_image_t *image) { jas_matrix_t *data; uint_fast32_t x; uint_fast32_t y; uint_fast32_t word; int_fast32_t v; data = 0; if (!(data = jas_matrix_create(1, hdr->width))) { goto error; } for (y = 0; y < hdr->height; ++y) { for (x = 0; x < hdr->width; ++x) { /* Need to adjust signed value. */ if ((v = pgx_getword(in, hdr->bigendian, hdr->prec)) < 0) { goto error; } word = v; v = pgx_wordtoint(word, hdr->prec, hdr->sgnd); jas_matrix_set(data, 0, x, v); } if (jas_image_writecmpt(image, 0, 0, y, hdr->width, 1, data)) { goto error; } } jas_matrix_destroy(data); return 0; error: if (data) { jas_matrix_destroy(data); } return -1; } static int_fast32_t pgx_getword(jas_stream_t *in, bool bigendian, int prec) { uint_fast32_t val; int i; int j; int c; int wordsize; wordsize = (prec + 7) / 8; if (prec > 32) { goto error; } val = 0; for (i = 0; i < wordsize; ++i) { if ((c = jas_stream_getc(in)) == EOF) { goto error; } j = bigendian ? (wordsize - 1 - i) : i; val = val | ((c & 0xff) << (8 * j)); } val &= (1 << prec) - 1; return val; error: return -1; } static int pgx_getc(jas_stream_t *in) { int c; for (;;) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } if (c != '#') { return c; } do { if ((c = jas_stream_getc(in)) == EOF) { return -1; } } while (c != '\n' && c != '\r'); } } static int pgx_getbyteorder(jas_stream_t *in, bool *bigendian) { int c; char buf[2]; do { if ((c = pgx_getc(in)) == EOF) { return -1; } } while (isspace(c)); buf[0] = c; if ((c = pgx_getc(in)) == EOF) { goto error; } buf[1] = c; if (buf[0] == 'M' && buf[1] == 'L') { *bigendian = true; } else if (buf[0] == 'L' && buf[1] == 'M') { *bigendian = false; } else { goto error; } while ((c = pgx_getc(in)) != EOF && !isspace(c)) { ; } if (c == EOF) { goto error; } return 0; error: return -1; } static int pgx_getsgnd(jas_stream_t *in, bool *sgnd) { int c; do { if ((c = pgx_getc(in)) == EOF) { return -1; } } while (isspace(c)); if (c == '+') { *sgnd = false; } else if (c == '-') { *sgnd = true; } else { goto error; } while ((c = pgx_getc(in)) != EOF && !isspace(c)) { ; } if (c == EOF) { goto error; } return 0; error: return -1; } static int pgx_getuint32(jas_stream_t *in, uint_fast32_t *val) { int c; uint_fast32_t v; do { if ((c = pgx_getc(in)) == EOF) { return -1; } } while (isspace(c)); v = 0; while (isdigit(c)) { v = 10 * v + c - '0'; if ((c = pgx_getc(in)) < 0) { return -1; } } if (!isspace(c)) { return -1; } *val = v; return 0; } static jas_seqent_t pgx_wordtoint(uint_fast32_t v, int prec, bool sgnd) { jas_seqent_t ret; v &= (1 << prec) - 1; ret = (sgnd && (v & (1 << (prec - 1)))) ? (v - (1 << prec)) : v; return ret; } jasper-1.900.1/src/libjasper/pgx/pgx_cod.c0000644000175000017500000000710310554235553017273 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include "pgx_cod.h" /******************************************************************************\ * \******************************************************************************/ void pgx_dumphdr(FILE *out, pgx_hdr_t *hdr) { fprintf(out, "byteorder=%s sgnd=%s prec=%d width=%d height=%d\n", hdr->bigendian ? "bigendian" : "littleendian", hdr->sgnd ? "signed" : "unsigned", hdr->prec, hdr->width, hdr->height); } jasper-1.900.1/src/libjasper/pgx/pgx_cod.h0000644000175000017500000001035210554235553017300 0ustar ernieernie/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * PGX Format Library * * $Id$ */ #ifndef PGX_COD_H #define PGX_COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_types.h" /******************************************************************************\ * Constants. \******************************************************************************/ #define PGX_MAGIC 0x5047 #define PGX_MAGICLEN 2 /******************************************************************************\ * Types. \******************************************************************************/ typedef struct { uint_fast16_t magic; /* The signature. */ bool bigendian; /* The byte ordering used. */ bool sgnd; /* The signedness of the samples. */ uint_fast32_t prec; /* The precision of the samples. */ uint_fast32_t width; /* The width of the component. */ uint_fast32_t height; /* The height of the component. */ } pgx_hdr_t; /******************************************************************************\ * Functions. \******************************************************************************/ void pgx_dumphdr(FILE *out, pgx_hdr_t *hdr); #endif jasper-1.900.1/src/libjasper/pgx/pgx_enc.h0000644000175000017500000000606710554235553017310 0ustar ernieernie/* * Copyright (c) 2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef PGX_ENC_H #define PGX_ENC_H typedef struct { int cmpt; } pgx_enc_t; #endif jasper-1.900.1/src/libjasper/pgx/pgx_enc.c0000644000175000017500000001650310554235553017277 0ustar ernieernie/* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include "jasper/jas_tvp.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "jasper/jas_string.h" #include "jasper/jas_debug.h" #include "pgx_cod.h" #include "pgx_enc.h" /******************************************************************************\ * Local functions. \******************************************************************************/ static int pgx_puthdr(jas_stream_t *out, pgx_hdr_t *hdr); static int pgx_putdata(jas_stream_t *out, pgx_hdr_t *hdr, jas_image_t *image, int cmpt); static int pgx_putword(jas_stream_t *out, bool bigendian, int prec, uint_fast32_t val); static uint_fast32_t pgx_inttoword(int_fast32_t val, int prec, bool sgnd); /******************************************************************************\ * Code for save operation. \******************************************************************************/ /* Save an image to a stream in the the PGX format. */ int pgx_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { pgx_hdr_t hdr; uint_fast32_t width; uint_fast32_t height; bool sgnd; int prec; pgx_enc_t encbuf; pgx_enc_t *enc = &encbuf; /* Avoid compiler warnings about unused parameters. */ optstr = 0; switch (jas_clrspc_fam(jas_image_clrspc(image))) { case JAS_CLRSPC_FAM_GRAY: if ((enc->cmpt = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y))) < 0) { jas_eprintf("error: missing color component\n"); return -1; } break; default: jas_eprintf("error: BMP format does not support color space\n"); return -1; break; } width = jas_image_cmptwidth(image, enc->cmpt); height = jas_image_cmptheight(image, enc->cmpt); prec = jas_image_cmptprec(image, enc->cmpt); sgnd = jas_image_cmptsgnd(image, enc->cmpt); /* The PGX format is quite limited in the set of image geometries that it can handle. Here, we check to ensure that the image to be saved can actually be represented reasonably accurately using the PGX format. */ /* There must be exactly one component. */ if (jas_image_numcmpts(image) > 1 || prec > 16) { jas_eprintf("The PNM format cannot be used to represent an image with this geometry.\n"); return -1; } hdr.magic = PGX_MAGIC; hdr.bigendian = true; hdr.sgnd = sgnd; hdr.prec = prec; hdr.width = width; hdr.height = height; #ifdef PGX_DEBUG pgx_dumphdr(stderr, &hdr); #endif if (pgx_puthdr(out, &hdr)) { return -1; } if (pgx_putdata(out, &hdr, image, enc->cmpt)) { return -1; } return 0; } /******************************************************************************\ \******************************************************************************/ static int pgx_puthdr(jas_stream_t *out, pgx_hdr_t *hdr) { jas_stream_printf(out, "%c%c", hdr->magic >> 8, hdr->magic & 0xff); jas_stream_printf(out, " %s %s %d %ld %ld\n", hdr->bigendian ? "ML" : "LM", hdr->sgnd ? "-" : "+", hdr->prec, (long) hdr->width, (long) hdr->height); if (jas_stream_error(out)) { return -1; } return 0; } static int pgx_putdata(jas_stream_t *out, pgx_hdr_t *hdr, jas_image_t *image, int cmpt) { jas_matrix_t *data; uint_fast32_t x; uint_fast32_t y; int_fast32_t v; uint_fast32_t word; data = 0; if (!(data = jas_matrix_create(1, hdr->width))) { goto error; } for (y = 0; y < hdr->height; ++y) { if (jas_image_readcmpt(image, cmpt, 0, y, hdr->width, 1, data)) { goto error; } for (x = 0; x < hdr->width; ++x) { v = jas_matrix_get(data, 0, x); word = pgx_inttoword(v, hdr->prec, hdr->sgnd); if (pgx_putword(out, hdr->bigendian, hdr->prec, word)) { goto error; } } } jas_matrix_destroy(data); data = 0; return 0; error: if (data) { jas_matrix_destroy(data); } return -1; } static int pgx_putword(jas_stream_t *out, bool bigendian, int prec, uint_fast32_t val) { int i; int j; int wordsize; val &= (1 << prec) - 1; wordsize = (prec + 7) /8; for (i = 0; i < wordsize; ++i) { j = bigendian ? (wordsize - 1 - i) : i; if (jas_stream_putc(out, (val >> (8 * j)) & 0xff) == EOF) { return -1; } } return 0; } static uint_fast32_t pgx_inttoword(jas_seqent_t v, int prec, bool sgnd) { uint_fast32_t ret; ret = ((sgnd && v < 0) ? ((1 << prec) + v) : v) & ((1 << prec) - 1); return ret; } jasper-1.900.1/src/libjasper/pgx/Makefile.am0000644000175000017500000000611210554235553017537 0ustar ernieernie# Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ noinst_LTLIBRARIES = libpgx.la libpgx_la_SOURCES = \ pgx_cod.h \ pgx_enc.h \ pgx_cod.c \ pgx_dec.c \ pgx_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/pnm/0000755000175000017500000000000010554237065015477 5ustar ernieerniejasper-1.900.1/src/libjasper/pnm/Makefile.in0000644000175000017500000004105110554237046017544 0ustar ernieernie# 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@ # Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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 = src/libjasper/pnm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libpnm_la_LIBADD = am_libpnm_la_OBJECTS = pnm_cod.lo pnm_dec.lo pnm_enc.lo libpnm_la_OBJECTS = $(am_libpnm_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/libjasper/include/jasper depcomp = $(SHELL) $(top_srcdir)/acaux/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 = $(libpnm_la_SOURCES) DIST_SOURCES = $(libpnm_la_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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ noinst_LTLIBRARIES = libpnm.la libpnm_la_SOURCES = \ pnm_cod.h \ pnm_enc.h \ pnm_cod.c \ pnm_dec.c \ pnm_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libjasper/pnm/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/libjasper/pnm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpnm.la: $(libpnm_la_OBJECTS) $(libpnm_la_DEPENDENCIES) $(LINK) $(libpnm_la_LDFLAGS) $(libpnm_la_OBJECTS) $(libpnm_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnm_cod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnm_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnm_enc.Plo@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 $(LTLIBRARIES) 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-noinstLTLIBRARIES \ 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-noinstLTLIBRARIES 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: jasper-1.900.1/src/libjasper/pnm/pnm_dec.c0000644000175000017500000003244310554235551017254 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Portable Pixmap/Graymap Format Support * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include "jasper/jas_types.h" #include "jasper/jas_stream.h" #include "jasper/jas_image.h" #include "pnm_cod.h" /******************************************************************************\ * Local function prototypes. \******************************************************************************/ static int pnm_gethdr(jas_stream_t *in, pnm_hdr_t *hdr); static int pnm_getdata(jas_stream_t *in, pnm_hdr_t *hdr, jas_image_t *image); static int pnm_getsintstr(jas_stream_t *in, int_fast32_t *val); static int pnm_getuintstr(jas_stream_t *in, uint_fast32_t *val); static int pnm_getbitstr(jas_stream_t *in, int *val); static int pnm_getc(jas_stream_t *in); static int pnm_getsint(jas_stream_t *in, int wordsize, int_fast32_t *val); static int pnm_getuint(jas_stream_t *in, int wordsize, uint_fast32_t *val); static int pnm_getint16(jas_stream_t *in, int *val); #define pnm_getuint32(in, val) pnm_getuint(in, 32, val) /******************************************************************************\ * Local data. \******************************************************************************/ static int pnm_allowtrunc = 1; /******************************************************************************\ * Load function. \******************************************************************************/ jas_image_t *pnm_decode(jas_stream_t *in, char *opts) { pnm_hdr_t hdr; jas_image_t *image; jas_image_cmptparm_t cmptparms[3]; jas_image_cmptparm_t *cmptparm; int i; if (opts) { jas_eprintf("warning: ignoring options\n"); } /* Read the file header. */ if (pnm_gethdr(in, &hdr)) { return 0; } /* Create an image of the correct size. */ for (i = 0, cmptparm = cmptparms; i < hdr.numcmpts; ++i, ++cmptparm) { cmptparm->tlx = 0; cmptparm->tly = 0; cmptparm->hstep = 1; cmptparm->vstep = 1; cmptparm->width = hdr.width; cmptparm->height = hdr.height; cmptparm->prec = pnm_maxvaltodepth(hdr.maxval); cmptparm->sgnd = hdr.sgnd; } if (!(image = jas_image_create(hdr.numcmpts, cmptparms, JAS_CLRSPC_UNKNOWN))) { return 0; } if (hdr.numcmpts == 3) { jas_image_setclrspc(image, JAS_CLRSPC_SRGB); jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); jas_image_setcmpttype(image, 1, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); jas_image_setcmpttype(image, 2, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); } else { jas_image_setclrspc(image, JAS_CLRSPC_SGRAY); jas_image_setcmpttype(image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); } /* Read image data from stream into image. */ if (pnm_getdata(in, &hdr, image)) { jas_image_destroy(image); return 0; } return image; } /******************************************************************************\ * Validation function. \******************************************************************************/ int pnm_validate(jas_stream_t *in) { uchar buf[2]; int i; int n; assert(JAS_STREAM_MAXPUTBACK >= 2); /* Read the first two characters that constitute the signature. */ if ((n = jas_stream_read(in, buf, 2)) < 0) { return -1; } /* Put these characters back to the stream. */ for (i = n - 1; i >= 0; --i) { if (jas_stream_ungetc(in, buf[i]) == EOF) { return -1; } } /* Did we read enough data? */ if (n < 2) { return -1; } /* Is this the correct signature for a PNM file? */ if (buf[0] == 'P' && isdigit(buf[1])) { return 0; } return -1; } /******************************************************************************\ * Functions for reading the header. \******************************************************************************/ static int pnm_gethdr(jas_stream_t *in, pnm_hdr_t *hdr) { int_fast32_t maxval; int_fast32_t width; int_fast32_t height; if (pnm_getint16(in, &hdr->magic) || pnm_getsintstr(in, &width) || pnm_getsintstr(in, &height)) { return -1; } hdr->width = width; hdr->height = height; if (pnm_type(hdr->magic) != PNM_TYPE_PBM) { if (pnm_getsintstr(in, &maxval)) { return -1; } } else { maxval = 1; } if (maxval < 0) { hdr->maxval = -maxval; hdr->sgnd = true; } else { hdr->maxval = maxval; hdr->sgnd = false; } switch (pnm_type(hdr->magic)) { case PNM_TYPE_PBM: case PNM_TYPE_PGM: hdr->numcmpts = 1; break; case PNM_TYPE_PPM: hdr->numcmpts = 3; break; default: abort(); break; } return 0; } /******************************************************************************\ * Functions for processing the sample data. \******************************************************************************/ static int pnm_getdata(jas_stream_t *in, pnm_hdr_t *hdr, jas_image_t *image) { int ret; #if 0 int numcmpts; #endif int cmptno; int fmt; jas_matrix_t *data[3]; int x; int y; int_fast64_t v; int depth; int type; int c; int n; ret = -1; #if 0 numcmpts = jas_image_numcmpts(image); #endif fmt = pnm_fmt(hdr->magic); type = pnm_type(hdr->magic); depth = pnm_maxvaltodepth(hdr->maxval); data[0] = 0; data[1] = 0; data[2] = 0; for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { if (!(data[cmptno] = jas_matrix_create(1, hdr->width))) { goto done; } } for (y = 0; y < hdr->height; ++y) { if (type == PNM_TYPE_PBM) { if (fmt == PNM_FMT_BIN) { for (x = 0; x < hdr->width;) { if ((c = jas_stream_getc(in)) == EOF) { goto done; } n = 8; while (n > 0 && x < hdr->width) { jas_matrix_set(data[0], 0, x, 1 - ((c >> 7) & 1)); c <<= 1; --n; ++x; } } } else { for (x = 0; x < hdr->width; ++x) { int uv; if (pnm_getbitstr(in, &uv)) { goto done; } jas_matrix_set(data[0], 0, x, 1 - uv); } } } else { for (x = 0; x < hdr->width; ++x) { for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { if (fmt == PNM_FMT_BIN) { /* The sample data is in binary format. */ if (hdr->sgnd) { /* The sample data is signed. */ int_fast32_t sv; if (pnm_getsint(in, depth, &sv)) { if (!pnm_allowtrunc) { goto done; } sv = 0; } v = sv; } else { /* The sample data is unsigned. */ uint_fast32_t uv; if (pnm_getuint(in, depth, &uv)) { if (!pnm_allowtrunc) { goto done; } uv = 0; } v = uv; } } else { /* The sample data is in text format. */ if (hdr->sgnd) { /* The sample data is signed. */ int_fast32_t sv; if (pnm_getsintstr(in, &sv)) { if (!pnm_allowtrunc) { goto done; } sv = 0; } v = sv; } else { /* The sample data is unsigned. */ uint_fast32_t uv; if (pnm_getuintstr(in, &uv)) { if (!pnm_allowtrunc) { goto done; } uv = 0; } v = uv; } } jas_matrix_set(data[cmptno], 0, x, v); } } } for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { if (jas_image_writecmpt(image, cmptno, 0, y, hdr->width, 1, data[cmptno])) { goto done; } } } ret = 0; done: for (cmptno = 0; cmptno < hdr->numcmpts; ++cmptno) { if (data[cmptno]) { jas_matrix_destroy(data[cmptno]); } } return ret; } /******************************************************************************\ * Miscellaneous functions. \******************************************************************************/ static int pnm_getsint(jas_stream_t *in, int wordsize, int_fast32_t *val) { uint_fast32_t tmpval; if (pnm_getuint(in, wordsize, &tmpval)) { return -1; } if (val) { assert((tmpval & (1 << (wordsize - 1))) == 0); *val = tmpval; } return 0; } static int pnm_getuint(jas_stream_t *in, int wordsize, uint_fast32_t *val) { uint_fast32_t tmpval; int c; int n; tmpval = 0; n = (wordsize + 7) / 8; while (--n >= 0) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } tmpval = (tmpval << 8) | c; } tmpval &= (((uint_fast64_t) 1) << wordsize) - 1; if (val) { *val = tmpval; } return 0; } static int pnm_getbitstr(jas_stream_t *in, int *val) { int c; int_fast32_t v; for (;;) { if ((c = pnm_getc(in)) == EOF) { return -1; } if (c == '#') { for (;;) { if ((c = pnm_getc(in)) == EOF) { return -1; } if (c == '\n') { break; } } } else if (c == '0' || c == '1') { v = c - '0'; break; } } if (val) { *val = v; } return 0; } static int pnm_getuintstr(jas_stream_t *in, uint_fast32_t *val) { uint_fast32_t v; int c; /* Discard any leading whitespace. */ do { if ((c = pnm_getc(in)) == EOF) { return -1; } } while (isspace(c)); /* Parse the number. */ v = 0; while (isdigit(c)) { v = 10 * v + c - '0'; if ((c = pnm_getc(in)) < 0) { return -1; } } /* The number must be followed by whitespace. */ if (!isspace(c)) { return -1; } if (val) { *val = v; } return 0; } static int pnm_getsintstr(jas_stream_t *in, int_fast32_t *val) { int c; int s; int_fast32_t v; /* Discard any leading whitespace. */ do { if ((c = pnm_getc(in)) == EOF) { return -1; } } while (isspace(c)); /* Get the number, allowing for a negative sign. */ s = 1; if (c == '-') { s = -1; if ((c = pnm_getc(in)) == EOF) { return -1; } } else if (c == '+') { if ((c = pnm_getc(in)) == EOF) { return -1; } } v = 0; while (isdigit(c)) { v = 10 * v + c - '0'; if ((c = pnm_getc(in)) < 0) { return -1; } } /* The number must be followed by whitespace. */ if (!isspace(c)) { return -1; } if (val) { *val = (s >= 0) ? v : (-v); } return 0; } static int pnm_getc(jas_stream_t *in) { int c; for (;;) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } if (c != '#') { return c; } do { if ((c = jas_stream_getc(in)) == EOF) { return -1; } } while (c != '\n' && c != '\r'); } } static int pnm_getint16(jas_stream_t *in, int *val) { int v; int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = c & 0xff; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | (c & 0xff); *val = v; return 0; } jasper-1.900.1/src/libjasper/pnm/pnm_cod.c0000644000175000017500000001123710554235551017264 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Portable Pixmap/Graymap Format Support * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include "jasper/jas_math.h" #include "pnm_cod.h" /******************************************************************************\ * Miscellaneous utilities. \******************************************************************************/ /* Determine the PNM type (i.e., PGM or PPM) from the magic number. */ int pnm_type(uint_fast16_t magic) { int type; switch (magic) { case PNM_MAGIC_TXTPPM: case PNM_MAGIC_BINPPM: type = PNM_TYPE_PPM; break; case PNM_MAGIC_TXTPGM: case PNM_MAGIC_BINPGM: type = PNM_TYPE_PGM; break; case PNM_MAGIC_TXTPBM: case PNM_MAGIC_BINPBM: type = PNM_TYPE_PBM; break; default: /* This should not happen. */ abort(); break; } return type; } /* Determine the PNM format (i.e., text or binary) from the magic number. */ int pnm_fmt(uint_fast16_t magic) { int fmt; switch (magic) { case PNM_MAGIC_TXTPBM: case PNM_MAGIC_TXTPGM: case PNM_MAGIC_TXTPPM: fmt = PNM_FMT_TXT; break; case PNM_MAGIC_BINPBM: case PNM_MAGIC_BINPGM: case PNM_MAGIC_BINPPM: fmt = PNM_FMT_BIN; break; default: /* This should not happen. */ abort(); break; } return fmt; } /* Determine the depth (i.e., precision) from the maximum value. */ int pnm_maxvaltodepth(uint_fast32_t maxval) { int n; n = 0; while (maxval > 0) { maxval >>= 1; ++n; } return n; } jasper-1.900.1/src/libjasper/pnm/pnm_enc.c0000644000175000017500000003224310554235551017264 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Portable Pixmap/Graymap Format Support * * $Id$ */ /******************************************************************************\ * Includes. \******************************************************************************/ #include #include #include #include #include "jasper/jas_types.h" #include "jasper/jas_tvp.h" #include "jasper/jas_image.h" #include "jasper/jas_stream.h" #include "jasper/jas_debug.h" #include "pnm_cod.h" #include "pnm_enc.h" /******************************************************************************\ * Local types. \******************************************************************************/ typedef struct { bool bin; } pnm_encopts_t; typedef enum { OPT_TEXT } pnm_optid_t; jas_taginfo_t pnm_opttab[] = { {OPT_TEXT, "text"}, {-1, 0} }; /******************************************************************************\ * Local function prototypes. \******************************************************************************/ static int pnm_parseencopts(char *optstr, pnm_encopts_t *encopts); static int pnm_puthdr(jas_stream_t *out, pnm_hdr_t *hdr); static int pnm_putdata(jas_stream_t *out, pnm_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts); static int pnm_putsint(jas_stream_t *out, int wordsize, int_fast32_t *val); static int pnm_putuint(jas_stream_t *out, int wordsize, uint_fast32_t *val); static int pnm_putuint16(jas_stream_t *out, uint_fast16_t val); /******************************************************************************\ * Save function. \******************************************************************************/ int pnm_encode(jas_image_t *image, jas_stream_t *out, char *optstr) { int width; int height; int cmptno; pnm_hdr_t hdr; pnm_encopts_t encopts; int prec; int sgnd; pnm_enc_t encbuf; pnm_enc_t *enc = &encbuf; /* Parse the encoder option string. */ if (pnm_parseencopts(optstr, &encopts)) { jas_eprintf("invalid PNM encoder options specified\n"); return -1; } switch (jas_clrspc_fam(jas_image_clrspc(image))) { case JAS_CLRSPC_FAM_RGB: if (jas_image_clrspc(image) != JAS_CLRSPC_SRGB) jas_eprintf("warning: inaccurate color\n"); enc->numcmpts = 3; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R))) < 0 || (enc->cmpts[1] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G))) < 0 || (enc->cmpts[2] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B))) < 0) { jas_eprintf("error: missing color component\n"); return -1; } break; case JAS_CLRSPC_FAM_GRAY: if (jas_image_clrspc(image) != JAS_CLRSPC_SGRAY) jas_eprintf("warning: inaccurate color\n"); enc->numcmpts = 1; if ((enc->cmpts[0] = jas_image_getcmptbytype(image, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y))) < 0) { jas_eprintf("error: missing color component\n"); return -1; } break; default: jas_eprintf("error: unsupported color space\n"); return -1; break; } width = jas_image_cmptwidth(image, enc->cmpts[0]); height = jas_image_cmptheight(image, enc->cmpts[0]); prec = jas_image_cmptprec(image, enc->cmpts[0]); sgnd = jas_image_cmptsgnd(image, enc->cmpts[0]); /* The PNM format is quite limited in the set of image geometries that it can handle. Here, we check to ensure that the image to be saved can actually be represented reasonably accurately using the PNM format. */ /* All of the components must have the same width and height. */ /* All of the components must have unsigned samples with the same precision.*/ /* All of the components must have their top-left corner located at the origin. */ for (cmptno = 0; cmptno < enc->numcmpts; ++cmptno) { if (jas_image_cmptwidth(image, enc->cmpts[cmptno]) != width || jas_image_cmptheight(image, enc->cmpts[cmptno]) != height || jas_image_cmptprec(image, enc->cmpts[cmptno]) != prec || jas_image_cmptsgnd(image, enc->cmpts[cmptno]) != sgnd || jas_image_cmpthstep(image, enc->cmpts[cmptno]) != jas_image_cmpthstep(image, 0) || jas_image_cmptvstep(image, enc->cmpts[cmptno]) != jas_image_cmptvstep(image, 0) || jas_image_cmpttlx(image, enc->cmpts[cmptno]) != jas_image_cmpttlx(image, 0) || jas_image_cmpttly(image, enc->cmpts[cmptno]) != jas_image_cmpttly(image, 0)) { jas_eprintf("The PNM format cannot be used to represent an image with this geometry.\n"); return -1; } } if (sgnd) { jas_eprintf("warning: support for signed sample data requires use of nonstandard extension to PNM format\n"); jas_eprintf("You may not be able to read or correctly display the resulting PNM data with other software.\n"); } /* Initialize the header. */ if (enc->numcmpts == 1) { hdr.magic = encopts.bin ? PNM_MAGIC_BINPGM : PNM_MAGIC_TXTPGM; } else if (enc->numcmpts == 3) { hdr.magic = encopts.bin ? PNM_MAGIC_BINPPM : PNM_MAGIC_TXTPPM; } else { return -1; } hdr.width = width; hdr.height = height; hdr.maxval = (1 << prec) - 1; hdr.sgnd = sgnd; /* Write the header. */ if (pnm_puthdr(out, &hdr)) { return -1; } /* Write the image data. */ if (pnm_putdata(out, &hdr, image, enc->numcmpts, enc->cmpts)) { return -1; } /* Flush the output stream. */ if (jas_stream_flush(out)) { return -1; } return 0; } /******************************************************************************\ * Code for parsing options. \******************************************************************************/ /* Parse the encoder options string. */ static int pnm_parseencopts(char *optstr, pnm_encopts_t *encopts) { jas_tvparser_t *tvp; int ret; tvp = 0; /* Initialize default values for encoder options. */ encopts->bin = true; /* Create the tag-value parser. */ if (!(tvp = jas_tvparser_create(optstr ? optstr : ""))) { goto error; } /* Get tag-value pairs, and process as necessary. */ while (!(ret = jas_tvparser_next(tvp))) { switch (jas_taginfo_nonull(jas_taginfos_lookup(pnm_opttab, jas_tvparser_gettag(tvp)))->id) { case OPT_TEXT: encopts->bin = false; break; default: jas_eprintf("warning: ignoring invalid option %s\n", jas_tvparser_gettag(tvp)); break; } } if (ret < 0) { goto error; } /* Destroy the tag-value parser. */ jas_tvparser_destroy(tvp); return 0; error: if (tvp) { jas_tvparser_destroy(tvp); } return -1; } /******************************************************************************\ * Function for writing header. \******************************************************************************/ /* Write the header. */ static int pnm_puthdr(jas_stream_t *out, pnm_hdr_t *hdr) { int_fast32_t maxval; if (pnm_putuint16(out, hdr->magic)) { return -1; } if (hdr->sgnd) { maxval = -hdr->maxval; } else { maxval = hdr->maxval; } jas_stream_printf(out, "\n%lu %lu\n%ld\n", (unsigned long) hdr->width, (unsigned long) hdr->height, (long) maxval); if (jas_stream_error(out)) { return -1; } return 0; } /******************************************************************************\ * Functions for processing the sample data. \******************************************************************************/ /* Write the image sample data. */ static int pnm_putdata(jas_stream_t *out, pnm_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts) { int ret; int cmptno; int x; int y; jas_matrix_t *data[3]; int fmt; jas_seqent_t *d[3]; jas_seqent_t v; int minval; int linelen; int n; char buf[256]; int depth; ret = -1; fmt = pnm_fmt(hdr->magic); minval = -((int) hdr->maxval + 1); depth = pnm_maxvaltodepth(hdr->maxval); data[0] = 0; data[1] = 0; data[2] = 0; for (cmptno = 0; cmptno < numcmpts; ++cmptno) { if (!(data[cmptno] = jas_matrix_create(1, hdr->width))) { goto done; } } for (y = 0; y < hdr->height; ++y) { for (cmptno = 0; cmptno < numcmpts; ++cmptno) { if (jas_image_readcmpt(image, cmpts[cmptno], 0, y, hdr->width, 1, data[cmptno])) { goto done; } d[cmptno] = jas_matrix_getref(data[cmptno], 0, 0); } linelen = 0; for (x = 0; x < hdr->width; ++x) { for (cmptno = 0; cmptno < numcmpts; ++cmptno) { v = *d[cmptno]; if (v < minval) { v = minval; } if (v > ((int) hdr->maxval)) { v = hdr->maxval; } if (fmt == PNM_FMT_BIN) { if (hdr->sgnd) { int_fast32_t sv; sv = v; if (pnm_putsint(out, depth, &sv)) { goto done; } } else { uint_fast32_t uv; uv = v; if (pnm_putuint(out, depth, &uv)) { goto done; } } } else { n = sprintf(buf, "%s%ld", ((!(!x && !cmptno)) ? " " : ""), (long) v); if (linelen > 0 && linelen + n > PNM_MAXLINELEN) { jas_stream_printf(out, "\n"); linelen = 0; } jas_stream_printf(out, "%s", buf); linelen += n; } ++d[cmptno]; } } if (fmt != PNM_FMT_BIN) { jas_stream_printf(out, "\n"); linelen = 0; } if (jas_stream_error(out)) { goto done; } } ret = 0; done: for (cmptno = 0; cmptno < numcmpts; ++cmptno) { if (data[cmptno]) { jas_matrix_destroy(data[cmptno]); } } return ret; } /******************************************************************************\ * Miscellaneous functions. \******************************************************************************/ static int pnm_putsint(jas_stream_t *out, int wordsize, int_fast32_t *val) { uint_fast32_t tmpval; tmpval = (*val < 0) ? ((~(JAS_CAST(uint_fast32_t, -(*val)) + 1)) & PNM_ONES(wordsize)) : JAS_CAST(uint_fast32_t, (*val)); return pnm_putuint(out, wordsize, &tmpval); } static int pnm_putuint(jas_stream_t *out, int wordsize, uint_fast32_t *val) { int n; uint_fast32_t tmpval; int c; n = (wordsize + 7) / 8; tmpval = (*val); tmpval &= PNM_ONES(8 * n); tmpval = tmpval << (8 * (4 - n)); while (--n >= 0) { c = (tmpval >> 24) & 0xff; if (jas_stream_putc(out, c) == EOF) { return -1; } tmpval = (tmpval << 8) & 0xffffffff; } return 0; } /* Write a 16-bit unsigned integer to a stream. */ static int pnm_putuint16(jas_stream_t *out, uint_fast16_t val) { if (jas_stream_putc(out, (unsigned char)(val >> 8)) == EOF || jas_stream_putc(out, (unsigned char)(val & 0xff)) == EOF) { return -1; } return 0; } jasper-1.900.1/src/libjasper/pnm/pnm_cod.h0000644000175000017500000001266510554235551017277 0ustar ernieernie/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Portable Pixmap/Graymap Format Support * * $Id$ */ #ifndef PNM_COD_H #define PNM_COD_H /******************************************************************************\ * Includes. \******************************************************************************/ #include "jasper/jas_types.h" /******************************************************************************\ * Constants. \******************************************************************************/ /* Magic numbers. */ #define PNM_MAGIC_TXTPBM 0x5031 /* Text Portable BitMap (P1) */ #define PNM_MAGIC_TXTPGM 0x5032 /* Text Portable GrayMap (P2) */ #define PNM_MAGIC_TXTPPM 0x5033 /* Text Portable PixMap (P3) */ #define PNM_MAGIC_BINPBM 0x5034 /* Binary Portable BitMap (P4) */ #define PNM_MAGIC_BINPGM 0x5035 /* Binary Portable GrayMap (P5) */ #define PNM_MAGIC_BINPPM 0x5036 /* Binary Portable PixMap (P6) */ #define PNM_MAGIC_PAM 0x5037 /* PAM (P7) */ /* Type of image data. */ #define PNM_TYPE_PPM 0 /* PixMap */ #define PNM_TYPE_PGM 1 /* GrayMap */ #define PNM_TYPE_PBM 2 /* BitMap */ /* Format of image data. */ #define PNM_FMT_TXT 0 /* Text */ #define PNM_FMT_BIN 1 /* Binary */ #define PNM_MAXLINELEN 79 #define PNM_TUPLETYPE_UNKNOWN 0 #define PNM_TUPLETYPE_MONO 1 #define PNM_TUPLETYPE_GRAY 2 #define PNM_TUPLETYPE_GRAYA 3 #define PNM_TUPLETYPE_RGB 4 #define PNM_TUPLETYPE_RGBA 5 /******************************************************************************\ * Types. \******************************************************************************/ /* File header. */ typedef struct { int magic; /* The magic number. */ int width; /* The image width. */ int height; /* The image height. */ int numcmpts; int maxval; /* The maximum allowable sample value. */ #if 0 int tupletype; #endif bool sgnd; /* The sample data is signed. */ } pnm_hdr_t; /******************************************************************************\ * Functions. \******************************************************************************/ int pnm_type(uint_fast16_t magic); /* Determine type (i.e., PGM or PPM) from magic number. */ int pnm_fmt(uint_fast16_t magic); /* Determine format (i.e., text or binary) from magic number. */ int pnm_maxvaltodepth(uint_fast32_t maxval); /* Determine depth (i.e., precision) from maximum value. */ #define PNM_ONES(n) \ (((n) < 32) ? ((1UL << (n)) - 1) : 0xffffffffUL) #endif jasper-1.900.1/src/libjasper/pnm/pnm_enc.h0000644000175000017500000000611210554235551017265 0ustar ernieernie/* * Copyright (c) 2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") 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, 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: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "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 OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef PNM_ENC_H #define PNM_ENC_H typedef struct { int numcmpts; int cmpts[4]; } pnm_enc_t; #endif jasper-1.900.1/src/libjasper/pnm/Makefile.am0000644000175000017500000000611210554235551017531 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ noinst_LTLIBRARIES = libpnm.la libpnm_la_SOURCES = \ pnm_cod.h \ pnm_enc.h \ pnm_cod.c \ pnm_dec.c \ pnm_enc.c INCLUDES = -I$(top_srcdir)/src/libjasper/include jasper-1.900.1/src/libjasper/Makefile.am0000644000175000017500000000655010554235553016747 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ EXTRA_DIST = README SUBDIRS = \ include \ base \ bmp \ jp2 \ jpc \ jpg \ mif \ pgx \ pnm \ ras lib_LTLIBRARIES = libjasper.la libjasper_la_SOURCES = dummy.c libjasper_la_LIBADD = \ base/libbase.la \ bmp/libbmp.la \ jp2/libjp2.la \ jpc/libjpc.la \ jpg/libjpg.la \ mif/libmif.la \ pgx/libpgx.la \ pnm/libpnm.la \ ras/libras.la # -release $(LT_RELEASE) libjasper_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) jasper-1.900.1/src/Makefile.am0000644000175000017500000000572710554235554015002 0ustar ernieernie# Copyright (c) 2001-2002 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ EXTRA_DIST = README SUBDIRS = libjasper appl msvc jasper-1.900.1/LICENSE0000644000175000017500000000527010554235562013154 0ustar ernieernieJasPer License Version 2.0 Copyright (c) 2001-2006 Michael David Adams Copyright (c) 1999-2000 Image Power, Inc. Copyright (c) 1999-2000 The University of British Columbia All rights reserved. Permission is hereby granted, free of charge, to any person (the "User") 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, 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: 1. The above copyright notices and this permission notice (which includes the disclaimer below) shall be included in all copies or substantial portions of the Software. 2. The name of a copyright holder shall not be used to endorse or promote products derived from the Software without specific prior written permission. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "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 OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. jasper-1.900.1/Makefile.in0000644000175000017500000005566310554237047014227 0ustar ernieernie# 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@ # Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ 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) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/jasper.spec.in \ $(top_srcdir)/configure ChangeLog INSTALL NEWS \ acaux/config.guess acaux/config.sub acaux/depcomp \ acaux/install-sh acaux/ltmain.sh acaux/missing \ acaux/mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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)/acaux/mkinstalldirs CONFIG_HEADER = \ $(top_builddir)/src/libjasper/include/jasper/jas_config.h CONFIG_CLEAN_FILES = jasper.spec 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) 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).tar.Z $(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@ 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@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ HAVE_LIBJPEG_FALSE = @HAVE_LIBJPEG_FALSE@ HAVE_LIBJPEG_TRUE = @HAVE_LIBJPEG_TRUE@ HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@ HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAS_MAJOR_VERSION = @JAS_MAJOR_VERSION@ JAS_MICRO_VERSION = @JAS_MICRO_VERSION@ JAS_MINOR_VERSION = @JAS_MINOR_VERSION@ JAS_RPM_RELEASE = @JAS_RPM_RELEASE@ JAS_VERSION = @JAS_VERSION@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OPENGL_LIBS = @OPENGL_LIBS@ 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@ 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_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ 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@ 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@ AUTOMAKE_OPTIONS = foreign dist-zip dist-tarZ EXTRA_DIST = README INSTALL COPYRIGHT LICENSE NEWS ChangeLog data doc \ jasper.spec.in jasper.spec acaux # Note: We need to put the derived file "jasper.spec" in the distribution # in order to facilitate RPM building. SUBDIRS = src all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) jasper.spec: $(top_builddir)/config.status $(srcdir)/jasper.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ 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) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/acaux @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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -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 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z -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 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 $(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-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-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-hook 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-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 rpm: dist for i in BUILD RPMS SRPMS SOURCES SPECS; do \ j=$$PWD/RPMTOP/$$i; \ if ! -d $$j; then \ mkdir -p $$j || exit 1; \ fi \ done rpmbuild --rmsource --define "_topdir $$PWD/RPMTOP" \ -ta $(PACKAGE)-$(JAS_VERSION).tar.gz rm -rf $$PWD/RPMTOP/BUILD/$(PACKAGE)-$(JAS_VERSION) # We need to ensure that any Subversion directories in the extra directories # are removed before the distribution archive is made. dist-hook: for i in $(EXTRA_DIST); do \ if test -d $$i; then \ j=`find $(distdir)/$$i -name .svn`; \ if test -n "$$j"; then \ rm -rf $$j; \ fi; \ fi; \ done # 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: jasper-1.900.1/ChangeLog0000644000175000017500000000000010554235562013703 0ustar ernieerniejasper-1.900.1/jasper.spec0000644000175000017500000000403210554237063014300 0ustar ernieernie# Note that this is NOT a relocatable package %define package_name jasper %define ver 1.900.1 %define prefix /usr %define datadir %{prefix}/share %define release 1 Summary: JasPer Name: %{package_name} Version: %{ver} Release: %{release} Copyright: Modified BSD Group: Development/Libraries # FIXME: Source: http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.900.1.tar.gz BuildRoot: /var/tmp/%{package_name}-%{version}-root Requires: libjpeg BuildRequires: libjpeg-devel URL: http://www.ece.uvic.ca/~mdadams/jasper/ %description JasPer is a collection of software (i.e., a library and application programs) for the coding and manipulation of images. This software can handle image data in a variety of formats. One such format supported by JasPer is the JPEG-2000 format defined in ISO/IEC 15444-1:2000. %package devel Summary: Include Files and Documentation Group: Development/Libraries Requires: %{package_name} = %{ver} %description devel JasPer is a collection of software (i.e., a library and application programs) for the coding and manipulation of images. This software can handle image data in a variety of formats. One such format supported by JasPer is the JPEG-2000 code stream format defined in ISO/IEC 15444-1:2000. %prep %setup ./configure --prefix=/usr --enable-shared # build %build #if [ "$SMP" != "" ]; then # (make "MAKE=make -k -j $SMP"; exit 0) # make #else make #fi # install %install rm -rf $RPM_BUILD_ROOT make prefix=$RPM_BUILD_ROOT%{prefix} install # clean %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig # files main package %files %defattr(-, root, root) %doc README LICENSE ChangeLog %{prefix}/bin/* %{prefix}/lib/lib*.so.* # files devel package %files devel %defattr(-, root, root) # no API docs yet :( # %doc doc/html/* %{prefix}/include/jasper/* %{prefix}/lib/lib*.so %{prefix}/lib/lib*.a %{prefix}/lib/lib*.la %changelog * Fri Oct 25 2002 Alexander D. Karaivanov - spec file created jasper-1.900.1/COPYRIGHT0000644000175000017500000000020210554235562013430 0ustar ernieernieThe copyright information for the JasPer software accompanies the software license, and can be found in the file named "LICENSE". jasper-1.900.1/NEWS0000644000175000017500000000112610554236522012637 0ustar ernieernieDear JasPer Users: I am pleased to announce the availability of JasPer version 1.900.1. This release fixes some build problems as well as a multiply-defined symbol problem in jpc_qmfb.h. The new JasPer release is available from the JasPer Project Home Page (i.e., http://www.ece.uvic.ca/~mdadams/jasper) and the JPEG web site (i.e., http://www.jpeg.org/software). Regards, Michael --- Michael Adams, Assistant Professor Dept. of Elec. and Comp. Engineering, University of Victoria P.O. Box 3055 STN CSC, Victoria, BC, V8W 3P6, CANADA E-mail: mdadams@ece.uvic.ca, Web: www.ece.uvic.ca/~mdadams jasper-1.900.1/INSTALL0000644000175000017500000000032510554235562013174 0ustar ernieernieDetailed instructions on how to build and install the JasPer software can be found in the JasPer Software Reference Manual which is located in the doc directory. (See the section titled "Building the Software".) jasper-1.900.1/doc/0000755000175000017500000000000010554237065012710 5ustar ernieerniejasper-1.900.1/doc/README0000644000175000017500000000027510554235557013600 0ustar ernieernieThis directory contains documentation related to the JasPer software. jasper.pdf JasPer Software Reference Manual jpeg2000.pdf A detailed technical tutorial on the JPEG-2000 standard. jasper-1.900.1/doc/jpeg2000.pdf0000644000175000017500000110726610554235557014653 0ustar ernieernie%PDF-1.2 %쏢 6 0 obj <> stream xX[SG~ׯ}SAM/<ő5 I/1lI3X=}9$EQOO%']FFǗ݌>,,Ū8-auieQތ9Vc  ae5z5Ϧo$%Q;ѫerjxhQ/oXXhL3 n)H-|0G$GUtLpP1vŘ1bϪm}4hg%TSצeЌ Yh+LфB*-ƯBPʘ% {p1Ԕ-pa^ ʙ? #$'(':x蠷wP[BhS_ʫq̃ ɼy0iȷ5?~Ez`1dE(e^g$U)\w]7wB+yn&$ɨl2Df}Xכg8`rj{8InJPDo#N'kŒet3L)e;_ Y:ؕ㬰PZ IYIѼiìhi3^֏u 'L3VfbE!GKsqmuu,{v/d*#L&5EެcgCw4>Yt,=X+=#&+`*UYnz B*$\I ]ޅ@}^Qꗌ6?kyn W9\$ 9V!C@Eq4]8Y˲򪽮~e̕$T\&l] *Q:ab Y'P{wyHǞɹ'9:Xg 535Dq`ZmXb}2!Wqxźw!ȣ7gRn\x (.v,w!S- x/:\$-lLۦu1sާ^v&q c F^oS%094Sn`.As/i[!Z*t| $T)De-d>9Jc2ZӨ،Ÿ/I-;:n27$ra ':: _j+_P*0pIvu]^YE5 x0MB)'D\o_5B}8O2n/AY L5I:2HdAȮ 0,KM2MM`hRS *ŮY˫IR1r'AMprDB95ʁijI9;?. s}ÎyMQgyy9;ϐ׫ 2u@c#:8n6|{}3s&ޅfo#_wo#PK5>Vq$2* z2_[u6:igdcIPm#Hq.HK>#sO:>}:`X*J1&NvC&z^:ŲB`Tb\nA>JfMFFS'K)QOM~VRYxwbM*nڏSjeu5 RϤc оQ[ HPlƟ׬]%ʒLfJ֯> stream x}=O0w wv|DIh[R\n8Q@m$rjTƙ>}Rkt;Ҁ#BN!4Mzȁ7QSmzAA"Rl|FJ(7A0k)lfu6]+f6?E`c͊1͇{ O1}Sςw!BJI B)--݂<{ϯCw>w\Ŀ׉ie.kTﳭl/u{mAU/J$Ijendstream endobj 36 0 obj 272 endobj 40 0 obj <> stream x][s$u+(W-g@hjVز]Ya8$;4Cܜ gHٕRt\rUп+?-W_~w ]>}^~`f>?v13o}X~~8継51!yy]6SG/_/E:KMc͚dy%~|-~ͼ,~X6?ݔʴ3W?kյ 𺔿6t?~kX[nl?nf5z~ߗEb'k{](Zp9<|YKtR G^WkMZgδW‡(?Y~wy&DAuOá_Vg}kTa}-J^v}`,Ǫo:GOT4R.'ʅ@3a>Ϊu_Z=\Eƌ+0_07㞬X|q9i>)oX=dbm~_6zIv`̋]+ִ!g5(b̏A.MӲ*uv쁰64 . 844 ([l[=5bma5ؼmx1á|ٸ 2]@N5Ćl`3LOe0S4@AnXC*DDNVF 掸[&"·z8Rk IFmFA0xy 6"*c_K![|HU-%3K vOg>%,4˧̯@`߾"mҪ[۞nA9)~G)Js !^)+߼폏}HHH7հXbNQٓW:+{_|3J][_D_>~q/ 0UFx&5fE< n|O 0|(+xc~c07׬K#O%JC#r{|gf0AZrD 7F޻"m8;xOӐ?'^ O(,mJ|#UǾQu]4 Id[G1"PLI4X҈c ͈;-n hL˪VT=SwNxǁGrmXU;~?bwy\m}w;pMwef)_<jʾ%L)5%_J/plO`y` !A"?j82Vi6n)@~=oSqĊ^;˽@HOʽ-/3ix]ƾ Vh)B DB[z{Ebyx\B#r{M!Pd}1O[EvW9N1LhJ\0a&ZOF["4z!0J Xma(DM{Y`"3Vʁ%*U8%-uT5n+yo$@Á QÈ0vRp@FL9;Du{lV2Q)RX  +RZ ,/A =x:X`]̘ެ`hmתz!(Tb^$7ƎbCX2Hn'%&/ RpޣuYU:^MZ!8Nମ-f(֊0IC `|E6tf=X)ňcl4HŦ4:DKg$ H_y$7=Ql {-7Z7nկY}3"044-ҨGLR Ucޤ@-ƦLb÷:tI 9ImB2nH5b}\mwTMX4xnZ/B4?붤44\,YJ.Zҏ18=a"@H*Lq |q &Hxb^tU 0BRIؓ mb5"7;f1[ yALFƆ(*nBf?Kb <hY%Q+;s j>V5bQ#|.+EQ X-GC+W X<( (^v:A i.`W~0HHψB'97M^8.=܌(5FFB{ mqOycm8gpHp;T3j%<ϲDo|/؇0Jg^zN,nn M2fd X9L8P0.I~fN{|0z᠂cw,-9-KPRP!uચlyE^+rq,v "Qi"Hvpx.]3IA%9;U-&) Jrt(Tǎd6UVp<Uts &i3gYe,kve+(e&PY$D8x:$bJ43>M$uw2T]:ΪthB:uEX.l 4h4l74D#D׋OyX[RIT%/uC:OZxo AH4-L)MG5]t// =j^R4-IAIZqurJ ;H;Iu ,Di^XR}鴴؋MW&, vdD_xB z{fWqtU*(3Ah"['*>"9vAQ=rnE%5h`2uZ|9ۉX'vI4%Zw:t]盘B:_dڶAԗK*F<106>L{G}[N3v~g{KWH*ĠCdģE%&D3b-8ƿ+sZ5m茄$э|$ s]3:XU4ƣQ띖ʝZnK\D|D;ZId]f\Avg b; 00[8FЙ_{jGEcz:aK] FBiMIhHN\,9m}x\S׾u-U[c1[ =F;󵳃ϺyA:fEyw͢ 2ҩbH3V s9HTQ_?Tɢ¶ḲG8dʴ4ςj__(upn$SKrNLbX@֌!0GHYjKbaNT]mn?h' _4 RrOΐx22UkqFff-QIl% t 훾_wm$_𒅱סOz.iu`REjT&Ã]'~=F4ŽZZ@ d;>H96puO!d>+*X%smVE&vU\M14}$? P8=|vb{bZ0@ rwbTN m  e;&ߪ2oa8TndUNMNoVTD!8hĩi]* %ZU4۵W+N&W#{μ+@|1RoF0u!/OI4ѹ[5N=!C@q|)Rx4Tg^bX\t3Q/^"ӵAfO5`\_!Uk^s驏o<\+h4]h;yL5s'5-qfuT #ogiǵQ!Yl|(Az:TZ̙\i3|&B6pۨ5\7H%Lh۸k%EJB[ RСXB *V/$%uR[I;>nIA(ϸъKF鸦N1'|,7K8Y_!HqtDssK,-kR'ܯ^DoE/#l$pg sN R29>])&ߋwMhQVu,{aہ)e+󊵕¯3yzLِ\.GɄKrpR툏H`8jCVbyt!vV,cz8Du<ry0k}0pNVWu'?nYjVܣ#R;(ౢ;[qRml%bU&MaP/37!F vl ;Zx骓>R F,2V?'6+z6<ʉ<윗)- .kbr ΖGWrTt-#yQ5hfOㆦOnOj]Ijtl> stream x][$u))NV$ɒ$Y bA2խo$pn)U5 '058lyx.߹oE#'_z{-f_p`_]k# m{z^4)z{WGii8}(tӟ7_S~F6B^Tsߜz yJ7/;mO7Uy' M[1uΤ?XmHc_l>'ۦu LV(4O86;i:TSҠ!NCo>ydT}ٴotix7 [ӦC? )5ö;m':FƏ\pm#̇f6Nx?_r7JF7!y}Vw}sB䳌q~ zv7Ot&)]p.Sk6xv} qB&!Zx^ğbڃnpOP-b|?}.@7xafUdl*F:O&mb8bC\i'"Pdai;F OD|>FXo+& "rÏGHd*yeڼe.Qy'%F2utCe@=jvaeR"!:aקQߒ?{ײ:w]+/Ѫ@{8SϺ@5~JP; /KqMBOVY9CDI@jU@D[hc u1]4]a .{\́vHgEdɔQGwpB.eJ>~9_khK[ XJ뤿yE 8m'+ڏ/uIZ&iTKC , ^yV&UES@<qw E*cIݟPD Պ=l!(K1$Cj Mz'1jQ2I^m`ֈZ&C15)l&ԋxpwyJذۑ.$ř٠#7q<6lЃɴ L:qtK½eRHAhF~E|TpO.]>GO0%dm[)mG(xkfwZ3j2'8V q*&cm' nkkB}!q駡lZ7bkm @ӻa$TP[~;1E; Y@xs)[@m~OUm -0($N(3& f7 (RA-)TK Πt Q9@i%tL/w Lʻqhժ~qYTvфuSoCj+h$#f[.)*aj*]Ҹ<:fLiGJ&ID;xϟ2%q Q;6 Xkd r̾;dð}܎U5m0n#,m}t8`zU [ >1xI-CJН/ȵgA(_{@S$/,ϋePE%xY4i qJh-IޯѥK!J$[p' Ȩ&˔52pཙWy- F>#1n3i~MFD ˘)0%;gM8EJp|!ց_!(xV)B]D5;OL6XȊ]ߝZrHܐxw}R1?H/Cߴ bU.ͮ~LZ&x2QbՒS0f;kaUv`j^4q}ŢC\(y<ݻ9ѳROQYsg'MڐE=a+N,ŠݼA)i)rWE`v@TShE6Y@k90Yq`hs(U8 o/Q2b&~G_=q6%t{L[I;yA H&KNXU%o` % LQtXdQ(sKCbg|+4F7.4ceS:7+f//2JExZKc[j:wGƔZmv hطL| ^Qd]KE^2t\X"^n<}A$3/K<@?$V~(PgnvqpX71K,CRkG)y`.Ʉ'ʙ9kyJR.$?TBuZlř%:H,c 0Tg-cx e~\\E b!hSB$Hف<&əh)? 'Pw+KӪ"PRa)[{8D s.B7y2:i.'Ӿh6%xSN~"P.K^b51\LH`H[Cﲱ^dGsN.V|e ̍IdL,^T0 sV/|'_(QaD뒈iRiNkCe'i6IRU~.D~P=4_p!NbXB&بvl 5{rX).Nc`]N4ih?aD14}a4X҃>] -L.0Ȧ! j1]kk8n4HhO'[{sE)BKxEѹ#ڲ}1ߝ w[\)պE4R8*טDODbV2koK$qUV:,zDc)yx\p{#XR *B/#z: Rz.t29.(y6arݡok$ᦶ(VAHoIu?`AuRhTKA4x~Q5Kc7EK2f 0~ǫ^O u Fzwe#W>\a"\_kQ%];8%8Gkq B w3ثuA #/pI?zx%?< l`I[d',X{ٹk"`]lF ;mUk8Ot!<%[\k/d\%.0't@ZorGSŃbolGSm v=cqQ +}2wy)NbwˈMA(iw^7AՁ,Y ͻ$64`Kp3vZ9XU}(F?$pŬvFY:嬂 e4R4Y˵(g9 !Zȓ:n %] x ! ;wO?=d5虂X!JBaxoX&q \`P:b/^]Avʐtm2LLK_NlHc[COuor:1 4ل4i\ѣ:Յ3逩kXbá cnR0VtK ^C(`jJKrXt ?>ӬB">DC^Ёs Hi'(0#NH 1TsQ!U!aByԕ$Q)E5q%RH>k?KKwSoHxN=>Anr9f2̂@];?k ŘҊT"ωS>"db1l͂#g~qzu587Cv2SYN^R}#W]&؝pJЉY9QqC 9v?$WUprp*9xPf$VErOE>.{Bہ}ןrEY(|]BVQ=&Ht[vC ԯ_`9Dg;eT\g k.u/۫oLNm vS1ˋI,c, ܩnD̩/e];Ei8-s(q<b8RK\BU VV[)&Q[Nm2XSTF~8w{[ywɕym ?3U9idenerEXp>~ȺD NIʩib5*M,3{?nX\j%zzz*ܬˑWJ ٺ]rr/uOTkgy9}%=鳻C~+"r? q EH''#DI:`hL'RϦCFrjbˣs:;ЮUu|ATǵ_]Vg,-vfQ ;Ҳ4SZWؿU"ةF2(nâ2E]<7f?ߒ"T6/T0Ita/Z?d k&xs jDBPdmi6+g`Drx' eו %mQp(~7A@ڙ.- gcp_Cp \sȡgF;ӹdœ\t5򞀫 Q 9.RMb=嗔ঁⲼ#@Qs+1Jb0qd&a4__5bi! aqgFїg70>qHf>Bu֋c ^Z*E|`ePz~~Sr.9$ú&'AQ߀3.P.k۱QduP(hb͓E^دCpvC^D7l@H6D %8%I M{X`X/EqzUa\%A ~MckHG2jw6|@f}F|gZJc-@aye3հ7ߕϟ)@.ϚKدy(KasYi՚8vʉOȄ6O2-rk{R⠄xX0?b\f5`t"ԾA*EMS X,JOBӐ}Lu`@?ɅY 97Ȑ gΛN'\8lm~1h :]D(|(]Q㹣n|/|*qTYy#~wһ _˅xnw8Y6t=w"AŘF1a5X85>EQn)ݘEzX[b4XZ-6@HIͩT>sN_q4p̱(Q?׊$AӒŔ0+)`}nŋΒ-gJ=Hq7zF+b_P!?ܜ-1b> stream x}ے#W'ba'YwqXMHfts"[$[œK(kG#c@; ϯ~-Y 7wIwc:o7o޽bjIo >r7NKכWد.X'Npø ?}T c;pE}.u{'8]y%\&,Eu~6inKm_-6+γ˸7,qV+,봗7 !;T&:yQ`BNynpvN˷Yi  f4" '.Y5ϭMM߇!?ճ!.sgzHؓ"V]";m9zWUV圬|@W h79)y: 19PP ,a йeSwdo$#Z4e [)|:I;a󡯏32й@ضqw(40ޥNYyWojd$gKB ad >;YQݭAbÇñDqEhcZrT }R^hΤ֟>S_D`Xo2 sܨ z]n?60 ( ªP{Y_ucqhkL:h;Kck'"P{0+0_oÈ,/0ХT ]ja3Y-֑z0L>LJeHy}&ugu&§C)R/F_o%"$ 6uq^-3\g& 1 ͓l.Iyv7*\z;c5 ?<=>8B818Džh~üdO,7ԨU:Y2-oGwV> rlbÀQ#dXlP2UPC t&22\f2K**,#i+^ЛTݔYorhPi9_w}āAɋnx\ژ/B3;~fLӠY8OZȋ57 /%up9,>,c8&ۨ"K$2oBq[wOQgH>gde"7 C\5煨J1!4=u ?;k{9a`BqˀɼS0_gAk'4xcm"&ڿC2i4=TVDt/x)nZ'Q䭀oL7cQ8Ym3l 9!hiUq7rnB-A;C&WrJJ Oѷ"r=$5XkrGN̗Lyn֌_Jo^( 1bY Z,[5 j|)?`k) S@ZdyG~E` xܭ3&S%VQBp׬ˮ&]Pw扃{Ym\<׫d0 cyG (gN`s1>zi"/Ƣ,/~؈.T6ʡ~6~OL4|̅<κ﫳mYf3&GH k'I|N q če#q;۷ʋ!| H]n*Nz3]G.p?OI@[@myC6`5\)/T\-LxjN!Wo-( Q,Gi(:S8z{Xka/Uu&(-U@ ߙ#NP1+Yn#769V p]7Lm Y]crQ|D{r8ֵ]x"/pݪh xaa ' pqYY~NQ-+̩TcG+[\ >q[|4nZr/G+-ށW\zd\-&8XKJeaf e`ImJ@jR ~ D0G~u2$ S9#Ӝ^ׇh^c:XѨ$ǀ"hJAa-1PRi^-/k1]zL]&RZuxmY9"e N"=+S#_cKq N17sK.E@OLN]j{3+bND1Z&N><ֳ8zQ pR\DF8Σ:`+M}5'™-^lRN'h;4 +/HܫH}j!.b晗e`cNLS{8OΧtb.qbI$%D&vb.=7.U-]ƏCL?!xu? 61 `E1SHbß: ;YX|4" Ӆ^T ̦L`>踏 FP 1HXGu\)0`VtNu%<|i< 4o?|79n0Q6|aV ;s<׻)⋪ \'%ą#q }5y#Dg*cCPDQ+ǁ9;!6C &R^O ewM.?ZS" z<)|LRkJ Yo$]6J 9>"!<1-@ѺsE=x>ye*b֦M1f/25 > h_`rJ:_I0x9O hmO,] ]!S @r:EcT`HB``a!1rs؝0MA_1z8fb%ҌR06mPf(e(v2OV.t NS$/r=8w$ us^7˔Ja3Ƙ< dYAYW(KFJ6O< Bx@tCi|blpL[/h9uMl,b ocq '>A3|3^&0HtwH%GD8H)v DXUܰ)7.@=ㅅ0IwtXOBgSx`fx D})͏+ .5*3 Z9T׭n'8 KAhIZx΂3҂)W\,&CWdD з?XDYbqYUZE*: 糿&%#Ŵ}&a?F>&CÚW%ښ=3Hǧ%~̲mQrn|Q}WnK8h u\82J#:Ч(Dx̵:;P6^ a"_Ru))O"7QJ3Ԅv//- dnSML%Ⲱ}[m!FJTI) BSņ\ {B <VJ*zV$Hl1$1S9VeD%b&2(L@Ey~jځjB &׽ŰO׽\o~zH4y wʻ~u:T UtGr/HhL޴jYoO o`#ϣ1TGNuaQ)DŢ8ELAZ6 Wt 4(x=}NB׻h)fsD?hbI'VdMzd♦ZzJx\)ts>i> qC [.z8_$G#нKR9&#f\1j~ŠQ@YUX[y<ⶖtrxȸ1\n"x$#gADd \&V ~kY&c&¥"`g ֪d垶|R&Jk6|>0ӑ+`)VV<+5G ᄼL݈yذ»R+oIto#B"[T) zzÈrDj1D+ͧ[򨩜- #K1~ }=rI[(Ш}1k(F-dHxNPI7QP{cb xEgec5P6`B1ֿRs9DôU1 GwcVi&߹XeI 9,2(c)]} jfh's` 1 $G7tRPN0hS|NҢ_Livr0A|-E&kxx8OIS ;w BK"SCec4b1"4KZj$D5wآF#T>;^0y [m`4, -! gIp.0dZ* H؆J}Zz?hF`iɽ-Z:.}fYbC%Ѯ%(h1Ն%&, -o,- O\m3#2q7-Ck>SF(BծSuq#ry1nWgv&|n-?\Rw,~ ˶&3CW-Ң0O|ƵbQIZ<硌s^A=^h]Wç>PF3xmx6o?('ppYZP;;I WLm"TkҚcmbLVSLӿrܲZxʟspTU3٩)&"/qbr$S\L $҂W3|jc 8Tk>R!X=S1+:UcT<|",MqMs!#8LnVCV9`j|ʢ}LC\|469+-٦$K1unTHFnBO-ʆ"'ܹmS#7b|t˦ ]Kq9j`(\a|,%5,Y~Ėy=8և jZE2N3_%fϬxGuD^0[u>Iqy0H8&|ZI\|r\7Hc3ѿXx"]h0!zrfb1)\Xi2 8,#u E04ot( )Ū%2u铠ϩf{S{ďQnKf ڃ(UrEy+pv8`kbGJ>VOk9 =(:R 1 eSz wI\R*_trzjG1v  Jy\_:)ǩ_R|=x'ed ~N]ڼhY)(%`1 7ʴxFL$Q();/95>[?ocDЫ .s4EDw,}#T򔂂F6o'GJLuN/%(n}\HǼW `:Ug汎S>ZDsAW֛ b\EvSDauIjyӻ3I+c$6t:u,Y( `'IS4`ч($,l(ʿKT.=J{ۉ\]^A6ge_(R[`9Uq 'I-9PX5Y~ȉ(ncΫ57e;e;qLH(/{>=N Q'ҐXЦ|+Z +:o:g. ,c W*'rj%Y5g[2Zvx\jL>yHV^Z5ňCv4*1:j_%JPu^'JV̷a$F۴79WSR }JB񆹢d*՗ӤCDcO^Ma:e]i7UUQ p}hzN7YUi sſrOiu3K^L:1؜V30vjDLoZJG5"C&x#sNʱ:gSGѾ)}Ğhl\ (MSg}lT;ܥ,eP dS1QNQDmdM|I 9V>n"jmWŝ\?kTT׻uwdlK)O*6CM)BBzn ђţ6#BQbp2X`~dZ_IQ,|O7Iu\|Xr~ynEY1 SCrڷ\@U(_ flZ d=Q3+Nx)9 4H6#D9ebFuƪlk_F;أƫӢ j8dac% >.kRw3vc+B{K4$o$U+U S^L)qxz|Lz".@\_TlrSTv+TaI_9, (AZldD~pI&p%/uM(d({x5c\(ԣ H^SJOanEpaa:T,<2Zus/0 jT @rampOI 3L~ĬU=1>e 㲚;SWNRO8wlQK&§1]c'>S.)hc|Ȥ!p` ms 2CidH;0Qa}lE[%F AI82].GBc:tfeUM(hv/̈́NȻyNPxjC:!=Kendstream endobj 80 0 obj 9762 endobj 88 0 obj <> stream x][d9q&[~>X16P]}puUoU5u)ٝTґR_~yK1K.R?˟ .՛ ҈!H{t.^ӅfN3n.^|6}{ϕ桤ҥ?/|aL+9Dmj}}n/c(sPBg *3jܦ:g~1gaې?E*^ޕpbp e~Px{_ 1D.oA E/!\J4ax/zP!y駿0͍QF͕ `mI=DDįA;'%n&Q z +.OA9Zxە {ϟ *< Mg*IK0NCi3~K[cΌ􌧾TOzaŪgVqԗyQ&P^Ah4 R A(+nBH~َ?twߍ/V>{u@/u8Ƌ^/Hz Bs DtR6%dgtZ/7 o$`PwOxc`4b~O>_ӟ[nu١ u|oDotΖu;b0GMYz{O X$գ:{uBexB`Ul0QI |4e%Zg.V(z[ `'O]TPwuR/Հjޫ-Ws"z|dK !DwǞ!?&ݵnO69LsW2배h0b'߁sBDm{CmW l7(t{V;-tof({^>s2,W:~5q;įBd[wxLoIYzX6] >! 9#P/ 9cCIf}8iPTLx?*6[Jlj!Y@6=f%à+ڿdHJje!|Z&,EЧS q&Q[1o ˳y!vBJ1i3} ޚPV9N5#vߌ0I $z3Icr&,pڴ]Σ:5l{z}͚ހfhڴV)=ln@)k> Kk(2}خyPFl7@V:6vpUL xL-q9G&D6BG!5m8v+ZZ2fi xCRx~I6cllhS6FN>A/Jl,fL bq_CVc/c7tDRmEnH_) o5ބ1%XĀOk(L`3a"vUd٫0?L:gFUAI/!Wפϝ!N(/+|L a1/T'eXp9czB,!\x9L`!;[WAF@lPf4F؏6SL1/N0RqB ftL'> _/x) ݫhlXz/,S~ .6fU%isЁJ G`5kfwiiW" z,cbZM|n|oT<( !~uݯְoTDJ13+r0;/;ھ n$j]<VK) HvEX+1 Z'K~}У 2A%ttt>Mf BPPds^^FO-$8t03Icضdaj٘7ٌ$(lljs*dڬ9^)HtbgK嫧a^SbMrjNFa/%CQeMPn^s3ޏh'6!o%Lήx0>{*4儱FV88e JAnN[`K}zz(.* /ӱD=>]WS&$K[\M`bXo|lUn2,zK%ڊ 뒘 lqMH(nr>t&a&Ւ+*P-.@|}u/XPdbx&eAADmvӶj~ed.]gWAxZmtCyN!6dg-qӤ-,&}?H2?<+JK?ozi E05S˜&]edxD}C( tj y\Of&^Mno@ %e(vu|cdJGg=ha?AElt) -$NWR+P Lkuc6VanbF z_~vLU}1/ESkk ȉ(ݞ_)w >KIB.Kd]#*[E$o *3W]jqtn<H=cVo+ eoH)Wf]˺|0=LxQ*>( F?,s-L&3,zcHsK/Ykc+ B@7(jc&ڴ# 2ۖq!9 Yj\%vp0WPwEO H[|z;%]RU}05,Tc&Z;a7umbɣlUg-tBo`Vԛ A*|][3muyQW0 mZe9ӗSlJK)}y`Cyje(MJ Zg"-'6`Z>/Po&qG6GIr}or0D9m qKȱDh_ nۺz\g\ \r! 0;YL%,ɫ 0:CaJ-xqT=!`D "zc91DU@r(.[x"hs"Kb |o,O Q@Ez[*Xh$|#}W=V~S X ⋘ɊE^ZWutJN 7*zQ Ukd=ţKjPOP}7ZdUT@&Щ > 3+hk3tbmmA9~@nA6^RN\^f5Ш&Q ugk*pr; "\n6P8::?Oks)D1҇uI Ha(^0n̜z) Lxԥ5P*VQSF[,FyFa7Ktq\]7Y?5"&=_$z.5X˦n;&ڇ4vn#TlvE+0 7K +YSc,XgT- hR˦Zn ϊ HX)qq3?DPP:Ѝ֎kʁr ݗ#.`)Eа2ը맜uibsij<؟&f_IYCfݻ̶`I9a~G-.gbCf%ްqifPn@(߭eHX{K*X|i H6HZTMbq48'?oR|~SN 4ǥޞ@ԓ{:XG5.=)ƅ<޲ry["6hag#-M>J`GUzi*W?Ϧd8D TWOFz͹j ->HCTGhj#t3%ZS*Q̅^+sBHcm\ʛҜ%3&g]X8 Y3'^3e ,#ӣX!CPdglF*ϥȆ #>Gnqp:+roa3-ê@(U3kwS1.4ȝYiZEZeqvs"zS`1SJ7n#o|^`,y(UZ,:_]Ҟԋ)I 3On z(l2^\\2A2H28"YE2VZVjA65Jz.[ 2SxB~,|LuH(7Bq՜9`s\7zs Cyñ{ȷN3+LIXNKg5+2'v SR*GcUrNfs\Ɗaa[7Xs\S x/Sʛ[D"[$"EiQ7L}ÈE/r[[ע32z 1\[ɼzt:V6U83iS%;s%%_@G?p7[qom_u9Shi -ȅCoJ =gNN.2'p)1҆_`7b<*ix]_{u;N6@7іs4խW20* WYA~3֛eEt'xooKh7pX~B~ܩؾ8M~2nS?93L m~fNV L|0W^-RY(G(哒_;PsYVh%0g1^dH=P77tC&Rݐ>)29:=6y`[%ہ0"S1fN$c࿳4e רl:uc? d)];/IQb[=FK^F){O X($zFIAR# lzzk3z"=]rBp AΒ֌9C~ЭṌ/+3 3;BϠO iRPWtYdy^=։Vjbz9nR7V?жbTKً,}j"g|ƯVi[*)䝘.F,aX_^nQIWTk?{|,$8ɇ:+TAsc.W>,L'`neA[8 hburGZcv?@E/=^fE%)[<As /L8'A^B{x~hRl/4L_Hx xer\ |w38>$M:t=:9bS,O<#)q#t? '+ﹴxZ,>db\-, 6[dc2{'٢F~˴HSrth %TiG҅GcywBIzxéڞO?=Sqw/}^ ~7ξb\KoS38@TtϭDq=-'Ksa=o$A]rE^ Y`I?u?Ռ)s =%U:rX5m~]P C6Gq;s-V?2QLt@Z?K#R`:fĂ^|.Z6^w;5Ҡv_#ձ*}'(o/(endstream endobj 89 0 obj 8219 endobj 109 0 obj <> stream x}ْ$q 2_Ѷz(Rq&eK55%Ѩp!u#3+"z: 2af*2#=OoXoݾ7<|?|#ݍ鼕N߼~*o7VNzz?kxݫ>w:i4 n7aGk,xκ<u{'r1G[/W1* |oj~r{ğay}`J;u6<{J+^!yu^ `_y:Pt7қI{sXS@[%șmg {᰿];~l|t?_pwJ9إ׿}Wv}V_^a N9> xǁ PF!mit8xV%rr@诟~G#rsn2K8 B_W_Bh/Rd:kE/YNag`Qڀ\9auXGo[ݍAj|@\NRSFFAf=p~S61S+15 0Ss[nZΪ&Jk$=2Jn2W1p {(24fv_m9[ 'p"-.Wnkm]Oj[L_um!@4OqVU7n\wO63gvaw"$H~.SIL}Ǥjj  Y(aO15Q.}K2Eϥ?rK?Ns.I;0Ņ"jDqg[Ӊ`ܑk1K.h"x*k>ɘ84s|&Ú^r=WJ*Ufg8ܝRZ!DRګ9"Ep_m *S"2$ ۧz4-!"Y:Nʜb?) 5e$9J{:6d*|q;|8pIP˜~2Wv`$m2'J^DR1e ٿfy;ASxF05i, wʰ054/ߛ9JlM$.ٛPSAz| hS0k]FCB9P2FZ ݑnZ<V?~jyX?oW ]W3X; -5LZBr9~PeG@= $,$CzEid(kJTlkHZA;YО-Gd>Ϸʼn>O%B,ccxaFcX F}QZ V,0~JC۹c$ UlPdl^x{UgF-#/\*'+q1,Iǘ ̓;햛cwXlMď@܉.( we.\2x&)a@QY|@:E?% ߚ5jZ %m7Aɫzn&onD$+ AN H`e%Ehw-y/q90'Ƈ2< KMC U(Z~e/%yK gRe(y[>tchuC*kZܑc?؅T2$p9տYW.Aws51O.{ ,!8$pzsh a ECܱnv0Mz9H/T-5)72Y)ebq :bQ #5ЫV=g$v`c{&fP=O5 DP ؔ0(X@go_ 2<@C:`~5dDtҤ}0zV;p(䎼JDqTvcÀVf>L9Q0:p44:Dl8%$V-0f4b|z}THZBu9%~ErG'{>O`Cទ߿<7LSW$QM|:&Ӎ cHg#נVI&w~ML[+~;>j+9&Dvf\N;)r:pQ$ٌ%.rd'ʄR7̛V);2j1d+B"+IE L=5a,+Yu$u@ّ-oS$^)ԯ ;(Gqk:)vxV| T H]g(C@4;b{k J9c0Lh ~tWAի'/49ktmf1l)\h26aaXKxWetAdADX|OTh&Q+#5 WE4Sk,gsQ J o@h3v$3> ZйXxjZPea+}`A!<3Vif8XV9 5q-D@\"0oD,rA] 7ǾX87 x}A8suǎ2Fζ vʹRx(Z Z(ABE:e@3yҘ W Aj0 FTXY ;.TPxcKnm鰀~+0Fa9`tFŌfX` .=-2p!A,KJgB%{a1ސո,"שKPshN] T0$=U{ G 2u~7B/{0DtL [ G/ -/Av$ FӤ"NeJ toűDԃiH[^+r (ݜh.y;|D4{ w>xd :墛ʋ{ jPXkYOAʯ(;ooN Dиbc,WM‹)X?U4\ī_ZD j@jj*!!XSpS |t"ܠ"|Xm]hJa8$ ǥ9XF.~J<:ϱ~Y雅4? b:"oΡU\X<t|OcUʓ> q/VИ }7Bb$>lZ&xQnPխDz  )eޓץ,'Q3XG4OjKIS! ǩu] E˜[ﺴSpL.NeB &εAgMưX_"{)<=~]^fCˋ9U17Ƽ`J5A Nm8Y P'~WX1UBNO=10#.ZNoLC`?ڲ UR , 8&Ku/_'Ebo-@M& :cCqOx9ǦS[h$B%~h5]5q!\`cT9FXW ԂϚcj3 4V61SWU`f W(AYB{ϫP8O  JzM4'{Ϫ`ƇbѬ-56cEMIK>! n6=V&UC:BY͟A'k': Rͱ ݔ+Z+Jk glX1#SSbfQ1/>8WRb ,}y^_,%xKƪQ~.dHlT.-m,_V)5Pț9Pa"9a|(A 6@3]-Z k!C]<1ϚV XU;.^πO"tueqLW˜RqpƞgrD L NB7nHXډ+1H;dj.L*l$kqʉU=ijXP uD-b(Pv.?Cyh2BaBP͡%:.:V~:RxϪ "qf.AU(?ź%`]o¸ qįErhM\Z/PFF$\(9 sT B`IBRj E7wu'7kґItə-|ϲwu!7+ 2g, ї/ Y,,7HVR"Q͜rJf2?VœG!@4Ǥ4wد$2Uǯg"2A Ka `\zZ0ƶa\qc,He=ذ%!{u;P+`cJ8X#&WZv6W8C⦚L{\AY/BPc,gib@[ti`%?8RtAh<z}) O*,hJIJ*H= x4:IyݐM^`A' 'nl1 ,"tC:KIS2S~q)O(yJ'#"w0FG׋cRGRj^SY{($Ѫ5aoѪ[6B#PKHb͙С+He) n '8 ۵ȿ-avQN-~HdN†`’֑JRf,iD.u5ju5 H j8~%eB%KW.NAA`*Vzx:x+5i59D~4xOG\IVrio (I-ΤTh /ra8Nc!Yyӻ /S,_~a51. ;B)=҅4tnSiDu );jk/Z;y-ެ8/bk}FD Q+ɩBJ˹wѝ(߯7dŒ~n9t'Ԋ:ޙ[~lO*3]c:]a?1vFD^$GsLSf6-YW[=oS94t^~ SgGrt̼ݼFb؅ŞiulqxvAV391w">JP; X~.{ΠC/a;30 Pz@ӵCawłq! q; wʃjX+X~xXI  h,<:wݞh *-lM=؃tP `џv]0`ݭhZdZ{Ơ!?܅zp)r<]"KVu xIVLJcx #jGѥ[rW)Auekg>9[ \:߁%+ƕڣn7&B5j"qsUu5Ԏ+OUʕLxy~pJ#g&Tea &t *LT2:YF&Z aMV졾U*וX X#ҷP\׷'D/ѷ#36~HN4W`S@1JAgy Ԛ2*5ODUZsɞox~7N+i&+<{t_Ps;xRqכcNA "IuI6ka%+nG3LY.w /:AVh2oOQ=%ua5j/dį4^d!%r3[ډ.yJ\uz̖wUC`8gS%/kt׎ w&InV&+^t#BV .`>AV@ ;Q;-g\S}@G^s !%e6J:؋¥8sdc@@EVoK@Z\n}Xݖ0_|嶲 x刑@ |ӤJJJz\+),F*Grt@ً \s׆Hap'a:݂`xlwdbrEP;y2hlN1t$5x ,%"3, 99J Э2I:kx'QT}kxu20PAfI$zv(ʥA}KtgȔKI/tcDNq⭢*ץҷ‡B5 k`Pob endstream endobj 110 0 obj 10086 endobj 130 0 obj <> stream x][[Grv\=%oq/v&W$hcC{S՗sCж 3}UUw3/o|?/^>fV:={y$k3e#}|OW 3yyn!獖^ow7|.X#70 &7J?;獗ټ]|;GX]`LGɆygbSQ6F?|3hnK>Z^ξ~5P:0;RfphÃaȓ'1یRK1y0i:wBo/^DbOtc >FK ĘImX 7kn6צ /HAZߝs1Dxs|s`Zd"x^hk~SEΔk*~kliN ]ذH^9#o;x8:{TFk!VG S`]< W0ۙa@-%f9؃w8FIW9eݐ_6 ֝mMkaw@G_:&fYRZb3#fMӔ]+oFr5k2}ng=&dGa/{wKwjd``T1ې[_QA2;0afZ2`HV`6|k&=bs4-ȟYn(#r7x1H(NƺAJ?rY>=\qlkB+wo#gtߤQXoDY}T[oW>υ梀\fz6Lg.2X(|L#62o )fQ@d䱱1Ewz ?VTcmLE\a3%`Zl2H[o~ #8a^#kD۸~ r{{w$,py{`oO [ҫDOg:>,i۰ "2 f4M>-G$U#OiO +TNOyL?|r}蘇z9 n_,yW"M3uDj( 8Fjh WnqX kGMor/aWMØ'Ը[ׇu" ̹"}Lh"~ 2;$F*Mϯ;mX&n`6ˤI#{n{ud X-.o^]a s_2 !E3 K`{i퐅98p+ ‘bY-Wa"),h\wK)QFyݭ~nu|0LҦEc?³< 1 +s$o0ixɳt"/*-<ף ټVxԵۃ݀S  aX2KVBa~ta>6Cr\ig&ǩK_6ڒ,hC!"FGol~(kCTYlKX<ȃ`9>N"0E\l!˾:SjNVlQZgyd@sב/e`h _<+Q^ 4h;jvU (iM5G.$M$fzR|(_}Gښތ&j&p5 yA_GFݜ8YZ2G5z,YXX+;Jsq%xkq] Ւz@amGղQrTC< sG\+A4#SD,5BYk)r(Ro2`Xu?smѵx m7Ns󳱇E7W2B+PrFӺa^! DuQerdQo?q&gKf锌d:dNVvX ͗CYy=K3E $AMVi^n$d/oLZ{ VEi=xDax s+Vu[uթ,<֨ "۵ ^M&(\ڞ3у-w~. ) E{NAP;'Fß[z} :YLlzǢl-õ)BQ E?pr۴cѣgIƄ}iT&򽌉T^[䧂5tkV cK]ԎKtM?B h4t "`&Fb3VI #| :':f4h_kӤ){NO LɾsSvTa[TLSށpL?) +x='7S O&ն܂=VZ*U@bEa9aأj%#sFVO$ܷv{ϱNo;3LwϚD#U)8[٦\ɣ,[m\G`𵑀rARL w)s`\^pD Ĺj .H$)VYlt(ɭFd kJaE5X2-jBqsAͺI%Q}i u `-dؘQ9l1;#%oS,]л)&qհ 8P;.?K{ `R/o^&#=a^&+@ 5I27ƺׇGF`ZnYq;x 8HH8y#J<>HO' W^$} Ǚx5L#WJ'D3A *HgZ% tMCXki=G)*\m(2a0<+P$ٞĊa݈&}Q 2U0xMM.""@x&AP C9[x8?&##:ʳ~[[ 7%LX@V;P ^.? O~;l?Iv*)D'l%馌(I%p#̹ҽA:D&Q(jl1.]?lǙIF ý!Eщ$*<,ɕH, ﳾs 䣪oNQ}0}dΤ;*`gT>Q}UEU洞7VyD)tQKQqΧEGi Yҹ5Cg :! I`:(tЅkmC(E>\=NN;#:vJ4]vXwԽ,"pnFtSYGt5Xw\Gkw>Nb]1Nh:0u"T,tt/e,a@=&X#7-^)²'$aN;GX!fu QJb+-c+ UcAw hL`jя_ϲc0餍 |`6<u2'ZG'cGvauFn]qŹ8NXmܼcu>Srz*qd$d'`$;MO(&'F@y6>IAҔ|X'_q ~@,V+OoN Ă9O};S֝dNp읈fuC@A9e}dD w@n~@n< LC>jrQXy(VݢSE'ݢÚtȤSƒ;b^]cmNr%wIT)5;onV5,VH5vC/Zhi]ouZ:`ZPRjJKw9=ϳDkE:lAGƯ=ÞUm|1Fg˃y/H< 8BnꮰZ;[!1y'.[=46Ռ\t>bgMG]Wˏ7 EJW5*4V,[uS: ؏h"eؒSSʄ4rkݓ+vRKkyGj[E.8%FOWK{后zeޗl8vy#wKAg>n鄛3GI8]HEj:Tt!(*Q~j6 gT޴mA\kߪcK*/J& \z… Y^Sz^M9  m\>DXofazpBEch8Bti\.GwN{:hd~EkjK4W~ʕ"d׹5Y\[ ٩n=V0X>:ݶ(cj_) !nz H%waqX4!Ɠy{(dNWuB |L)H#5@A_R5AyYvC*-5s*Vi#Y6v. RE:þNΦ8̹sF)"֋$8 J\$yfܕ?uK=8P-}Z^&(/.fT/ɱg9bp~1JSlS=VT[Y <V@>omZ)Tꩭ\w)9/w8v& ޴*,ZCOT Anq* "PP(*-A$۱TGxp״H:~I׭(Xe*1xNuL ?IM%,E5M)5lvCSZ*CZn_f-,+ٵ#:R= s_$"c}g6nh@ :VD"1EnZ0r,UN-58qӵ mޘcme:v5Hr9[:Di 4]&5.Y Hv3Pf)ϫuȿ{eKKhH0YQ  +YKqf^/aSeQ:e} =V&v47 9G62 $K&kTz2az#2NW-To0V'`+alA*`1ױ㤨R%9$I&J/刚VUhk}h:Y:5]tڐ< 0tUInJ⇀=>6 CmxCҒ㴧6T*'R_ouySx.[4#̥*%5HqD'Uq|@Ov8GpÔ^sɩ9`Exc;nf=>^lzHn˨mh}][DjqXZ>R-'en9Ȓ{?}T0^`|~}/OivYE |Z0Egt4TC4^YzmfN"XP=aw#hPCAQ[i풂ū6܏VF<&, 8bpr}6Šb/⿹-6+71#Ŕ}ɳs{P+)W$ C^VrBI mWB Q|mxyoDr&6J唁W_ao^/wwU]t-lؚ.ƴO|w{Xe- V|޿^b- bqA' +D.)R-lνlPeRٮwKߢ[ ^- #!ZJ n 6l% endstream endobj 131 0 obj 8700 endobj 137 0 obj <> stream x]I$ux& Nƾ,Ho\kU2#ދ!)A4Ru.o_x7bo~F,o_F7n^݇ϧ# oc|n?7K9X-\/^ǧĠ%no)q'hwյe *N eRU^ɿOf\s&+ 鷯#l$,;?ݧ7qNpVAzNyI<,pMy nra3]uy˴{;Oc&=ŕ .`oKl,/#\to# v 0đp 2!1^޳ oM^5n^PSpMECZ?4Y*JNdi^"ץ~ptaI?^jU> j=Rs=%rz+*'M LVŨ޾t FE7xfyRMX#⑝,5X ! ӷ#|݄ )7w9ݢ6۬ZD)zFsIu0[oB*ʮBwq7)d51%bDfe#&3Du%?Q2ΜֽFIc!훓zSnpP_ris՗}uyk]z\B)3GNOXsȗ:ώtXlOF'`~0>?Bl:[V敭Dzc2h؍ U(|V~ܭ^V@R8vpS %ROYlo+L K7H! W+r=KDyAOBfI'Deg,g,J2Y,Otȕ8>nW:ۅ-|:F"e/}>WKڬ?$yR?[W$@x.1~qH׊H"o)\o?&jW$ˑ "+$V3& "Q6 8djg+&k"EHjj-ַXܞ;*},Pll+[jGR`. v,eh`e\%Xs$Srwr^!Ii2,_=tpT{XRA[oZ& E+} p% \ +GH$}e]D(a6+M`lQՆ\&h 7(~ŭ[or聉 Njy:&.${ ke3$9* aH;AMĵSޡ0zFiՌFpP7 1K:랂@T}֏Eя\:ApcƃHSp>rp$mڔ43A2<9!=B)YiBXmz*l5[B X$ԒIv5$S+NNfX8T@ZqZa`Viy֧UP[j>8 ,u$"˷2'[ `L)#Qp/s~ɊJUxcwZM8;W {i .d.wK̲hbLN Q(sQ$M 3p4Zȯ@2dpstSRM6TɎ֕2I'ŇfWSu{ZoVw7Kȑi\5]zk@U|LCb1?/Y= luWw×S"҉2XVaxVs|ޜr q~r?(p89!Fvb$TIT &'4fzYn?'XUZK:̅]fd5$6"V*8ÌY>*^SP-!H(;* ђS#*rt/AuTZ6?o y FviL65!sOC"q>$p4ҝxZLZ%Zi| M09 $eʟ ,lsKf=Uk1PiLAݼQ^Tpx#=ZJ/q/{`+|!z4}!z(Z>}ˡp?(EhzɼrÒr/wHךȘ 7[ˊJ)hLl>85KuIG{zȿ"(ȓ:q.V}[jY/MA ABdY4b1ұT|I|^LdDYsX#ǺATlEb0Ť yyXߧ O2+ѴTڷ+G]jƤ]VMpNm\0ō=4\Y.R9s)cHRKjnHeIU9ro%2ˡEs=ZsF9&m"4WV(FHz-Nk e?+[x6 'Y [  5 BS |>R8$dXN^Z!Bswq:r( AT 3hy0g۟8粭ƶ3US>m8:tjT*DRxUH 9%9K cgz5D0P=Hbh;H0ͭ'?~< [l0tr0giޓ)ۥ;"ЮL*iu)*e6F"oϹvo N*ݞ7!'[ĄE-#is`~b9x3TRnʷ"PT 偏Mxqf$Nϫf:h(+r%-P(f@ZQ"t< $][,Oof!ȒaѺVJg^R,1l$T&F'Q,*]:E,>JAWl(DLV;FOGtH cߊ-tΣVI"܅|_g+l;ڢB,z&`U_Q57^} W9h-+Lifv9a;;8bnq:C ss5<*Z T/ޥ8A堔8E?K<5zvYs$$ l9x1$T9xƨΈ9D]G$\*%G #E -RxD jp$4ݐc&E"vb"녠f$ ucӺh{sfb c^ٳ(*~m2 $ ^hFp' xאŝ"z܃໶`HAϕ3s.\bf}?ME{1;=ϯ5=w^/ ,١ά,`Ԭ*ǼDtSbl U8:?(60VPm u/풑SU+G&Ή&d߁xbPc^&؄;hbM r$d< r;soQXjOL<^V8O<.x#82Z-qz0{V lSUcCG˦FɇUb-Ab8^2ĞS^ uJV\z$)N#0H.!l Iz-e2ሹOHQ -rJd=ЋLwxCǓT;(-/ydž{Gz"p7:sC` 6)2Ai V熒DΘgWJ#n>怿CNm&T%ۨmQT*˸?Ea K 3zs]P9]ש:oȶEekJDm‚*t`鐣6Rd 1-br}̅?- kB[5g}l,E[ hk,IBqE.e^Ҷ>ۤkO 6s9榷M1fH(r{#KK۱^\#gxƓ}aALkt+@~8Ηv> tأ&xn2(Z}A\fX^bCՒp|,-vKxv%(mTX6?~_ylT :3ThC,'m49kiY <m$=X7 :j$TC dGm];-&9Ɔ1砦f%I+GY  +ǬSQ5~ :eݪ!l 5)WYɕqTt,ԓ|j#9\ZjAT,'<&}v1ewt\V|@~_.2b%.OjXt44-x ><ժx&L䄌K?vl;S[uS{nʸJFBuQtˁcXЇê(Ԍ. Q7jʕ5- JzoV (qxqyuG NC{p'MNNcܢ!4,1czH#CޟcU?#M4+i%Lp+2$V6½-vH[zs g|\h T7b)_Rbc$8/FJLq2i,Zh4LĻ+  /_v85rT.Q«fqX#x"7H,)ǏgHWۏ?Zg5CʊΣTA!JsV.VY\Ӗ0K #ڡ@@rs&c9׶G|ck CzSgxn^ DrE{0G%XAF%fa}}19EIAU9a(BG%ZZdrBUưr$,@ g EOQZӦg]? $`b=|I>Nucl톏)ׯ煦DC?=0~i >P |>a@+J('.@$I/_w4n<4#WbNzsδCBCNC.r\l79c|:QK66ncbAc'<`h%)}Bc.bq`94Xȭ֌m*xuTO-%mm63$t\$\BN4܁.#)LU^_1~5Z :EA';˱Op4@ŏZGcmƼlɐ,/s'Jљf]@[nG]Ѱi,uW]QFXw´)(Vu2&ߖEcݬgn&U!H%> /RoIG#A)AyM_ > stream x]YqvqžR`uz# ;tEXl;9 ?̬4`GP*+/*p:}˟w?d}r߿~{7@;%ugT0맻{xZwf_~8n=Q9<J/'>.[Cr;E(eӳʆfSqSyjww:s~GÃI;ee߁|7 .;o'ہxizcwR)kgaʆf]>`;pϏ?ǟ._Z҃u Sf5p_y~i^?  :~ezq:vJEW<3.4 >.'ߍ/]7?F1 4KwS~LN>rz ʠʤ_~8(,i.ew:3e"c.9/hQ%h:7H5I>ԯM`Ul3]H6~ڨ iê/4la5V#)}쎙ЊVzGkߺB8K$ [;$%L RH)IK&9|~GM9#g6B,C[0KW-W4xK #q CBoi !?ʓ$OBBB8γ.2ߧʓwQ38ʢO2"0na WW#nikA@1E-@Cb1cOLI'2Ӡ0dMf@T3ws X=~gQc]5vpwnZ<b/i 4ӂnq?Smni*BP`9-*Be/e RG3%-T3]ntk`w*{H@lmWvN'55;ay3_wKИ3Х.gLcevK{|]*Т^Ll4OFJ}D9#|^1JRSï40# pS79 ?N~4$k/ȀI'V?um/gqa_˨u j8@ FQcW&娴?2@sǤZԣyn)waцr;8:7aٿJbMގ`j(v`Un|t<>OC=?lCM S?<2=v*[i}r00!<z4𭁽>zz5n: Byx~ñ [zAwfk6RndSȲ"?ӎV:S5 RSސ{ܰi< a;G%O~ԭe9'n^f`Ca(0RLPX=|Ê8G=mFqw>Y9?lW0P3΄k1KaA>-L\tQ6@+F=+7E47 f"#I",p^.8G( >V3[y3bi! Cۼy^i :7siR1><У(`9|ҪӫNbCzF#tٞI5pX|O`:fdƺw~(&k>ƐI^n@KR|/M?c)Gߏc\}7Z Ny'Ӗpx<6{`L?"a:/t??pYϛFp 5hڬͶbQ1DX _= !2bsIˁ>*8tt@t -gyph@/`YTzNg5Ko7;aI{.Ꮫ =0|'Xcjb3wPС/]Wp8nm8gP=F5`n+DBHLDf8e^_}]n,c1grծ/?p"թ0G&{ ^e3ȍ9w\{_嚿 Ax)-/G_ IQT? =*͆O3cU+p3F9lCwH 3Vw0RmTS"2л&">6^weߍΰՍEAo> ˡoٜf 8z/D4nJq1dKmX\rt^t?5{rud&c5i죓s㦾xQt`tN4έ9Ho2KZj üۓNQ}'V_(Q <`nY諝,mUƨU y&@+thR|(f4c9(eֿX{]t*"66+H=x^MUzqQVnew@%-78ܠ$n,O85fءgmtb.}Ylʜw/C1" (6 iZje2JA1l%q8fN+]NP1UI[4]6Dǥ!1;/qH8獓䧱ͫ1Hò}?LյMךnSf,pXVMF:L4aW p:7<J}K,A"A7_uYP8Cp6iyb!`Ye&Gɱ  X|KL!J*_'9fH)Ƞ&r =fUB}P2 eI(NUUVk}E˂2?enΔbdK|ki"q AZBY 0fy)& Hs waaYaԧsz*c#Gv.YҖ#pT%L(xzc`& -5*S a%]$?UۨYQ搧WL#B_ :B_.32VnB gc 麒x܏n"w D[Af^$"`nP yImmSh֫)QىiuYZSt~h iDI1Xk?e&C5Op8G48Wpυadr{p1}[{ g 6d,J F:X7HWD~P([`M˙3d E+˕x<ʞTsݐeLń֫}-Bih;eCMnj,f2QFI"s DCKk& 8[擖b-~wM2 Ffqo/Tu*`J"H",0`*M!N!1d6NOp U:Ŏ?](/b1|g jweej5!8NzC7`!: D%/@9+K|CS{Uz{әٜWdeNHW>QV~a[lʒ;VSKlOWc|p,{GiwEU&&`VR ƀ\Ya' @T (ު,̪r0VT`? mv}IL\F|=ϫQQP+%e [0+ +cXk"u`Z> #9 I_ Xώw"uΈ)> \'SJ{H;fҺ^ТuRs ۪.TltM<%٘N sZE2Rs4;ơ x p|b |l A/P6IVEinWo/m 1{ͻ+qC`3K?9x ((SՂ 34?wAhI"ܒ$-'yXÖ 'sw7Fs's>n^c0fcPQÉ*(#^)DÆRJ?$G=_LcߋX`,&~V4woIz4VEzӤed/nZ,7sADؗFH K4&_J,`86o<00/́u;EĞ 螊y̐ F}+R¿o%H;IH/H #!c@B) ^qI1c:6ػm/3-b @3*$t|Oջj-dMMmУ]AKUt$PnE$s.doɹ-dhqMcԂ,hd8y/i%l2hRǵ*2٪ EQ ưv lܨп%kll`*D-JtsD6,UAGEHI*Xwjaד(":8tiZ/M(vźqX[4-Hb+iI45PWIhMNT$%0&zPx2Rҋ5s*ބAIHQbv(4O$Hdž 6LWXG905P$[4Pݲ/eVOJ3(0o搰 +3>-]\G~bu/ˡȋZ?O?멝lO64hbʩQ.7"V~Őe UHT+sK}cH0L($-(_Si!j)Mglo.ji:ϑܬsjG6Ĺ>0i9F3WD/It@"f`$MI´36/c4Oc mdS>+js!q*xԈQe=g:9٨sjC/ɇC;RCUNɥ7ULƹT jW]/lv6*q9{U<}pyvxiip"ġO6ޥD9.9x>K7VXM&NņmQecueZK݆vFT\0V}B杇j!@&"nr|x |ތVAv i MKǯFOԪLV>=ZRY~{؟8ۡ4<90$5üĻg;m!.']b}YC:grfWu.lrxnw bМqYu6m=7˙$XŠ·ܦj$%AU$#gĸ?-'rdg{!eʇ&|v9H;xF]W/IG2ٲ:25%Q,s>VP"fǝWrS6yH; }}~0yi&,u 2rWl0oVOr_/j MIf,1CL$5sȸ+`;p^ɟ6ۮa%%O?+Bx8w'7eocJ:Ȫw8kf&yh-W@Ю캡oty7fR3kh^09y8-urgl䟪/C-|nChujJǰ%H=fnW'p..a}ܝ.rK`]%L I Z.Tυcx$AsBLZwH|\h3.8:2B91&ƒ@L8hKjV<*XNw3qA*3=Crk<\#x:-PcUEtG{$ߏ:Y )-Eg%\"_Wg4w᤹gæń-pw YXQe }3?$]qU•ƈwX2u Kthvk-W.u;OuXs=V*K2d(ehcg_(^ܘ޵v ؘ&Čc؊-"#Kvq.nt^SHBl=gWFMco{>AxŻ$4ܹ>TH=Uc4ي%\QTI٭W=s\ ၈r7f)2nqbE*E nR;1 ^:&Q8@(z•wX=/'&EQ~ B ^f{DwxR]ȼ)ugWYÍ̊cec{wt8\0*&L\ۋQ|w ZTW^;4fAisam2T[TgU7:U)ؑeK%xm0eīwNΎU?`:]{5,) KǨ,&H8WxHNJɼ?D+iT2D)zvU^Z䫻/^ ~.\=RvV xJt_Mj<2uVqZoF痘q? F:˚H4J^KbYLL0ٽ3CZ-{KLʶI)!XKh Po?6*yY]I{Wnş`DEnMlxr.> stream x]r$q#o"f/zd+DȍЃs.@љUU5ΪR R^r˥Ll/utC:˷wC[=/n/u!`uۋ>O\A; %.߸C4UrKPA)!փPj$R`320XmϾ]mH ɿbUv0rKO\BZuI%&pRKJ?E!J6VmzZ9F`^YQ_"r\^!:LoH[JA.b*% ^pk 4ui$=Ƌ.18)o~vne  ݕ>QT4YqN@6Ayتiw_}u]Y')!*W'W2 [7oDz^cEk>O>$ 'mO!q O܂(T}^謻_|+ (Q򗗄]_rQ3/`if/̈ ?RyI'wij_,Ӧiq@Rkڮ'i@[7`PH8?`m/`zVɀYMbB+fu i/wo`:w,ΏM 6/xsZw\>oL0PG>i,+cP.=e"-tM U+|v$+}[ VBޔwݬv |;ۗGR [U([a])}Bn1QO |z~:;d|Pc7gP U.<]p'uz(N)ݘDC;@ziDnHdus כωA(`- D.΢F9!!C)HT|BWvW%XQs&JT O:tx%˯,td42xdYeVs sâl0߯txvSF7?_!T$x| MV bVZ$`,q||8fCNs#P (}u@gP 3_ܤ?Z1H+00Ƙ \t&&QQUxAtvoYn,7`s/.$_wCimM}^714A={jsg͈NG߇q>1,(8>|`@\oIH{5GfY5 VvXWEfj՘Zr !#˳x/U`ƆM]BEUH:352Zߜa^ZA^s<\̲S6mF8V~% $`SVc|Px ,߁9uf"}D-!HEdO#͎S6q&DO[4;l|>Xܡô0aJ% ёSzsqusݑ  "O JkE1W X, YoW!N)LSXʜ9 ^x}ttB]ҽ)0tN(Muwۣ m3ޢcP4M6d2 @kH5{.E 1X5R=3bRq8r/ߗHBetQ64taHǗ1P* !@/5R(,&,t4 d|T2.5+Y;,D|m:zouZrtd>xs`*Hh~s8HPÕ-q"Hs/˸檼rKLexْ06`h(0\4S\Z?opѥilsx?Nbgч c6D eh"FIɰZa- / 7ސ6 􌡙k1n@ xFv5d&x|@ Xx-'}>[ήdg o U BmUI(wɞCu#D俕 ?K(B|MahȽZC'G!~a\ݖ$VY ]){!"CbdTSiɗw,gqq,WgS‹0[ ޚgfiF QQjaYd9IieL[D*XU8HAsa"m-IE!!2˒ K&$B$c'3`E)PK3P̳`6cE0ds>,>Rʑ\ۇ%A*(]%)( ^69dİS/%CNaLڒʹf>y)0'S6~܍%X 媔dI"XV!E`t8uGjÔ9|JqxZ߀-y +#YKK.(ɧH<匋_0mRaIgqzU+jueEGI6 k: xf~q)RDwYKwXSQ JuP8IGX]o I^Q[7#21'K:tI$΁#:b$gw!97xX2̏U͛>+Hz)?> %/)_e06Cp)kpj$dmt`E.x} 8Oil2H~˛C_}=UQ/(':dJy ol1DfWhl1|XU' $ `F4GTm"]XVj|c&rċxx(#h>dӮFAs9=J%>Z8kc K6g_-н-V*[aCޥ"|z>ٔ[ 5&rS^X:n xIWx,FOZ.}M3KlK7EVN_4j*ca&Ae )D`23wtj^94 Sca{(-H֪ǶC;+,k$g|!?(7 Vе1T1$RTx,ꈮT }[@90os8 @ٹW)CSWg6ǗKdcVzjyqLXT-quU~Qˏ/{,E)/NdcR=uT*3yJlrFג)>]`5Kڗ-tA25Wu,-6ڪ>76_3_h 2~/O#fu>K6$n{xb-˭6ϼSW*֬OTrj䝔{!zuHvqfč>[7^+j[HmP|`Q ~ ԃI0pP:XF.O*&"SW "P7U#7zi,  jh#̫ ,Ivq~Nung^ W8~AnDG1~2r{dksN⶷[e,_3+#`XSfߞ{wZ>#qFw7c/W3Vx^!NޞzFuZչRnF+7_#/ ZcꭙXz` W/͘[cꭂ^ W"qZ%12] r{FgVKLHvqn-_3PeUuBL>"Va83G"'{v,Sʌ )M k|v 䮸S\ŁZbgmǨ塑'̰`t-;MjD*,Yt#]iptaeK'.d0826r<4/[\J3B*R\$;oc^RiݩtU _]d#{,ߛq]a,c}&0M}q gڱZ =g,̂Eռj3 Vjqm:(e%5^VWV ןKi .zץg8gZT >ǹ!IY\uOs[Fk4$PE߼RV`}{fLAg ?m!4({5>#Wmt#KUp-Hw嬰Gۭ6p5xߪ"YШeKj5v"Y,rK"Y"YEn@~Y!T*T6 bv^ \YUya7N[6(r1Cs>f-_fQ{xw_Q[jFAqu8I#x\s۲x2\`:[t{jRZꆄU9p`Wd`OuSr-y$I£lIMIq;K_gLJ 0 tP7"#}׻u&Vq-yf˹  !OvM! C6x+碉 wTOʐv1x(\\&r׆2KvΜ]j6=Hۤmhn|+m2:̨Plj3IX2"khճ%PFɉ*;R!7wkޝ,W+~KT\d-F-Ö~Mڥ"FjTHh jV+&,\#tTBftC\մsDA%BX*ޟNip+nA[8<6~PinM1p2Q[ByVǘ|0QkouvHcC5yGØV*D 䈐Dd RTy"̽h|mƨ;b糞#su r0O%.4_?4yWӱeN4 "EjIwC}|n-kprӡaQfQrdDR0*0ڕ'Cp8i us<4I#}.tƂ `V:VsyƠIv֭rB/]Fm/XHKЀ ui*N) d68MS¬9;fM:$'Gi8bX&x`WgaIW4^6v⯪8ce ՏMM䙝-[Fv4"W`eoDp$Q@m:u* qYe ^LV]PC:9åi0t"IHz_c 0DxPfG 9U;5/3Ƣ2dg1H2sA(_gD TqE{)Sɖ\ ߩ&(:iqH;v%Kendstream endobj 147 0 obj 7911 endobj 150 0 obj <> stream x]KFr^ȷ޷Swec]Xe.UnVWꡙotIրa lv23_jupg?w&^&7/+6QLcRzs~oLM~?R3减u=lD+*?x?;kTkժzq|dlJQqL&M;K[wa+q?5,6N󳯷>!7WpqWiձ{s$AJMc%j~==~z83|\*46Cq׭9C4CHO8O+?8*t:e(._gp8$8X[2Ƶ6upB8ǁM%6wsYW@qڬyeD~ UCꖞ^-h5=,etlIWA)~|cS'9\ *Sa bCCՙC%^$kgm5!K-Z" V$So(4S?wۥC4482.u"y$D6Xzzm# :ˑ<'6#bD;פb rq%[ *e_7>Hj3XVִiFuoY>~Y.b}{{}:vdD7aJJ4 48kgu3yQ5P,2)'GH^oAd/_)YfeĄ5@ re轊;K~wҒ}GL ͍(!1{aӍNg˶~[tsOy%oK6_"6œL-s:/_hܵ{{yX0Mw|y6 V!@f쓍AD<킭Hp.(~ve+ #-skA6#1w#SjG>z6~}7!v`58=_)^C2zVh M)Y0kI9J`hd?)( + ?)q cOǰVM=9{P-XE=>c{ 'p/Y`^fx'Ozhյ*d@* :n ͵ 5i|DԄLٍk- !P7nqDai uswo'bM) //c*qJ+ЋKY"||7#Z؊'koQX>}m2F݌LDʡȢkBN)l{vc٩~HV5MUr?E*{pFA/" s4blbђ3D: L rh63Zp U9I-HL0lNJxF\faǏNk`C(m':wM+k|~]b |N-+A0NNdt8.@fxDX=5£/pMqJAWp9eԂqe1"|"iQz\? ȦRb÷ѪE< $n%[8UD,L$i7âuDV(ŋn$CYoƕ4|3!R#Xf`Am|Htv(DM.*0)[<[KXB9E+`hx$qhiJl7m r\ldcې6=?J]1+@ KT>F35` ӸL~z!kXY͎spKț3Xl䳘2i ѪWIskB#mub`ۙ,J]=eNe=ʟ@Ռf`T;E8$Cj_$xԊ~ǭGêM*gMp6 sFbp%P~ʒՒwX2N·ԖuAm/iȹ ٦viE =ZrCւ9{̾vivBcBb$؂ڳ84 e81MX|eu9Z&)j~~*MK6SMؓ+V^z5'HkbRc= 2Կ5"(a, o87W:? QIh< Vc;I*9 tLnGF A ic'R%4%7TjJ`E,gW>f݇5stOIVKt_ %lO࣒n?\d,k\~@4ZI=? ~nbn6FhOJ/ԝŏu^=&RJ#YѐGm~.a"q| wls+d&_|nbbT%Ԃ3FKj_ѷ !E0D֛ogLj5CΟ5Z>|b\AĚAo/xa^w>%.Ǟ`,W1PAk9 p\0\–'b/mi~b= $tٝI @Gv[VmѕUxȇ/yLՉÉsz LZcz٭YA[`TDm#ۗLIM s ALJ(8 ᵘ'00+԰ mm\<ӴgcZ'ٜX%^Q.6)A܊ 3uz?8e'=۰{IQ i$gc[mwɌ@yH o7|9vdd\.SSR~<$@a('Z37V5Na-%jbM7g.&yI?v]]}bq [Ya'J9DelӕyɪҋN"&9px[fQH络p]e}"$v-1K"7HuB1jHb BAu-7n(P -Kc3prރ 8+SWYTȉb9V9 dA gceSanaOAhgn9ǻ~CBw*L Q"&n4ݰbdG,ldKmrֽ%#xkb#)uؑ`'$]=oc0zsd(K^g 'cCV _gϓ ݐUqz5YzT __V|bF!= 8fW׏N<[/{>=]o;,'eI6N ԁ>yk+NLxGnqR&Le%mpFlDH`'|1WL;!@bWIQBØceC<Y2PپQ?6HJfG P: ͟5F1hPsK[Cٴy|ΛA۶l~Lt|:x0^[]bw i5KwivD ,dvtN -mmzn6xLMZ@CfJ2GRMj(ɮg3C'L2` ̨OX]bGiy&te}\ήm|搏MpmVH%BLTJ ڀӋq`K8xq錀2UBzxvMB)a!C58ws]loGx4FфF8Am `9 Mh) H]JF̩J9? E0Wr>g*Cm tb„ޛ' &.`:]+!T$g'x6$EQ[wXè=` 78q[R]׷\(2;{x+%/MKKw5T·.eO/5vnXil6C<=9OU|ZNɰ8Cy'Ln^j"bS 2#*;N[u-@cR Ձ:sS+@Ƹye R**6&IH(>yրZTY) p^v!a `UNP#, ,)qǖ8K8 ؄ ܹؑV(sa1,'x{,8U3n!tu"}(Rʶ )p}Qʴz|8 o;)iX+٠uÀTW32+vT%oǪpalź`u14 j-1 i;*D&ŪGVtcEͽ@vU 3땤-} }9=j} <@(:?-Z)_P7Wu *&\KQnQe OJm`L滒а:*ey5jD![/J)c2OE¶ch"A/ xˠ\?N]F7޺0#R^*Rk=E;pp)*@>G8@p9n{>rcQ͘m`&, y6U9[f`vcɑ}::s@.ÇE5%? .{nmgXwkjA*DDQBkŕ^I%֕R !>W3Fx1I,\؏X(8 \%BQB@q3eXS=}>1z;5$*{{}tZۗ*깾Gj:K-#!g$He`$uV FoXS)$`j ~)˕5ǾTVS2=0EN 6Is& -BJ%Cls>È4XJT8Y\0_C֕uش6*Ȱg$u6ԣ3j/,ZgVO'6!H{E|t2s:2As\ y SYvƬ[d / 29?3nI:N3/471e`o kM' UF5_\6&5 ئ ԥֱQ=k?L/R5tGPhGgem($f/e0~gkCЪF%s梿E 8ENm>p!;:_~۫SDmKiTn|sZLV勤2WY bC͒!J RY!jO_.rlf8ȿPp3 A14o1j%GAwjk,S/z# JOw̤=fb @%#'0PHB]4wTN!Xq3@L[,zH~MK%#6 @O e2QI6<||,J5!sY!ԩt0 ~ZRjoA,~#,y\5W}hW;>` m<*VNM<0Z\r;K.#ݦ䒴P8/8F-.nqܖ~BOP/)D-݈q(3蓞ků RhȱN%.M32j۬@ .dm-q OQ&m^mz~F+( KvVXMznÌn{+l4Ue3f]-FiAJrzCPWd2{c+EReȷ'*֭;ͧ7ZL"I?0,hy kśAaaCapCT5eczInv#3 ѸϢJF;rF,[e3nsдF'14ీ^!~E9Cc\ol4O%c6jFFTŸZ7eȧ5aiJ 4djFķjhz:f֭&ƞJ-\Y.TcvZbԝ )YK^jlia\ԏ{pd8 Go!cU# X{o5 S-&:UCZ+5?,zikxpgwn{o l˧EqG}|pQuzqS<6J؇ފzI`RO3YH6_+KJnRڜ.u1[ռ̼W<ʛ0I1Se:LE#cHW(x;~}ζZ,H`^3PZű&ޡ&ƜNS.n8oo[>vTk`T.D5{kӅ,ir40?zgPd6U,P5cJfeZ}ZXKeE^ȝ 5Uy˸436e],}t8[HkFQMue>:k;\VU@H6>24ĝ -S0P &4J \V?.-# (0dPNzrL6'.&{[~"EH\}*5ᘗbs%8 a~d9q2wbGS#w;1Kg` 1ܵbixJAJIB>HI}|dwK7%F!'W~ N(bZCh'b@y6)4LO:avI/ 'hH3j.`Ad^s+|4\3ژ!Қ؊a.Nܵwr\,cE#C=LnkĵNf;ݥZ_PtdvI30||nr>hc|.qQz+A@0/\ϯ^' V?ɢ1+&*&WPs\8\?iiżp >KngO5k`۠Y*w5L r#\R2&7qGOѫvRDh)1u y\qK'kk/;|߾@sIQfEg[~hI+NqPI K Z[EKÑe'iq 8JӇ[-]`+iWi`\(tf$?#It&;)|hy룑u#RS^2[oٽs됲Ф`p"M\$WdAP',YnwԹ]NDu*,fEũF/|CQL]OY{ =PiL8"j3pܺ JV4?bd>u*Ed .V10@Ԋauq{c|I,o%U~D"p}V.~m ^EN m9UTTP+gTe1!5>ZOQ "MFԩ<7 Ղm#ز\kae7sPFWe&q,OM8R᫬_`QiaW8ɨj7քvr׎<[؎8J(濼6A~d?|90)?+endstream endobj 151 0 obj 8742 endobj 154 0 obj <> stream x]r$7ruo~V1,~ћDڇ"f޾PMf?ğ TUP#aoQD"/'/(\ _~wO+9w|{tX.z\iWNǸz߽);Yo7_~P.4s,0LzRYփ{ иTR J;K5Y?e\g"vR9gEq4QtNA xelj{#u"#Ɓx>22.,@[evHt5 QZfWR z(/, %owmiX9k{vΕ!Q.=WYE?[SQIDT@j!*?14Ex992)'dѶjDJbyuo%}ѴO]m]=:E=ݵseal啣G_ZT@!J)Z=3SX2Hx\_5FH83~+鋀5DJh !\c#4v|r#vy_\mm#b.ȖGX; aR@IМ~.R#/H`zNy=MY ]ƹv [~m*Zo`rz,d5eO2ES؈RJHF5(]~?͹ P _S }=\ާ/>_SC9!_'@!cXJ^~`))N#cmxN! TOyؤ.Om9׵ay3&.oLj8tii!n/ˁUXYZ^|Ė -*$2֬<"̱H򔐘qX\y0EVHWэv]ZAI )pH4`2eYpqcyՒs6:ȝj9@Y"V|DpFˬ[.z!ercRā?lޏ+S5ykA#iqT)ysoU..ѝ Y4tNKAf>d:7px7)E1ao^a\ty*[9m1Ƞ AŨʃwizlϛq, lol,O/q9 B 3;x̃0:CR9Qt8 ŸFUP E+wk[U_:/H#ϧ88Qopw&'U'#5}cH}r 6wIxRqcq7eCZ`QD,UE>XpUI));!K'SR,k6 ]:RjG$ l`A('[%8[/*S=!8[OGr/Gzoj99=t+nms͝6/;')mىov2>2 BDxSl ^]/q;ɇgyZkEJ@K*$:L#ƍWiX g/ =`Ž_dWZ]yMuDpv&WM)'qm- Ev& F;MV4$KeU6ɗsudw: x:Em֕c{IG:!uPۨtMS|ĪC "3eY0\lRӋ|J.=`0RlnE1뀹<>`I=9t )=ԡcxȎC\RLo-?[^ N(t>U as~2Yzأ:-iAD;W.+a׊8 ţϮߔ c!Ͱt5:m9e#Hy+u:슁@G_|1&;dSoZfpO(6ɂ~wNHLt3i^=2n;d/楞@CG0>&`w KzDDm<Ŗ_B)$+gBCbh_ q' 0H-"v8U@o w ? KGpQK$0pXA,F(EWYl%v;49lPa>1|O`irvͶoq ^v,I@767 Mt T$pC8g]E.?2G!R"!)ORW,2ʼt^tZ[i%@86XCspp ?ubO vAXb)'5'AދuB/I6=P^W-C6!~m @a}<B.DuEs;s߽{8䓖fb3@P3ڀ9alz$`l>b3%Ԃksnv{ n?|=߳N[ 1@h~aӖ8}m7ES2_ZulǶ @ &Z\o8!F ˺* ҳ q}0}|Vf2|:e.Tll!aiۀDD|p"'z5 ᱴ3F:F;eAOE(bϺ m,yLk4,O0RdTG f\4 a(z@}VVȄY+Yx6pmiLQZ׋J.y6.^cV"Am" v7t_ByRig(u pjU BREHxK㗛niG%ycp7u8&[GnB`e/GFyGBGY@J@Sd_k=/\'y}j+51n{KG_o i!-wUcAH&,Ä3wqg)pz=gdN"c37w)NDn 7\myZ*!Zl$Rz]#EPiI<=Q=|mLzY",Wq dR b!Ta60յk>S 8B%9 $у\L\7 |PqsWDzLW{ $>FlNVްL8VX>J?.E4+QNo=6EKe/A`5 6zlv`O{пӹm*0xXpp(x0%74m{& ,um┱# ^a 0GQFr9SUO*=ħ7d9y!IPl]|UӇ1잢U_gj6o v)D0zbXҀ@ -gIOQ8s<6`L~tOhH)*|(ټRCRF[\hq` lk30: l3l:)'iBZB㤁k1|*=vi-{yewMkEYA)񞿪OX}Y#y҅ԇS2: 3\mx$lr_-tBՉ ްGV >ī;ܯx~OVz6yq|W6|/9q]_)k3^0v7S28 8'^ox,mr_-xBWL'{HV6ޤx;6sk:fv懶#A a)n U+!@HNԺ !NtM -B:=I})\-4>G ,- 0 O}؝}Т@k^r=g6y?86~ e,uI{M,<+N-% _SNJ{|~OÎw  J&x+DFT|bAt~\KA0k( euے^v,ƀu -,-ŵܶP\@Ha*sYoE$Y%Qޗ)CKٓtL6Sa(m:'Xe<6JRunSRyLtPaض|ŦRnF9k摜,Yox+0|ĎE*'^$1 VnatDXm}RTg\QhIſ)?-X^<'/˅2q'W09r3v?.6YIQQU Yd#@$Hc#9QkNB(IOopӱtG`)Pv'gJ/{H &Tm25Ş N>y8Vq77a$l;AeuL^6Wc輦2C,.; 8qZ%s-g-&xI0^/2/y6tBi^ݫiLx A"yr* Gfr[ujC6j!%CŢis&N;1kBȦXUn). Eop EP2 }y^'CG^FږPټ":=3%VἨK X1R@tțGK$JW^U/ +Ì*w2Z]"t1)˸f6r+<+䍈EfidM'?Tta N z(Y\6&d#F$3TcgVS%Gהr}= Ysem")w(}D})fŞ*T;xKC)W]U9r)WYg{ Ő [S-ZeB-ԂTUƹB@lDIn|*V ]6{ dד dʆ(8g#L?7T 'ϛl?mާ;w#~z0ޕrga1 -X?TtL0+ $iUi1Kp[1c& LBD|tkzS9Ӑ0` "~E; qna5s/[ܦ}i"ԬgPEvG;~jv7AiIZ]̂wUw{wj4jxeҙ!biDx$#c.,/9D5rļBwL#Rꈲ-5ܸfX?ȫ 㷧ӎjt2ػ3ljZܴˮ&R0z._ ,`g*, S Sv 7E7XE#kEN"nMx^!#(B`:~ YV4uSZ]W>I /i7bc4_iDJTL$ uۧ聟fɳ 3S8øBSѵK qvѭce Q7lNwÐnc+ |s;ϋ_"JW8eE&&ˑa^g"w>vؿ#\S\(h:E-m&Ӿg1Qշ NK:- = ,MLN] Co+6%9;.:!_}2*+fM &cIANΏ ?U4{>nS 覧oB)n_soҺ1B)%n F,Uέ#}!8R*42BE(;XU*-Yt&EW/Έt_jqi%߼mo&i{:3^ p29B&rqK,,}Ya1eFecS.18d(꣉+ UVI.(}%،C~3+~/T(l+jK^N WWY _ʚJae~6UḏUrv%FUuQNJ ]ma}TdL|__1LCzהdQWE/< at2@?Bu|PK6_gf.>j=> stream x]Is%qvo+p"(Zrж(@oߢ:* GX FuUV._NtN?t'g?o?:ܹ.z][>%կ>6K쬎6?|/\N;`#J:! S^vQ[!w8MTBNӝvVLg3YmϾs]io&.*uw 2fQBӁ5S֦n)eB3]peqA2t!N9aʕCv ` ]Wx_ҡޒ6l2U|w: H/%5ф)~H$5YoK_*UV}<yٲ|9 }Biz0DdS.Rz_~i( # (T/{uj|XRd;c7t0:B)m$] jI~w' :Ykf+NP߬oZb@fI,9Vhgi )bzQQBkQAZ\ ̀\:Һ5 * :Ҏ4z0!4ԕ#3"A\>.YcPprd~ E*T p4e9E+892?!V &j >d 螴 Hc;4qZ@e?+f &v4lK|܌% #v-4Kg8]@tXR $F=eu.oTRP"C;Xiv8v\W @aXv]o`k} b@2ǁ yG&z4J<+p303?yUcJJ%< >w>+œh=V N[EpҢMs?9Qɘn\֤*,f;\FNsN~36b5b&ge J4ht[ (>8C!je!@~Ž)U$̪JhHX{*7_mHNa滬WCc%8 !=e?%r؊S΋9[$5Wtc< [8`e{[VoT|p{K%9\6J*Qg+tX"{*xS !*C9p]K#N>X1rJ`zN\_*1qXinTMWWEd$rLna<ŌDЯIH@K)o9v Z gҢkWiW0ѓkY1f٤ \ڳ#H` h6CXĄ@d9g 8&>dsŸ 7 r6g+::tW'8oaʎmxgYԻea2CAO Wje.2u^v dA՝:~nهySfL؞3$C?|}t:ۜW_M+ZHHE ymFІ)b%KbÿajM{(K)v}#C*dp_3\O6ʓ1Nݤ"b""V4%<=\'8X(9(mS$pM0}Mr:ǵr68QY`+8, B!2aU8TЅs-aXoY -mRsQ]`_<;n19#JVeW-}Ǜ/IQ1 zID#W9C޳庴 Fm\8۔"Ղ\q_ 2,GDG}& 5P</R\#F|/1ս`ͪ> &6򞫊0*XBWh9J@ ;R,29xľLy\d,8~Lt90<92Ve@1z‹x1@y;Z%LQ}f6sBBv*2bOW,ٚk_MBSFyt-lgX F35S;P߇<8{ĕX0VF 鑪zy$˅lՄqebYN+ `yc5ܗ9T|Bk($.jVPCaW9<]hت+kj$u>-e3T-)2 S4L*jbt51uSAlAF +Gyܕ`Wn&1eߏGނ ɵKJy.x͡ƀZhXt:^v6܅Gѿ;^d]Ch*%!_3jT C P _3b6kgd3"Yn2Z%J O9кrD.fj3:x22*N'l1RxWeٺݡ`PE!QҪ`[(W8Ge45Sݵ-{[)_rOkY\Rųo ym+PZL@+p RI&vG=F8zӥC*$B d 1Ѓg8qw|JrS ;q{: $&4t=--=fa9yiyCfεr7У ot#hҫ8Xr5λKi^Sq@c6V%Xaf6qzg$'k+)brCBjr5"@Ѕ):M`ʱ k:Ȏ+<*A86JZ囪{nmt,w*l=ۡ;~w(TmʥW!/ = l4XzF[ej-aT,%Q]g%%OOcTvrRSooH$Bw>]l%:P*"mvŒC*wX8 /< MS ˧¤-1ZX4[ .Pe>[,a&>D~/})3Why+{ Vpax4y|4UJ%0,-Dz8+.,|VzNTyD~ꕮzW"Mס+i\;P=SHu׮UGϸ[؛h%(K)++fW#C9KtmG,7Wei>)eZ‡ EiVPQr}UR0](VI\ǥ0f pPpJJWFsg/Ngɟ /hRyG5'4ʾeX yX@MfۨLaNy,ۍOcd PF[FQYgzqʑ&X)<HUKrNњoIDPFL%DL: 9뗜UZ 6/o5AS~|? O"[5Zf*hG ǧ +W54"jȢRp4\[f ;Nӝԇ&k|B%vQD< \ vu@Z\%WU׫T?&d9-m]]a7U_WwSqX>e`DF_9eaJq(J|"@ZvKc) c Ȩ+OzKilOZNԔZ5YK2Ps@ CM=o$Ƣb.`9PI ]CFӮ:&l/& ZpyiXv2oRڡtۅN6jiR23w0v'iEE"?v8Ov{K[̗] Яg !Qx0E'a=,ݑM{UfEWX:F,R +1ځ EhuXmtZoaDڏj`%F#ع$s_ƖB9 yhj׭U?s sљvAA/.< E! gǷk1CJlsClKx4'i1Y<,ϔ^EQeO_&xGr|XJ䫑L(1ʣO pyGF(K_C5vu:y\(>f4~19I2 LXM,L-VX9jnuZ'oy_[qTo]4OL5GKnk$gqJl q-d0eI,˾_eN_C?zTStXu :x.#hl7M8Z!u"DǪ6ӃL5xUQ:%OZB{y5gySUe,WKnN_3)|Hbl\庩vpiNu2E/0M[Ht^R)[NؽF +T8'P~SxmưՒ.X;>ELi)Z욠4GGEԑӬO1%~L .cnX#L~;~iB wod+i+`!fp* ܑ#ٹ9)= !,nWͅr/q3^Rn)tBYKhcԫ5LR WcXd<5Q=%,ס c:,ҷ)Lǰj 6Ҝ6!U\k2ܦ. =fN]KQSd`8vsb3F@Z/eD]6Qs`lv\g acs* Yh>wf@Ay]$RPj%Ů/& e8OmǛɕ)CH 12$fzz Iݮ$!}I/+`PbEb%H){Y+N?xZTsxi Lb-dd8l>"SP*^QDas"z"=hVl䖲[!q<ˣQ%/}/#(^RſXPXArfp] 9ƾ3*En!ָD)"=-oy1c)2Tq8oߟ~VSXWb+(Å5+Ωw ZYp (5?HqޓtXUcʰCa?5^`i d> stream x\n$Ǒ]hf y,YX!`cW~hvאjvS}шލ̌Ȭ*c`fP]Uq%J竟WrV<~w{?r]:퇫\iWNǸ}{%egupppJtY)t6Fv[o{< TN x֝awTLg3;:+ ڗ /Ạe7~I!d嵵G쮔6/\)O_+BxrEJϽA؀rK(|9]7.ĕR c7ί@6s1rQnQ0cY#lp?~o섒qEw߯ǽXx&N I4[  g,?tqXՎ&K\Pa\@+*(m]*߮?W}'+I|2((jr'[ <~:/w[9!N`/Z•вQlhnNt`Z*vƀ khV+^@;P?Yyg;byo-LA.qڎj_{2+V|X:0՗ CtB4nQDƋUGeB.&=XBXE.M87}hT߮?6G2*wBy/Uƿ~[ſtG_Ss^}W׫^M7blYV7 %vޝEMǧt\i:z_50Oi"H 0>02" \w=^vS w o3V^xHt!}nr߯7?=4h4M\r@:zu](J J%okŹ}(ۀ.k,xыcFvqt#1nẍN& P .p 9?D P1QY۞c#Da|VqZ\N:֠~;\#+_|jh_R׳lqxԿj2kya, 7*WɜKGk dK1-%g}b4 soDbs-,dWgTEIeZwI"q@D+lghnE" hTzz7$h%L _A7iJ^7'˺鵨N9{s2PRO>.bxMp7Yl'5*"9SQ"{3MJaBS8Ƌ^ (S|npدwD IM5<;`w, ˫fi`:V]kcf{1[FLg?F| T jMWw TW lYDs$Ł)IOлŵ>~AF;3v5cp4Ir339$C*qٗ_t`[N!1w GUq'e~NX7(aDfTD gz{K2y|={I6 $"I|!AAFZPcXIMl*0Ƭ/a}=uLȍ"GCwyQZG[)Odž؟-9|qBPwo%1")Sib`Ŭ:JCPuN <3Q$0qoX"O&Ҭ v6)Ă"44."8I2z`vv큢P?|:{|8vlk|$r .b(sP C9C wf oUSb9cT.qx1OEoNr6udq(i8NQa!2*E6P:p/|h6v`3&VVNl,1DIP rdcۀ~?>u! 0/qmROR  gӎ8(Y,gQow1ALJwﺼZ>=iRfЯ,O -3یBoHZ~K:z5LJ^@b 輀 4GXqꏿd 5W58/}ȂwKyAC&~ӈТ-R5u z "ڢg+R-oNMEa ,"Zi7 BިbLL,EkKxw 9aݹ X0bq&-7`fVb3K_)B MO^d>0gAG ֧aLa*4/ɈZlg!; m $kҿr^6.HՖM*3$%ݎ LΙyd5$m&}((h*^lz 7KA ?CYؾ0Ivf0>ӄCq{3W@8^"f yʬq:u*w z Q|BzdE1w}Q65 <EJXEW<*W4vhK=V ¾`4&;+EtNOY61]TԢVe*9n.t{*`fV'"V"2pg^,qתY%G+b\i~A2%{pK+}ON]l/j}Pg^a}\oq8A8b#b[ʅ6$m"B,GV}WPXH8,ȱprK+iDrI91=j 0]5Jqz_ } kӗ:D2RA1]d+b{$t7;X5M@5QM_]Sfuo0C~jmdF57ۄٜsYu\YQaO%bT`b8e{ŝ]q(a"p?kPf$YLSH-+/I"QP slN÷m'22nYbCPU<K%yqZ5HN @dW@LvuVKN"Tw T_SҚwi~݄׬ZGCq乧4&[j'&n n6jHrտ{T59:ĕ#塔x|svIRBawVI.LTo0}ClhCa?ֱ]N=u9;s wixZn}vzKkm$!!mxw< ÔjT6{B-8YL^<ӥ ӆ0.OUk ܝL?#> 8n= ɚkҤVN:..w~R5[2e7[c7@J3^ї_o VJif`fM5Fsnt_('<N2v7UQs~V \'I,7'K,\)Lf0X@x˥ 38_ xaf*ގa,NЃ+u -r.3 2ems]Gc-0}'p{k&hشkGٸ ҴhAM) ƃM:dKU lq4/ "J' n`Ǟ|Ut׋s.C@?<`Ym5f]U.@_r0YR"0Ŕ㶹Lnt;85qDjRMga ZnxT3GJOJU'qhM4Y(krV-7kõ?{)DaOy y4ɃAj(-y(2rE9PMgohmΓWF͋'6P]V.{;R`5f.H'Ņۘ&p%i۩)3|-.9`92zEz,#a`AANQ/% ~xKYmXqo(zZYMÐ+cosy?xAZo4 c|τ #USKe9Դ`e[(495j<C{@,>Ps^ì`~(s/#[7eIˢ"Ĺ U^,` ҇q;s6~W-sq9 BnlT!1|'ty%!Ula缦6Q؎_=Lf&8 J9VܙrPDs^jzDd]{~r"9V!X^2ȃg-Ei|)YRn*F1x,#v ~y B *Ue6U+)VMzbU~Y>)&|Ag[ޗLtk2P=e$rBhn;0tmY3dP 2ڹ:W(>(% ŗ,2so+DVv>SjITNvb M&F4 !֥Ǒ/Z88ʉиf04PKuU[n&{pf9VH| P@ 4nWAɉ.OAE}N?-3s*\j8۽~I D;bѫe@J܂%.r(oUcue^3UZ|BclEsk .ѠmX` $/-$ J͎I.Dbͭ`Dߢ:= yO鎲%N< `M גPS@ޓb*N7\x}חCB pFI.LH3>s]Ri@Vlh _%YhY: M Osx0m1 T9ږ -'cڪ-올eU&s{Oώs2rCJsN1+D=j~0"PzI!z6ps*SKɍsnA^’jb NuC-UjFvA1>QdLۖulv\}h:LC7`\U_HEO} auNp O vVJ'Kj0#=m]=&4%vx|ʒm/eq;URtaGX,? IȸQ kc'8)d :_R" _/"~p7r_PhU^NbJ|D c 6a Ąmvsvq- 0§$i&|#?D'yD|jP!'>y #U YpzTnj>=?8xC֩+r>.9$畼0pc ĥ9çkufJӆ?R!#k,4^ykPa֜,e[A ese){~&k)ڪ^] \ t&γ㶟K܄kd-_Jb^:ޖa+C}܃ 9;43ަȇGmIk]'a^ʖG/EjѲ'xSyJrT ݏS.`]*=%$%N#Uy}*_v2h p9\ f,|.C}W$1oJeC[<'-VNa$眜 Wd:3Ovs*wX$y> stream x\ɒGr_Q7fD9 H+DUl!ٌA1U_'Xcb}ů3g/vf WJg/ |XaZҹ\} T^^|tËZ:/77.X!0 q<~Ts^8{}? i;+c/_ڋ' Dfq[+/*1*BRxɲZurx&.L9 Yp_U,Ͼy$Ҧ=F 4MY-#&KKBw¯pgA xYKq`wE,-^23Jʴ-[6'xi8m|_v}S!) Ew$d1ow5&ln5]ݡnZvx#j $Okɂ,"d (sy;xY0&nY]/˺=jMB%yO|2Yd l /rn넏'mišKJYV9CD=Q#ӯx5tyjVI(%k~}d`n]B KB" yc[̐Bn& @Q&_o6vG.3)}*񏅠"hxKB,csVhrYR*qۺZ7??a-3\phJcm^vUɅɵ|68(#pŕtc/9:.Oʺ7d섋vq0w^ɃHcfqq^f"5d0vA*xK/aOZ>KBoD;4z? /D32s,"8[ͲYTd7B޷a g TVD]N_)Ⱥ 2`3[ʁ TT]-ƻ Jy]1@Ȱ6/PE9G@W|g{P}y}d$pN8= a`LLf|[p){oNhGbQaAjBX.Nhj=WyK!oS\&r] 괧ՁޮVx}ڃpKvYePS~'At*l~MQ~ yP IJ-/ uuS|&WSq@4#mԮA>eDzxr Q|-,:\R\'%%nWU*]6$ʪT [VjVմfj#R]| WC="+ƒL*:)rCXFM$a]?H Ǥic!$=K[wal!ǎ--lN2ձn|(81Q 5fs]dU=պޅ+ig"&9h6䌊g@{H{LJ>gy`= ,TÃO.bGHޮhuDrfWUJ,]q[`|y{ Y.d@mrKmo)QUv_m~3cIUpO8L֫=^]ETЖ(x445$BG0GQQ>,q x`t1?W f:v v_BJvL~T9MO D}5~ 9Z;:Z#(O x*SH[9<4 yƜT,5jshR\i/,R:\/"tώR'|$1Չ`l'ܑ eyӰ@NFYF>ƽ5!7{bL:;\ӵ|mʳu ꀕpDo:6P^*gXFpE#7ͷî`1]54~y_+rN p'V?6 Prg #`@f\:o9V$A`,hzwHd׀϶J8C%`n8DfcWM|9U~0_@cc+'2)_m3o|Xa6A 0 ~VfaQ^kY9{C"RFNp"#4xg/R K&T6T:D@2l@Xa]J`T~,[H1 e}@VRYnn=cޢ|[Lnlx@bp=D 1vCVR%),r9lKnG64NaCQ\Q?(cV{h2r s!@V1T9S]E>M*E\>efך^+F)6U2ђnV6UIH3ˊ::љ^*9LTǣ Qi*( {)-VqnGQK℡'j쎫lذZ6c;[sF5y"&{=~V  $':6 C/Z!v|)X4c, @:36 ODvs~ZvKWf{Gz7UP حצP%Eɾ?"3&_%Ά ';~mJoQH!sjk6*`oԓuȰ3J`KSҁzlFQJ|"Ym`BL& IWYmSѯd0Nf4r䟺5Ja,0wsz͆}P j{%;u#p^PG^ ܖg,YK=pL`,y;D! Ѱ>(@#Ψ^r\Umj6upSejr%d\J款9o5o+l:2h!ډ<6bd {tTFA,w${/ c"&e̋q\)7Ghq0oӀ9. 4D|]W)iպgHOh Q!%–j&qr_mZe'< %H-0G<R 5dY ^;2kzSyd!m]SeIY5v\GS%\dMgEYwҳI;>8xHeWSDȝ' z>Ha 5X?Uվ1bG&+܆k6ʬ$s8)]D9T՞*\e{~2x媹J]s؉%ބ8giA7E 7 !~8*L.TN3 0Rs37JIA?Ca<$~E)i{D׼}l/8ep')H٠P)%g=~ +{uUJU9:1$?ՕTKoh☶;:ͪhYA2ϘI0\C21ռ0{&* %ڻs4yo 4\(uTyʡ8HɊA/6Od2-0`e+sU]J6ꔙ^:QBeށ% zB=tݎj`2d\>[zZ"ƙ3tF~,!4aqmdBrʀ2 i}MmyuoC--"԰ձ9Hs9(#)wVz0ܰݤ][YmʨPtO5ۤŰa6:FU*bWI=` wXVc?  6j* +Wuf,VS>=ct}ȸR>G 8g?_WpwfR\%:).*b._48Q}6K_/}DEz=espAj GxݦYz5IG6p7Rqc{r8ijKG4@r,&7ՉL%IMmx_ 9R`M@] .HAӯbPoƒ3.ۗXj^㴪^#sgd.r|w>$f cfe3a^z R\l~B&q,=0?~4f0{HC%>߇tZƏ8hy&6Լږx>Cib32wȞq S`_;y(+? s[af.{? y$o['`5RO$Xʜ~Rk㩓,NN4H\ kENEg@`"x96:a94<9- i|Xo_RGzTtyTqCg$u~f}k9YKl u({*_$DNfva:4éR਌OaQqZJ=gOSd- =9sis鰇hp0#li8[Zۿ~4qNJZ@찧cIpfPo-;c }09Uc?Ff7w|' b?I:_I/2{UV!KSj?*sUIlAG #vȚ8;j0XS1-@BV?җ1wqү5C6#ɓ'1AH= e` ڂ2cƮ㓝j>^ z "^S+ʟn&~`y8e_f>n}_5zp̄~;8".[1ykH2K(tltQU?Kt0-*8dҏ*&At-ǜⴟYh{#n_N+,~z*$N RzU]*fgd.~UwC"&Iq9,nєa*ޠ|-[W \$|ȟkk% t{ia:KmO A<ǯpi+rp*JyݯW;*׈E:,#̾ +)sܾT@I߫r`W$łٯzMJ8PNw?: UJ*,DQEDUϟO9ӄxv:&o#Yݏ)O 3=CTeD$3// endstream endobj 169 0 obj 7393 endobj 173 0 obj <> stream x}IsG+p6#ỻn HIdQ*ZH(%2\"4ky/=BLXYWYIe_9fϯ#=K_=OYpʛ?GyaQ3';]]=bfT00}Z[|.Ϥݟg?iX̂ƷuNϜ^ɪ apR*4e,虱V?3?3W|+;2=P W0sK5^wCw ̹4W^cg6xt `lk,4?qO|;Tѣ8sџQn`|rw*hκʇ#-*sgh<TG6Ά{,hiYZGjzoPllzۮES9K'u`*Xds/;NE.*c{da&gƘT^7m[L)OlpR$jm?T3T"zsB$?kE74̬6>nPᅳ>5'Z_N&H<)N:f)f㢙F֟ 9I֛N2 ;PlE'10-)TĎum#@ZllLœhó+hAs |נ"1f]Lu3'36寽0tz3ItП!>=v:wF)|6T\4rZ6(=R=()՛ʤc4.Od|Hxd:UzU)F1ՃG{L+=#CzTXT`}\0M}ެGDg0"rg=E VafTn;E^M$Lm7y?ϔ։>WWS7^{YrWy|/=wsa@vifMn4< $7f 4:뿌|8U9$}TѨʢʫl | iTǘB/<`H$3(=D9Fg@Q)A_mn7vy(]IJ_u5'N&=y؏vFb,Mܟż cp@'rӟ7,ž\i֊{Om"6u&"Fgb،Ͼw$}guڀ}¾حv%  [.릾Qc̮dzu'F}#unwe{T6tCy1hY~~[]^GNi0'u׳H'6^4 l($.a&4bbaPtHavÕ!oU WQ_Uifg478qʐaK^6ELi{χS r;H7ɋR,((4u[.I}nX>ٟAȩ1hrLBSRgKfc 7ҖgJi Rݲy^|ioG{Ao3*Rz!aRpHBHPiM҂V]$m&c`531I@rǧ=kDZYϮi\xI ^f@^_ UY 2Ov4_ѩEGǀ*-_lA:<%Yk:y1.ɓQT2e<).(Il!f92t/o=㬙7ݯ|6cRy{zsݬ%}pBnP%ɣbIx2Տ2: ;8S3CL*ioi9C"HR"A-jl IxDBJ+>GՇhWJ3'5g&aPWaBM?<+U:\&֢yQ{DGTu"`Cz z?α&jmnuMH^ۇP \wT1z^?BHߊgNʴG<MȒ~+RPfnG#="p#qnׅDN6Đ*A5Qf@wDdh $hBޝ]$CYc(KDAa Y,^3юMD=dc8$2L3G)5ɷ%0*R΢V D׼}${w^Unp~l{h|;AXCdAdQzXTi?Nys{1igYj~5E8y5G&p]W4+$4 DS3⣟곳zF*?CkID^m.{p"MAtCgVN"iI*ɿMNT?0'I%WМx!mXď,XwF0<{.Fy􉟺|>q vD%`Msh'Gsnre.sh|r[ wSd#FФh{jMl>i7-m^"杲^d TN PZyjXE 2N=E+$U+"e¾[MұZxy/۫hS̻me2fIJ]”{ roN¿W <k&PC(F$g// %zQ` FL@G=̭M+ZD0 u:NG_~?yC+G2'4Ĩ0X\##4-12b:1`B"B9ǰ^NL@NBCwPlyML`9!zȭ :_&!=w(mɡۅ'(I=FvTsD%dhoTR T57G$Tq,ŐE9 =?ʐI\P'B's dߥj˞T?Ku&R˿o%œ9K VfV1ٯ?Kg9=KU8Vi?Ъ7% en':8=ե3-saȽ"w=qO}IMj?}AMY*Nhuc9,63Plf}@+oB.FƮm]˔ǻ,0掇l1>Ssȫ]o(i0 ?4FN/Qԇ)FEP;#s@>fAU_K0N H0z8$UR!JTeC=S  &_5mQ[up&}cMAԡgf2dA*>TΗ3-韉)Gc"+JȒt@8QcrЅS5fܲ=8v$Az/!P|E(k~.r#2 g tiv/vFs=K^0%5av;ZCB "'OS@q$uQV*1Fl^PJ;_בDE@*]CFbXd)\\Iݓ耿ݘhJPE6S|窇8Ǥ| DPԌT,(-åBOi8dopUF^׻ŧ|=fRz; 雽aʗ[VQj,eb!$bH]2YPܑ/V8N x]!Eº)`p{. :Qi6^\[Bؔr[['Sr (l*;I Y- YY˟S!X%dUv q=4AQ>6+47Š:\ vQck5NCU_ebu2#U}&R /AHI^}͕J 8\_/[^H֎ѿ5`bܷ^up0-%"ZOݟ6m1 s |W&7-++%o -תUk0HߥR-KVy[(=&PфP .§F 6/m󦍘ĸjU"EV^Lh+(x:N/X%8ӊaث ]XͻInP):u= J>Huo?%>qL^xd?u\%ie<$'^4zv'8#&= 2з}eBށLd4@i/6Ƕ)I&eS,lJdʓ>g1-'B7df [8={n2*Mbwu֩Jz#h޾PK|LBBXLQNj3Xsػk! ]9hMG Y-b'/:X #[LU%HXS1ӏ ?f Rw 60rx-L_OS qlo~\=V jj/߇ )s)dQg؛B-cu;ǍE کeS{e\O3h/ʟ|ҩv@ח/zňFr܇B%EbW,x*W={rQ;лKmw}]RvզIv V:=I>Y6;;q6KE睕7b1Qavl$&BAL21i&jFO}XSih2Ƃ1f`cq_P&S,煉<]|qrT5*t}fmBcv+YPAV7Օ=i+r4Yθ3 tr`Ҝ܆0B:B 6O(r3 ڼSDIW2k)"؋H9}ќ`Սу$WsS"G{Ȑ?A9ROraA+k@kԳ"x8~C&3a;bL/ɦ̘:RQHr^+*WbOM#í'BM٣ڬ+ʐ#ϳA~W'M5 _'{zUm:_KC(H%p#K!,1ʈI|sB$8geѣ&_=.y_>5UueH+-r0AqVcΐ 5DM>]]6**KqJ1T|`R^:Ic/%72lP}.m N/eLjw7#Ψ.W#*;DE@{aa"݊`.;N &y-N Rv{3)sFRN,%,g9I:ƾ^Ymr&K5+.SeG]2a'rTdt5k? wbB0; ,sT"y~gb~I,*%zdىJ0 +%9V\F@X:58Y $C@;߮ѣRa؝nyKt(xK:,]5MJo]"K[~S(Mla4q"[tj+5 L}G?g.j8m8V {S&].J}BBi#qVV8"p2 pejLU=ɆPH3fHbK>v 1r4z ".8})!.Þʃw&.+@b7JeY}r7ʸj[:q\jNb絡":4"g|- 9Ok=$S9E7~FNb'e h1X.qoƣK$M#"nR64Z{ʊϢ֯?q ˆV^u Iik*n/hҮգJGo}Y{$0J}#y9ktj>¼\ &7o{\w4ZscFJ{8qoeUy;;N`aa!yS Jv햊5N:.m)&{P%r[ZQ˿.ĹU0"!sA2 )M?Ȇ?)(z)\ǩf~l5#VAo,VV&cb#xhͲyՂ/O"<|L%0,Iw jnZpsM? ,*Sܭc0@,|BK)@I} TE[?p ?)n`F1S|[657JwFΊgu IԌ Tb.ڧJOM6 x|)[MN1y&n)!8Ѥ7}=cBA4񟲉— F8rٮWD.K[WRrpL" neMx(>{=r'I˸tM2m'î&3&ooKa6i6!؃k9)MX>@:U0Yn.%Oljqe 5. dPP-MZ~#yvf:FF7 ܬWuӤJw$ w8{&"fj>$RXoIZBfͻ¿ug$UQDfR)JqyO&_6a f{rcR7rZmHFi8lXb(_)qDm:=/=1 5_x0_Q)[0W&ؘ>0Rzb3ll:Ywku_΢"ޏT͌6tRWFOVIs #$9qܣ*v\ͺ^/)"Q-t=1 #ךp1n1F>ə}ȧԊ "YDEjG['dCW*%;@.]{(=̽X}HnZAiCȫ^o61I&Fh"&pF媿ӳD!o&2m3G2Lq}%"UDng-\*!`6Htjy隕"DlZ֙zfJ\"L*$(V\H?Ds Ẕ̀E](x뎪^wԕ sC;̌>Vv$*s#}C|}G+i0CJNW;˨pS&e5^Ӭ(1k1F Dm:m)KJ;\ck='_w׳(]ܶd0Ϲ7&U-ȴwމdZSފۦzRM9F>ػ{Ή-2 8/d;΋vu'sUXx}|Pyxnc# )&MsMLEvqge]lhJKoKFW#xnӷk.Px9 p'gΉ؇\(+;߹*9m]x.DaMP:|m)|xg+ayg`N{Vq=Ňq{To !i+WˢݸfRvl׾Xw)9f7܂jsj */3Ġ.5kSm 6qM̝8aԳ FF>Pi^lNzfi l0a&bcDؙ-s!̅6eu)m/p~sJ0~OΦulYVG'4'=boh!eX  5T_OԗƽN|FPJf 9V[ *_?' <Xendstream endobj 174 0 obj 10478 endobj 178 0 obj <> stream xYr}WѮ"_kV,%D$$@]glU^uL7r\R/`/O}^/XI|Xÿt y+^<<]BqZf7q!ʘugZzen7"<+y_&>婑.;z0Of 䗪v0Eedae[O|p|M9 Q}l͌}:+&}~4-?|͏7âsGDinʹWך캪~!V2=zˇE&BS2aIgV+)ݡ\4J4xpSeBhaqB9vH Y'q;|=AZAvxX7YžQH3/:o|9o:3waaWBqva,Bݢ-/gI B3S ETA=f&B;0C| \e5nf.Lڧ}GKbpQT})M3CJG\>Œk @S]uγO,s TLiˢe mfh7:y8[^xUSv_~n2!J*謸' @o0~l:eӧ 5v`oUr* ѹ`]CԌ)I2IukĘsmR.!h`b 4馡8H;N(HIfa̛c^r.K7ಱ>~!$D)0k`#pv mY-Pg89:ldt@p!+GSKi<rX0F((iցg1NuYw54뒑/cд$Asɢt ?rhORf)R|IʁbB0!B0 A[I]U_u^x f{}JmpQph_ A&E1kKjZz `} vL+7Y|dO)}UejQ24u Yy h-pPZj 5OeYrRASv}^'Nk'M0D2IP6 0$m+99E" N $p-&(xAv O>շa# 8tp\Bc dg,PP )3$\훨i >@+0bŞ51yPHh} ;JgaJ,65ġX'Pc ̑TjH_}BUcٕy[lRaqzq%dW~Z=9O 쿦䚰Ӵ_u5Σ>Ol$EFÔ<#|4T)y_!Jer2>hmLΕȶG 8y!ݝoW}+QyFn(`GG 2 ,ǒi ~O h\]5*`> ld[[ח.FӲ:b"T,aЧL3)*EJi>R8#I-mM /lH[L@:*SJq > PRTS ֱO U]m>0!I=4ۼ6U.chb(5e()~X;g{>45mBmV9>Kͺ̀]3g*SfxOvLU |' < α@^y{uQ }p<)Ռ2f 5LCb?d 0N#*o9-WUVfD zwWo%@ 7BLod39y"Ny0@uQR̨tе06AUEJaCLO퓠HOWkdsnUs\j=:oolFfS4' 긡+/B0B*VH H .U$u3 ř9uU艫) %a,Ey#݁CFV:%^(/h!:u )ˈ@fHgDGMx:=NM r:^TjN~[ۮOeW/@K~[b Kc:"Oa]ݕm@QRS6c{n=%ewCK?H窧 >_*[@c0HXJJ&#N+n@- }զDd3=D1U3HEvѬ{ʻɹ;(> /Contents 6 0 R >> endobj 34 0 obj <> /Contents 35 0 R >> endobj 39 0 obj <> /Contents 40 0 R >> endobj 63 0 obj <> /Contents 64 0 R >> endobj 78 0 obj <> /Contents 79 0 R >> endobj 87 0 obj <> /Contents 88 0 R >> endobj 108 0 obj <> /Contents 109 0 R >> endobj 129 0 obj <> /Contents 130 0 R >> endobj 136 0 obj <> /Contents 137 0 R >> endobj 140 0 obj <> /Contents 141 0 R >> endobj 145 0 obj <> /Contents 146 0 R >> endobj 149 0 obj <> /Contents 150 0 R >> endobj 153 0 obj <> /Contents 154 0 R >> endobj 158 0 obj <> /Contents 159 0 R >> endobj 162 0 obj <> /Contents 163 0 R >> endobj 167 0 obj <> /Contents 168 0 R >> endobj 172 0 obj <> /Contents 173 0 R >> endobj 177 0 obj <> /Contents 178 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 5 0 R 34 0 R 39 0 R 63 0 R 78 0 R 87 0 R 108 0 R 129 0 R 136 0 R 140 0 R 145 0 R 149 0 R 153 0 R 158 0 R 162 0 R 167 0 R 172 0 R 177 0 R ] /Count 18 >> endobj 1 0 obj <> endobj 4 0 obj <> endobj 32 0 obj <> endobj 33 0 obj <> endobj 37 0 obj <> endobj 62 0 obj <> endobj 77 0 obj <> endobj 86 0 obj <> endobj 107 0 obj <> endobj 128 0 obj <> endobj 135 0 obj <> endobj 139 0 obj <> endobj 144 0 obj <> endobj 148 0 obj <> endobj 152 0 obj <> endobj 157 0 obj <> endobj 161 0 obj <> endobj 166 0 obj <> endobj 171 0 obj <> endobj 176 0 obj <> endobj 180 0 obj <>stream AdobedC  $, !$4.763.22:ASF:=N>22HbINVX]^]8EfmeZlS[]YC**Y;2;YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYU" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?`OPk2Ruħ&1oR( flT$gڪHXBE&@E@]XXisy)aKsI NI9X,A2+ 1AemlペwLmr2ݪ #;sVmV@[Tϯ:H2!q=i hfl8n':_-[F%pR"/}hM=;m9S u W߭>2cX Nww]$#vЩEv29c8ۀY3;tV(@ȩ^2 F61cYXday'*B OD#d{Vآ\u#Hn@ҜQMG ٨Ć9(~cYXĎr1LP4Y9$d`PyϠ rWw#8BBH=X@͵AZV+<*Ƙ{Mhè yh31֥$NH#díFdq B2gm,*Fwg#Fb8f *!IN*1wR;&q9~ 4ra`Ga֘hzS&0T:c['0.I&"RJO(n \('SELm@S,>E^ދ_adGjlct,vrLUA37&ND͹<ˌy$zZkq ?Tr23Sh,!xgJStC3ԱYN0L(K<qÌ?u} ^f16<` A2\fAsZ.eaIh q3w)XEH$<گƎQFGzXM$Z익ʨ9Ec>#1_N0N*A0`*@HFBu1WqZȉ=y8pcy5 çN()rq֘xHXoz;B3z#64q_nU0NNxq+g;S8Q3 W=hr IϥA*,g$) Xy;R |jX:)"YwdS}1j6  r/7AM7}Qwjy 8*=GNǖ0sޮ16<JGRMXꣁ嗷֩IIu4(Rd|3*AuSezbQ1GS|a mF,à8&";pDDH88nGT֫ :zgUt9w14l+_i- @{ϵ4HY@b)E Np)nn1sjehU ΄(V$ GU#&09ڼz` qN3ǥE'i RnC'%vH`4ȃO h:63/Nbŝݞ~P2 IUˍ?V&ec*roAvt<uBԳ+ 9Wb v4SZ Գ96d.rI9QP1yV$ϸ𤶁JMJԹX! $2+8A/>?U&IcOHvĥ^IRQw_2P uH5V\}>A V\jWEZ;$`"Fy«,,W#ʰmu#HCYiFj i8VkCm9Xb09"0LDGO_JyM@PqeH!yvqsXeum=9ˡ*)b#coZIa@(GP@!?JcHr$#9s,H "<8lmϽKsM"j}_d%$ɌF'ڿx8i-FՐn`mx)&^ơiIp۞*_?΀AL.Y7p2{caqZQ Vx3q֬K3Bq`0VXQT6ɴS: <şdeVӓ0": fo!qޣP*#U\ 0JH"e-X( BFJGZ僡Aݴg?J@T*P2=#Xʃ=c.Z2WJPUq@"9*qğ֠b8$Rwg r^L$ p|v*I+3!aўb"قq[n M,N  U ʌ?e+Ęh f?=6/TCLzG1 BN>$5eʖꨤHR2@G=ՐȤ2Vqi$xxaojti"Gr@ 0p G(fAzE(1 "f 0 ܳ1eemOD pީ0$$xuaؼ ,oҊ&K(Rz  ϱN"1-{U:.2oHӼ aE,Es|X|g=FH 0Vjp, X``zU;{0^xAs@eyH Xvw3C:ձnjCe$׈H\ajUThc8v@)ŠIPLw k{CtB$+W$docR|9cQI'"ۄU#l=G XdlQ ))ߵH+Hb9WqҤH>\a\"$}jb AY\^oRf+n'58&kV8CpGJ'FY'uUp滻caZATIN6=CC0czgҶLW8ub0;ItֻRI T TRR ll7JsZ񊭫 K O8#ozUf!#L *&1@+,93zHhPUI\wB#|k; ]w(OZ@d32 Nbwg׷4?{`;gyMV#$)Ѿ}q@Xg$9`뚧4Ff_,O$j xJUHN[gm͏{TGTfͻ>R#EL`(v8j,!V#9ɭIaXan),뎔!A*778X㰐3jˠrZcأqiڔ-a;#\U;i^OXlzɨA`rǧҀzf2G;g֛ T áF V@jW\}zT ΂X9zȪ8<րhaj3#:|H[(ԎN άgr? ᥍gArN*21 RTs.9c9&U'jӱTP?ŀR@B=)dmXS2~p~p7@9 nE*jw%!a~d*zd !?*YK<ҡ_sWmM"VGuY]7w_g +UJ]4r[AY=4X'0xt&"4W"!0 zz{_I*G wqkoàtVu"8w$)!3) m|c@g@+.$HV0p#VJxedWv?X;bݒ9 @9"Dd0Ttߒ~@:Ұ ܼ`r@K6ND]q"l]H^8\. 6HY2P:PfxUz3*'URI"; #gi$gsv`z] ޤ*@_=Kr))n'lP24 o*)bL`@(, $}Kd¿Uw$#)x8lqPɒAD;%OPjMX=)$ N_`Fc$*4Qq}}-%fX"lk.(/cVv1''ozV+aH3A7r)a"ģ-9cYte'sb"2367aO #z!o[ @>.! kxC1& Z^>X%Y6;sSd*?1Z',62n!(}A.ofRH ozwZMv@:@TK>J"y"m+6v#;U+>X$kfO~CJW!Qp2=nUAlR.% AW܇ U)ifVDI`CNjDWF8S>JHiAi8Ʀ3n{0V[ uw& F~QϽGm$7 /`61s>G'# Pm@(K Su$A>a͑! t*9m;=oKm#y`RTj=, śp*3"ܫ7rg)6:R{!V zHcR, x~QpU,va +`cBW$iPg\W.FV^-$!~CqǷ,J8fpzù"00v0 #GnqO@$t5P9-<ԆUYw4` RF }9Tm$b9%EW4nATj􏋀 q5gqFfʃ֤Ѥi (eRx`]%W +DdkdgJ-p:\:`H g'8hKv44ck -<Һ_I 8 \ J&gCҒI;TH/ yT $sU̓hO Sʯ6S ~cTyFj*h8T;\S 6BGF֢ '"FoFrOdbmcҤ!u> I';#1qw H`z~p隡|8{w^dcԤ"H9Al~x=)N ր DZ4$㊲ IFthF)d$vjԊG'JL?ƜHS0Jo),8 ˄Ͻ/u9VhOwjkf0YrNi%c?Uc2e5NXK(TX;1Uá'@:QI*y㌝.)^J4nj֠[ffRg8#Jڮ£D.Tq*3;3FzzSC`Up}hJC0{)@h= o^C?1ԐgvI0Umd qUK 4Q #,˼uN'm0ްHˏ&#X c9 .lr^B m8bFs֍s$ʲ圝3M{~wreRX%N KY+yNvǎ@OCk3X̰f+2\K6H.APyǨWIsD>Rr.@翥eI縌 ֝R*9 _a*- z]ӿ+OH I me}ڙ~iv<򧃎:{Ut?f\l!N0E]Jjw.a+fRc yh-fl?un4Y6/(+KflTq;."n%HKڦAH")&$@cGit#V:Xfn 9@Ojy kq5T%䊺skCiT "i>7?}X3jq}ː8Tw;4Mkdd 6Սw"4ˁ; kR@Gb}G+G\}*0,rK| 2)o!,Hv8MRĎNvRYzCa h_p$ (ޛ$S$H<,lqf\4mH{DY0v~#@n)rTTzSO"@FO,rp‘=Pqiv M$&QUZ~^[oʹ19+RM_w"dM{p1MIrÿLR3;=asQ \ǦyQҬ wUv~"cM1@9P9MG*q8`{APbjLy<Қɴ֜(Ndo c'.$j6(Fc )7FjA\+taMqI^ L T8&pI8"Qd I8#=[>eQHvlW;y@MxcVTRz.PA'7ejN `P;$NwBcPFgQvHLi$IzBfd%aN3ӂ*F$q`]ib:c4%n:R,f ڬ5,pοK, UA84_a{3F ]6! G8i Ez\zqSN>|`}MrG$YiMIcz!L1\޳/RH3^>$})z Brv@815o D4Ycf[乶g'v$vhr/)+SI&00Yźx2WWn#cVp;{8%v`9>؞0WXČ9 ܏0BHʮ25ا8N)+ݾ՞O$h3ǭiHQ \sRp㯽7ZKk#@sJb\o>EU28ª`wБO9==Ep-+pČ fhy>aV-sf2m y`{SD¥YUpl~V"ʞ{UKe[,H5sM,asԎ Zh(wzVg(P|Q^*M\ڡԃ`K)-R{zT˔OG3x–qiX Lڻ7OK>F^ =|sV#F _v<CMh qjqX Qھ1!CUVp%$5*0,Vf;s+K.>C)x F]HDFm\pi@W(F9zv0Cdw°.  2#vkBI󰧑UnnYw#֯AGB42m5$f,U/K/)Vޢ~5JX'l)Gҷ~vOֱ+ \a$gKCT&U:֙"nPakb) miE2ʻg\d]Qb,vw5ym8 ޹GNg~{S]$hRV%I9`sBQARsՙ"a*۹[8tM;+Sknۀ8yH >)'=,1~P*ž܌ڣ|6!]kǓOC9S]{ 4Jpc'R/$ ϥH<皌:U1H:s0bn9 <(IHS'֘"8ңy3De#hb?8I9qJsACޤW<׽+/Ǟ8tRpi$҃jx; yrx$II*&%[\@<>&\pj"NNZ  c"R\mj$2$U"8$)8lRO\R83|⇅IWe?Z2x̣n iU9#NB42TR$ceփ&p0HBuV+P;rI%6H'ޝ$?(w` 5HDzr2$&r#ta.9֬6 NUFj&bX+jmQ~AnvN(gAE+ӽplJrgVYBVn=3TnemFOo+nt`湶#N d@#_f,`WX<Զזɶ?*L[}tGC͑.bnMda#N]+/NZTB뚲gHWb6wBJV*8U/X(㑟JO$[O5Uv> ̒) 9j >`(Jfy|E⁞5 z&laacP8!O8$A>*,߼a&N +ִn# ܣ.ޭIO$(IV{{S@+ĤҮ)P|ʆ==(pcQ[ŕ9"0Ub;cR#2-j~yoz[BF@o͎;›w"ŕQ1gY=wUy [8 э84\ *qy_z+*܅#8iH,T8L9aPsO)2.{DLpl}i+%H0A8\zU(0F1=ŶHYO$} U+2N{ P9YSk֫7zQ(ܸ+֠bjў0ITcE"^TGҵtVcQY.nZ}F,Q~lp+ e[m%Nk'?ZI(ܿQ^u[ҕՌ\^It%^N=k9S{UTL7E?QU4kGæ:Q9`˱z})+@zҫ\f7I8ڹ@xdF1ϧ&N>['E)^yUcxX4A9r۰9 N@55Vh~=-7<zx :A527/%of7gi?QZGQjQ]kRzt8E5EHZ2cdR+5uSyAG#5KPISr=j'qZ瘚Lڭjvw'}kII\ͫP$9/ l2u$>[=kb|Y'BU\'>,b#ݻq[A"$2PLm wá?֯9z)#c:2 !r+2z3`P0Ew|TJ$ (\zzҚ@,);y8K jrT+zi` j.1y'[j7*qqp6 aq1["J1ɣ 4㑷0*7uH P`ic'#Apd`=(pyoa\vץ.FF9+<2N:SDp RiFiP`23I^jn;ghrE&3bbHbǜ1ދIeFqO8aAMq R 1X\>l6;toe 䃝PZBFs1R 37 !*ԁޫV+XQan2x>JBn.!hF2b;)Mu#Cr+,hŋmGQR۾лmr N`* x~mʾDEk3IĒD֪ovy2|wA(K"R[SVA();^ŸnL,nP.YDUy vVIm"l4K;ś\ϵsIʕ:W4Wg! ƪ gL 7+uDwpSN?¢u+ m#L7ݲv斷9HRBH[ىԏ ޶~̶~fd }]O=HZȞÉC%sڣ6zO_#y*8Y  (^ÀV$J&{y EVK8h%Dn}j6cstl7+Z\+[C1\wU+}ǟ#i]4ml;>Z?u{Luy)Ę 5)BoByH9ojAIv+!2}kSCN$t? ݰ֣Y"/ϧ''t`3oewW%Km!\(2نkɜP}zۗڢl1/O#4W;,ST=HJ\+5())p)WS&)qLC+@մu;'Q[Ƽk+]Fz#WE]JiNVv%~x<%|n4^#0!կ{XE݅#Ҵ$zm[#9&9OCR!VSDr;U=FF:=%j2Q\@ wȩnU,IX\!gw'2hH# 9<žLxc(.UsҚ.ܔ#1W{,Б;q! OQOo4 S`z$@uP09l Xy vtݞS j(s`Kt'jW8"$Sߞ) gҟP+~[3G>f%'6=29J ޽@Y}:ҕH0ߘRT#SMÀ:pWiR0 #N(d已=5cNG(/ۂGFnǷJyGFqސ)cRn cK"`1'p9{S%z2F1Kp"|.#4w =\9ۃE39_^b(/$ 9M{3v9]ݏ҉K6 i!ue#ғ6Lڴa/7 |PgQ$J# 6w#&~Uq{PBEF@gX/9Cb1 U|%NSaob Igb3jҝ8f1>rڨ$,bO"Y ;ĻjL73ߎXZ{KăǩJh]v{Fie+K]b^n')n\3!;jE# e֯[5܁\vozpR6UJM;;hG儡S%!ْr1G3!6*WH@_kG"%qv]D24gS2u-#!VӮ*sMlL6Dd)4"ܳQR:Sq)^N?5[WNM*r"Aǭ 1||\QUp@V=}^FYQQJО3Z-Q.JHTCoLD#Smʒ(0wPoz-C |L`%sM[Èv$#w=ǵTB/%b {TzLM%~ ܄vYW==++)Ќc_.rXj0*l!jl/6wSQh}+M>L"1;ęn1iGkt+(:խzt1cU%i4m_—m.m-fK@4LiM%4&p0Ѿ7 %v_&A#kֽZ8wFJ_N}3P݉16?ĽtICMY^J}L{ĵ"WcBၦqOaWАn T*ƈjĎ+* 1c]}rHt68E:HX=M$t!C3ҷԪјzw5:1xrUp{qrqQ*y=k;mޢWN:t9j{d6NE9vݞ{ rps:4tss6 0 6皑ʫ)9'91&P=*+j\|' 2FEglԈHU n{89l:C`s@ 0Q1zR˒02z? !W'1R+n9ci 0$ƚc4ˆ#׏ʩh*&¨7<|@4q8#@Zv{{=E >lP"pR;f &2LIHx~Ϧ=jhC; }NDRC020WCM^BўYTE:OV&`# U(h܈7O֭򙷴D^z anF:e r=i1/WC(˞QIbaMܲĊURg|1.MC`M;msӰp? d[qCef4TttVHHp % %`#$ml#3ŽkAfUX2ұ牾yjY?57,WHMaiqxWK!` ~4l B+6q?wUi2.  kal2 F\N1GzKoUR6}KFpJmrR^w.ƭD<;T$d Zs[4"l1GzR>aK`)WzmF:ڝ.cYu6XИheE Uۖ$fxa##2yi\T\¬x #EA?8{ös/Ux*}l$TޗIxA0{VWR}ߝ7+27Wj* e֟cPXI)#aI#O~^vrf*t9?Q[zXOH2 ZEA' (Z`T'2èy? &) >Rbi(Mڙ\M0+M|[h& t-ϰ587:iF7.|Si mJ䱜3aI]b6d#EqN*~R3*7QdѶ{na"mˎV[/RAUT0aÒt·0dm}Ɏ[̹klVsSN)lATrn3;S8:u4$oj ^TF8 fn[$ۏZms= h} 5p 2GJp?2cgޡ3,[MgF:ip)\aGj.178@eNN9*QzR)n3O› ;{(m;cMqGwg95*[!`o'җFv4¬RO͟sIAS[0:OPA)y R: ̻}C<'1zPxH^CAI46J[snnO^OJ T֪8l}E=$‚ibb6 8No95 ԱzZz)=x-Xf\Bуlm 8>Elڣҭi?)/,v޴mD`Bdu5nIxF3m9+5mmnRThqo\H-yJrs*" p0NI M6iqhLG'H^>v~՘Eͯr $P"%@`~^*c\ݧۦJ9c ;л%DC!F xPPɄ$T",[S簭tmX\rFk`@W;ylp#?JEu' ":qq9`D8>}KIxɪ7I,di =itUՀUCQ΂D,;3mrV$۰^g"HV>U %q2)?e.碊Jspy0O uڼR:R͎WmaZJ.GJ_:6h]ӁғH~- EkpUsrG?Tkew\9 *dE>ǵV@94!H SUKȚ;{hd,̿{}kr3*l9rh.Jt$~[P2,l.ЊC܅~n i[eG(pq)wR85R[U= ZAv3^qEf Wk6Ha#^NT1=k>)?vOUі㡷xps اˏN1ҝO]/U52wFiqHJzPҚh&9hH.((4!M.Êu4BđU'֬⠐fG%Žʂ)㯽o AJ֬d\޳4- , OTh6'Oj8(aVPǧfMA)C;Tj#W7{\\zX_.3˷V\c^48qt!vjY@X|# sǣ6һ`+VbϘBeCLW9*8${FGq-)JH (=jG%M ^97 s=Gf,R=.@b8u+GɈt9j[%}'!?Z#y,THbp094h #<Ո#EnH݂cҡXٶ'/A񷜞B( \)z~tby$p;OcSax9cDlg9mMiEڐu=)th_B[륹^ӿkc6W 9'gŘ}-P?}OB-IX_Gd1 &@G5rF U-wSg)\e$ޏ҈Yt37!^au8Pdҭ0ew'4l~5]362HǥgI˿WoR5224j-bOzm񏚥?nUE})qBDjXP/zԁ$ĝÃڬMll3r.j]RO,ױ`P zS&y2my | fxެXvh fM,m=ҹ.'iCVi%+)0)r6瓀1rW9'U!M O5>d&qξs7mɍ |ߧw1Fp9=}k-A0JG<*'Hwӵ@F78,R\| aJ vf@IS׸j4 9?Eq'W9?$q[䜒7z 5rժ<׆4RYu1RP=56]uV,ۧ|ιpI~X[u)I"megx P@=1].8xG f bmJl$E[xmVHCgzʢ`%e\~u"In?zrfyW3g 8XO{rdfxkO[/-̂8ɓi$fўkArjQe=Lkxba-54f1~fm[WWI Es\_oL]do-?ErG3˙L)Ҭ_ OުQ3R(V1ZEYzIw[=Nr)pW$֮RdQvzP˟ye\IgԘ Kj,sC?\=kR8W7*Z'8f'V//lt 9P\9ƓYJ**OZK2|driTʱL Tc(HfŠc V؎OPy5Nh"UewR0b2?J[U:kW1mJK/sϮi00GԳ$.AaAt$iݡ+2*("cmžZ 4׹[GJ䷎iCI(ڇY,@P(mʄc3#HWd"5f=0lwȶ%3֬AI#[?uƭK+_iHbw Mݑ}M[)QLF'92#|nn鞟I8Wl!! ڤ/;3~Qܕ ݾ.ws(0sRh̗, $,A4mK[ŵAO[̻鎥%V$( ˵m~Ɲ VR;9$*AVH`:^УMۓn*Sjxqr 5m6095Q4Zx^&.q@OdH0О cϲUd+z~U'8V Js~o\S2vڹ*UHs=桊 d+WS'yѨ ZؚHl0ڿ5t7/.`!\F-dC[|PѦkpF3K( 3 w;xzY93q[Zg7K̓X!R}x-dgbv\4({ÓQjvK3 v+Ni(jc)H"He{IT e"Uh\"46mf5(Aj֗vfE’8֫w)6k{xɴO)<5A›;hn2Zӳn#|jD,@#F{m=kK|\-oy lv݀j0ۦY;z NuƤZ1iwu5)6zUhLIy~M[ylVi/DM;_njK(b0\``F@d[HTj[=02kn<$(`8 V2D4TW9lBdiבLfVo.5@ޟJuq3 "A5+_--YsX9$ǹV̒qmVjZPgI R$8zV*i$FH{|s R's%lݞxS,kk.;Edw%fF#3 D;!Ne,H.:y0R1) eVGb8SWu:g⣞b4e3Ri2q) :ZtJn.x 2d.Fq~}jRBwrбOSO('zg~4Żie;qV!E$ŇІ+l#i~U8?ZIϕ&H'5roH#ͳ< 'ޫG-^XuqEʾq " XըHV&83#'!G "z .̡S?x!ČCH(>;H(Rd/;E\E%faJ,EddbBjI{P0-9J <c'tDm Tvzbd;~˙B۹$朮n-]icOv6E*T2Q:0IvW}Ei /#r+2cTޔ :1$83ҬC"?2s<М2:KtN!&IȪMi( u5$i` U=_`dtfrl<2oq:^T9>TjvCKpvvT3K2+sQNDْ_þ@/pOq Fk%2]M=:"m6csO`u֗k8g^U84$D7# osP>\iSrabQS=cs7{j&BJ{[dhKbx' /Ko)"[WXW3]B(yd!Ba_N-VQq g'ob}ƁO#\y$vDo?yp%=Oe1uv44uݭPww0igS8sʝ6NK4[DeED^by+6`'*׉nqEmRd#n]3\GYMarGPsJH$ORiWteџOS)-nǕt(S+O(܍$k.ݡP72ǜQNmȺ(O=kQє[N Y5E@@9?u,/p8s^,dgjrfO|ҹ SZ۱dޙefwρ;VXmg9= $d>\vQo/q\<+bzMXV+rֻ;$ $PPk* 2qOi!KRrH'ETPD u/!6hJqcRH[=|Gz%VKu$z[ZXyRC7*9e1GAY#)ܽU8D)5X.+ c8Z!:UKJ6v\˥‡x˓?7$!+;&IJj΢G B*"xY2sG8t9@#~ kub)Cc+Z! M\ QΑ:5}=:;w8'P:YJn}YM}oUZ|w֒}?* xm|V }땾ejFޟSS,:܅;'hCI_zfIpn,6ȋ9Z4@.'{eM!jxz>-fG+H߀|ۆy` ڲ!E'd $j%j q C *&8Hjϓ]w{oV1IgHBwJOp0+7P0*)ƄVrl%Y?B&aaXZ@V>^Y#~>SNQhHEBiJɴRd:Nnn<Ҳ V2B ҷڜuskA=q]/,f*ĀhǙ 9#t( 6Ϛ%xmPM9/b 09$td*xjd-Kx8) *sT 6y] ֌HPeGG fGlSNyoKFSQ+V_ZеsKyպ 4)-w@ߍC紧ac;`\+)ڱ5;XԸ) DÒGi`8!eg Bqu{o(ATHįBzfФđarP_L'Y*J$rXP7sªGA MMݬMuKnZp,2Cvs͓J"OSJmG6R82Gl{ {<͹qрQ[Vi'OCUy. 3.Ulz,[l-" K7Oϭ YQ|$w+bY-ٯcr"7zvO\$ӶKI@Lfga~K'r*:*4'ri46QD|7;{dէ|1;fK^i6Qb!W֟-[H q2}>-/I2I$F1sƭ2vUQЕ#,+=={hN+ʍWzcۛXn $: ^1G.2{klUEuy2F#12WWE\.Qg_1sGu9o!_Zّ&|.M&|<|;"7jW&5-2>Zr:+(?LO^k$pEG ]ȅ}k26>` ΢0C+nk^ r̥d csV).UtTvmUg x85,4cډ5 먩', 8\jooSx xҳHF+,4-I"+y[|^okVۤ-ɫ&@ۣRWA JʡpI;擒w+XX w/9ҷ`1P r>CHz+@,n#M/O'gj D+]J$!Y09>.gIcU9&݈c*'_{ 5ry-ciFyI+&nTi C+mq^!Ls!8ʒe`#@p*Ŷʙ[q d`UfR-1\Mm;hO*Hj OOz&#. d/]tI}per}]"5?1^EBwH >#_={U}$_SjO;/o t/FΔ䞬I"qV2$TjrnBƞkupA=REnzɺ!;\gUN.+J*e7/ĪOR=I3=Q3Tfe&\E!QU]6%Y. Ͻ’,mKLO<`Wo4sF3fi+dzzѰ !=(aT~  ,c@=j攎nǀn6: rC;fxżd 8te#z왠zK ecfuL6F7AMEZևܴRRo,zjӚ T *.۲ / u\]Hl#p/rGBiGOrE+?"9#w4B84JPڪiJ%H<޵ub}%Bѓx6yG ;ִI,Pa M$r#sz IHN>١-uA"' X%ّK!gК1͚e9\FzOܥj#wrGaNDƱޫ=3IeWlFҢdXK*dF6!CO3f /Q`.@~P{4cP̌\A\TuT}E#nM˕? Ecܚw=$h xOZWKwHA u?g3 (RJސݬd#VicOn}> r= B-tvPT?zM& 3Ѥ*r~q{W\~TQpLlږRscC,d (3)4cr'+G,0=9;E'O=}k;=ͮEQ689Y,F"@Foc?ݔGp6EqU/"Y|(N{Ύ~_"#Oeդ C|*=[6te\`CdPq[ sg5n;9X0!c4(13J/EԃLa,wv%+-&/ʆWf(rqJ$uxr9.p"!vp{RpP\< jj&EvB㩪r_{nSS D_Kn( S^3Mh0Ug(`ا8e$J`3ډ$V?aUnnrǜ$%qzQn YXosf?(tR3sot4)oaӰ˛庉f@==;OVA\,(bQq>G4.f/5qbk.!Dmq\s]Z"b zskknY渧6d^BzmI]2Rrm[2;Og^v"G Zh(ӧ䩫 JIfY \U1fgr⩱81ԚwNH+} 噤xl~cMyLP RF̲4:pk;,]h:Zq1lLX'CTl&{f<;[=hl'bO޺83XF(`?tt-q"G ɮwWGMZO1 jMBhQΎC& ipJ߸.`HBfE9,lF4ve'xR]y_[8:u;X)ʡЁi6#SKGQ+ON;Mᄍ?Mb uf9N&(>aOCiu:Y7fSEp(_,bx'Ԗ( u=OG`. N14XR3 RcXuX ZdwVBwl 0S'p d]5#Hmm2)cUnؾþ*Sݴyr(rNzlt=re+(+fa'X?ưfiĒ) qIPr/]fdSҶ4׎6UR2wcW?o=̻cUPCnjD c$㻞&VE:X)ƥ2*nQР_LJ>&;  |~m-pڮ2OsNhZ4q2Ӱpp:H\hҠ.[Lk:fݴd;P})6BliWN;*,XA`|{hd9(3r98 Vz_ev zǜo+15n#'RiF|ݐz$dIgڪ,lwOJ{.ZpFY'%8XDdpeH]*^? ьƱ,"?ҦD%e<=*ё&F A21#d=aFS'<:VR,o4vME%gp@z,;w;⣎r6} A+=raI,WW|6 Z̏?{N!6_Lalqު폝L2v/**k61R+2$,Ͼ@z(=)}e,QKq:֕00˱`.ze0^IxaUX*Gmih:\5Z`w$` nN/G$e'v9' ҩ"!R[T#SN*ޚVMH!z\(Ӯ|z+]F_iNVޘιC·*QJ-4kmN3s}2[BW{35YBǢ[3Jahf 2ߎMk'% "f$f;x0ʅ?/>̷B8 bwqOZJ@l3&l pzӱ,#1~Yd&s HϦ}*đ /#NG0J܇̎)2;[Ck%E;aQAI;4 2ZZK;x47*u3e!*GB;T0,}uGer+rvW')erǭN-pzToYδJ)lVkF iAJXX6Olzd,2UHr8ɡW1*X:UqY G.ь<=i.O2=PfOܩl]vx{0:T+4?1N$d :sڴ> Ĩ۵WBY30I R=qK_i,3̲2<8ީ[QdfzѢA>-乾x5aI"eؚumXDcS;;'K$0Ń 劎x=?47ʐ-t;PTs[k68d0kc2dokTK6J8q:a|WwIcHYm䊃J7 c&i"H)zT&&Mdf [)qlev*>'(dfWc>-,D,S3s҄B`6gIA@Zvm]+!fիU=#g\vZ?Q+R2*6Jq%x`G֍Yrh}g\8"w84wf|@4֓EWx*WsL738Өf➱*."8X@AN[iI{ՅQq،(#,6vϵ\ĽyHP9Uj+9䪃rjڄTsQwolEz ßv>QLZ0:%1z..jGQ<\.+h ȹEijK}A +‹p9?gA9g+Bkv;,CA|wP8 z˛чJ0͇?}˫ѭm*{Z15ط+b~\=wVrJgLUF)2QRHhmK9x0r3SwǏʵsm6)cZRWАg[[AsPh.vG,0 g[F#|b83WtyWRgs'h='EʵcHeY]jj}B##/ сM5S`<+.pofMUI47b/(Vw @ֽ((ŝ0dxm+arzsMnR)6\{zٕdi2qqP-ov y% \~{N dTb;G5nKrvvniʵܹe^bC?=q`*JYn6'A4활݂8Ump#.|jeEi̅}0ZպʂG2!*7&|nځ(Z!\hGwKM:2Fv8ùRJG{{l2o;<}ha;s0b?9^C["+v1S2f]քUy%y#ҊaWD h95 oAОS4$QwEМߕ2h_5q4y% bS&%ُTn篥1(R@ C%±0ݎ :1(p:Z;&⪮W/ #ў+6Yer8* =qS|O:; !^y՜.p>QOW՞wGFcְKU?BoR,k y#qFBb~eQW4'g3R7Fį%9N~41B|t<*veB YKQI N[sNJ@v Ukp3.I Ѯ㔖12|[eV?v4`rOҢ2Bq+H ?Zx7GUJ}T p+VHq} Ed°q5JoBF!yiH@[{q֩ETHVcZRBD)/#3›h+$KY͘`)4 ASR9` ۝5< ڕrĠk؈i.qpz}j!9;"Pbd` ,֟2w r~)x ghf){Vs:TOu`ke;rpIcΛxdB($v=Q֣e m-J38zH3Zx?dђ)IAGaK Esu#4GbHj=tn 1KjVdzՔ"]VA~.ICM'0 ι501}>#VxUGKEF_ҹy|Kvꢊ1VM&iه~UjO1K2ZXaQݞoFBImQk)?֑jܵԃN*q1fiv֜@ -9i@HCyd`IB;{(>T?jF( c0m.7^c:.z䨹dRԛ>[67TA# $p H^FgȽ$Ed2\=ڡR/[nt>ax'3K#<vw%ӥo秠vuyUcGs{zOK1j E~lwXzVηw~PPqYDl?NzzٸG g[R,g'I\k0yQV|`}8v*ʻluCwr W#yc'&ZaTgv㷭^_LTU%1~!S焍Xun(zOcj. zX kF_}jn`b1>$1m$`It̀ҕV-~`I_008j@MIamň)4ʇ;Ջ%W2F/ U-BñeD_+>DPٝtUʵ.<&x=(Jf nXt ,J bY\-"'`vRBI,bzIA2F~_NU&[v?"OW 6IT؏_Cj"UۏzQW ~^aVcx$ՎBnZ,HPN o=F5,ϽE:;L7Bgٛidj2y8#<˹aY 148gՙ2Z e }*JC!lڦ`fU Ƞ {Ұ""66* 0Ж+H rI`IDx֓\3XĻLl=={>+㏜|cG+\ԱAf%'{.0FzZ+="9 u-NZB$_`*Qx^iYRWcZ1Ѵf*Jo KEi 6=Ī͖b{T7Y*z(ETor<8H!H<˟oJ #apYwKNp*ɹPm䘋`wJ-N-(^Wt i6-P7|{[\`Tw#. ABH‘TZC~6%Hmvّl'a,o Z#=PB : G+wjC@9AM'ZZ)c7CJ) !Qix4RCR3Q lc7%MIB8a\Uzx")FB`OKC\,<,N*1O1a dq2Wsmp.hs kϠsmGҺoIwtaZEԎd4F=Y4+e2Gvzsj y@f2ZF6ǟ/ӽqQ-b9n9>%'cq:}#Ryr\[gj1`^YXc9-4k3`J+i8ʷ`ԏ4}\լVp*ӞZݡh;8+ַ5Vh|N5Ј]08Tw8XuIv5#E1G39;'RCa ֩ SiKSeLI Gf;I'Ϩ@6)RNNyB)~_sYw $ngK$#jqI%|&qWFR,H**%(]USަo+,AZAXl*HwVit.  G  SЌPĦ]l93(5KRf#3z*W,J)yhv|9PKǙ /#jo#MGjٝMu*6Uw/zqfR1ic҉OJLXף jbBv4L o[!1,Xa 史U(2Z!dmҐ^,J/y>F){Tktw/Wjtzr)r7?*a"yG$gpq朐;pMM ryjų?xҠ3`O@4$x.T)ԖeA nSnC䬎8$V,RR@ -;1T'S;E(7!nNE>]7nR'#Ickrs?(Sȫzhwp8yx(`8M-$0}jX3,B~z<E GsV OTr4h" r==)&w2szU;y.gy;Uhx |Ğզ]&Y ɼ@"e,Y-Cިn+沓J`VQBwYǗ0< >^l2O!=h+!ITP]N¢juX#iSNP<3c hB#}K C8En.W>7[jn݁Jܰ$;3TLLϧJIUٰ9}VBs0OWmA3si{qСi){RS84HcHEA)k6F*F=#Q&zP֤4¹ab3LY=j@A +FԔbhE.=h@\.>"UZ^i=w$`X5%4 Yk&8ǯCW+k%[ p0@}Εe=]2iF,y ? IU.}w?Z$nv(]T1UCm.Tz+KaMQ B@6٘>_GYTOwWjX8p}]_Sf3>ԱnD$ȹ#=jӸ=> D]ג_1WªTݑ'sN0aR]UJ=}(ķ1 "W2فi,5zk2Cn~tqHr>Q[$s;hVE!4nv nNI#yIJqta` $Sr;h:KiOg"QIK3@;FHpUMJz-\k3$Ei'l\ZlfcUy'>-E7Y[$Te"ɓiHSr[Xo W!ē|rw;{Xmؠ1P⹟am;r㧭Yh cX  *L e>STfy]K W;)i3.e`Q#=s뚵,هxp4lrN}ZClfHhbQ]?:+heiB` v&u$EiLLh$.Ҫ2W{TK2 I^XaIJ''qi;Ձj=3 ғԱ=,$yp7UV6^Ls#?Op9Mflj%EjA {b8ԢH!Ԓ7u7cGEnJIX%''qAN b./cw`R!LKAk1vֵa.IU\1==) TEP2?;Y{*2e6K1jy V[wFe-B=6v0VQӟSL+B1c-ןj$gE01}i4Wq'<^ďq*, 3c%J`"G 9j!Y0>d@wN+@qs[7k@Fu%$c'EG$NHw`~5=[R//U\i G|"peZǻ\&~hj,O3y2p:Y9 %rK4-6WI;ZA1vcHObYv䏚1"ɶw!`9#6b ]g/;4;nS[<]vCF>~81YFH:vHOrqԎPj`n>Ռ!QA5 st&43vI4O{T e *dl':օRMF%PTRr)Pkki#H"j_* jhX'֟Qj3KDW$+dD@̊͜{&wB^G$Ho(M6(+3/ l1j6@\8#lIiٛ88_ʍy=7);.$0;` c?L]VŢ\ ;0@ڥX bĖ%~dO0v>jdRڬq#I>Iv!PR,7;~mc`-1={~] }]`*AQ]kɜ^ºQ4k$"5b1*UkH ғ4 Sny,pA@CHM)h4KAgޘ{Ͻ#cTZ¦y+(^?:B+EV6\:>[ߚyOVȥ0@KEy9|ӇҘ )4@zӣaQҴѮJyKܷҚArjª,p$ 6Dz֯iLl?xW@4nPgY}j*^*$[E8٩̲Ƽd&ӟc[pX{{){~t%kv ,YT EU#< ij/͌*k&iZeFgDs ;JTQm ()iY$r݁?N`XFч'>Ռ€lҤmZ/]pqV.innEmᄇRsvqf\$a\pGZ\\Nlpi,h8 18Szvz2.JLʹ{աɽnN΍9<*JSFB{}WHy" $WTrʑ!g8]rQ/&l=(TQ5g^uۜoƊdF,KXruʲ=%% l`vvwB' ev޼4FKqn66chy960g?_ZBJd'n$pVH8#U!u%% dpR=zf9Z7)p9jD™_s*5Q;Nv9"[ȭSb&D#)'قfAmJ]"BBw |DHJ0UP,RTC2q,9 q`K98R~aSN¦°$e!,exZy,8 tϵ TDƢW8${O;N;Qbؐ dP9c D 4`|(y]U yR?|"Ai hC $'rR:>Ucb;Uaoc(\nv:PЖ*J,班BROzJ'lśK*\:$GCR۫,O"I=VP)! ?IG;grƲUO?8g\tP+Rÿw})؟@hq mF`kx-XA-Xs#jq:FwoAO "eu/Un46.%@Q$JF $dE)Y븀ON[o^@U%117 qd8m^ņr ՘hʎ1U^]-rxTa>RA+(?Qҫn  fd#%vIظ[0ped㟘cQ# +Yae$p?^I'`frz MǿZJQcc玵 $&+9]PcihBդkY*meʇp0wtӈq)0+7b+S+He!nG33uG_o=>dsU|ҭ"(0F 5bV1$J専Bq~I5(TɂrFOqW"Y%T# R{S)v ~e>ҨwG\FcOS=W&4her$'> TgK_8|TYCp%qDN*F0===Y#yʁJUla݇.QV@u2K7˰`@`HL#x̫8#ƲۜTJ`[jZˉ%Hc™!7m$=mDd-Ï${wTD6ozhwЖG.ؔm< U C2o֡3"72i&T; G>XAR0ʲ{-!eYaJ}Ox"6&7hm$R?O*wPpcKIy IyPOB+ \c2Y+9\&nHTsМрVaIbvOƦ\8VURY~iR$1*MTuU<~sW JAfJmpl5O`e7I֬[3ʋ=͸@}OFۅ1VU|F󩵊Z;46s rx8nhRF)p=+nԆhՀ#*FHWpۍv5tf91!cU ρ֯qDW~@ҥkTT~Sځj[I6)F:UX7YUb: 4*z_Zۇfuh¸ ~MZM"c\j0FZ :`@7r8] vqUKʀXEKQ\?/5|.[ֶ+ƪHXqUR<*.xn&xNab'ޥ*jase_3 Ԫ @:{ԲKpG^;SWq[F5^~nsNH]w/5y$Y@8 M4Ǚ(W6]2)w7^PFrա$bBzDFH"H fwM-U( (.⹛LMX9T=jomxt+:MS#@sWCXI܍ׂ1ާKrx])w [,lB}uv} -!V3Fab1\{'a.+ uHqG=hX^ud<7cޝ} mw fCF[ _U |25[nmzts% 2_nJ/Vlϒ6`Dd2Њ}rE2#O)K4\!KfGFKjI~D3c1^ h|FY!LW[_.XODM0MIp#d8Ajq&q1lF޲͉ уp? rH)*HG^ż;2y4wRC;nwh 4na#)$ :{LU+"oPs߭FZ'Y9"ꄟ1TvaUpdp@TPʅ^8V+ʐ Uv\9*tǣ4"͵Ԓ+G) Cqޝ$ѳ+1?]wkFqx`iȾi8j,_6B tT,+ڸ<ґK=GUyۘ?2 {l-fd9"%3ڥ,a!nW"om9pDC>wulM Lܫ/!>-5\&Y<\H*¤҈]%?tteZU mw ɑP*|ִݴ(z^:E-^:uVQU;ކ2XE?fm9jݼD-'mmdнM$. !?:mYbI%IAqک5yg&@w~TJaV9oU_ZŢVRq cc.#QK_@*܀}sNK޷Nb6y_XhcT:uXav@Ŝ]?Aڛ OҔyaOZA"cTA4E$̌w8-Y2L"22y95f'T+r'[EwҖhnNxTLs&="jC =yo<՘H=HڹEEA IA2_ 4iݒWǭAlivpFxbW "+O@:0ԟJLBٔmJx*=O;LD?c,H6>Uyld%_>P)"^F̍(烀)MGlB2'H #DC=qֹ5901#l<ڙrT1'4bUsJ;|dz/9+?dziX}ݻ CUggc#<{7FƪKB)`ٺ9)*0X,R˲FUw(߹G~ƛPUDJqҭܴH ێqYwqAӱ;^HݢCw1?+Ni)dr*ϝ\{4s36͔) 5۠WG!aҫ\Clx.y#C.|ڹ;iTOkˀAqٜ,G9%L I+I al w@{ 9X V%Rb,gp;`9̊ьcC<9e#{UX[I`b"⒌X\ʍ]tp=:TIVp&3j+EpK.%ОHH ai+d79n%1\Qҭț'X[w9VTo"eWCԓً֣yڅQ9tLx :{bljRKkl1 sVBqY:Y4\T6RmT&zBFYQ;J k#?Jtr3 e<JkK= .Nv߲n .Hjť1+=9ךmxIxަG#e8 CS:˷|ǒ+&)$"]#;4~9 A= +fRA֚5טC&X v暅'bsD,Jg,xd[ـ4/v&EC0߽tSBv-#co8+JkE'&jQ6:W)  Yv]u%$nUAG\5l8b:pqOM@  &Kv-21x'URVѺk:99MF0.҈IJڗ(\ԉC*3p=! )D@?wڢ_$Jϰ&JϻY4aN #4nOu/HWR F ;s$ZFrXd~}ܴQaϽ5e>vl9`8s{6ڟ20G֨W,<Ϲ✷lHbe#ҋ .3HlqJn:}Zw>v1t݌iި=JL(6_YsGXQ })zӟ|bv]Lsڑ]~RҌ˂CEREsMma>;p0'zUƸYL$r?fNJ;IęVݯ4<gח~ZKb q)s98 r=jYcrK 2y%`*{2%pͻ(zGP{Ls$mǿjy zܬdjt>-*H<~1\F;S).9¥`(yl_wy>Il:q;A_/ 9 Dgg\kJlL{AN:tJZ51; \ȠLt?SyeG ^R)Â0ރ 1gYtE@rҚWdqK"G#YxQS)rKwx c0d)O֊,Ie%0Ց_fTcF0Wx)Hr# 14e9'nsv+q>%#c•dHC\M^KHrC#>`a֜_i&lG.V5m+]LS"xF0p)f`mm߅BRVv}27GVn9-ZhH…8Gqո[B BINOҬsv|L`g9OFŮm·<* aKhʣ8R8 'DgnJ|8Y"&2N9^X;!H@,oA!?֡+ȦL]g>jz$eiGM|?Z\@v+ ~4~Vyg!sJŤGT9dyJqڒӝp?je\T$8 S-jtUf@=: sk ȩ7[MCܫ1gXY4櫴 y0@6X4Z8 gʫuROiER05ƒ}1M!1};JdM''JC-Ls>j+ݼȠEu IR3aIPxp>dq|{wqB/ ϻ<[ >S9z>۔99/"&$\)*@slh2yaNᝧbܬs4I$@@pN#5B"U Y\m>PGji嘧d<}ÿ5UpT<+46b`0U'o,eTSzt?1I2DŽ*GO oyD;Ag)QPd#p F2kGqǭYXld(mcGNơgwicI0 <ݹ*}}fVhl= UN2@oloR)%-*`2u,(A .6NL 5HL:qCka~-4m>Ӎ֭m+*2Iu$yQ.1RUm9KV;ȣO1.0Pw"Hc M6BWz sleQdD>f ӵн7j_)Bbpp Kw4,VB Qi ER{Բq$Ol5 t`26 lϒՅTAƢD#.F8jghf A'SO;(y\H\$d3NpR+ J`mN!?Z`5G9I3#49} q$*<(<.r={Ҁ=iTunzf AuM6S  P̥34)8>i=sIwX$Hc )X4npAE-2t&U3!NaUL~cpzD!615hh{phfp>(ݾP1GBVM<8 KpD>R2Frz,-Fۧ Ljv&E$Nĭ#L_ qIU3s9Hx٣uNh;p?.;5 [vX#iq&8w$zDa [A\s?,x`WW9 Տ;r 8;/MĒT0p;J$(pܤr =st VqY6&{ 5hQ7ǰ*{g[ |ٗdƣ.dh,`~ix+A8֦x^WW;Eeni݃umg'qț#xZ!q2B[|[[ |yǵm4ZyL16޵$QmsWes1 KmrrqU7b4;\rjҏ1U.4f 3U0*X)휎wve[R:ڟ,s7"{ I'VyLKrR, wי儌@ ֨A2Laʠ߅:4:"۔Ar[n߼<ur:yą!2{mpj~dPNE>oR7Y qj}{XA$cykj \X%$"t!F(#i?GnhUY0=JC&q=räa l }iey7TF@0n8F u4-,@88j*hPG {PX4Oi(>SßéCt"f1 k(dQ4D'#A%;^qXaދzRNS\&8+k êt"TxG9VhfJ}iCH<p})=3N sӁHBu'9pH4ߨ`-sғ}>إ4*s7Q2yUa\@=3AA0xȠ "8ғ p0z{KȠJLU.A [ U2"fsfcM(䅬m`cҥ6eRwtY$xױ Dj1 q.ӡ"npX"0 0GUb&4RIurbphE3Bg'h`ݼyYtGZU@`4rԯQHB!PcE +$a\"6C_AHbTC}}>,TO&WjĈԃQi!Q-ބu9hY TcJN%L ^Ӓ=sU uY {cm*xrٴԈJ7* @^kD-Ec^=bFicYP=b.lnkGS P!rw7E&Ib !hJnL+!0J)큚t-r=5-9sCW ۲ b#m*@:ղDsm2hp;y* $9湧{>TTj$${RB%9?/So"OL\O5؊ ̈'R$6I@lE?nCsSMiQ؁#Y@ =I*2,W9Tj#OL*/P?¤ӦLkTpѩ1@ڔ&Ti^BS\OKZ:Qa(c=1*p"| GL)qܡ > 1m!K0;TsVvڭP^2.&ۖ#j5մ܎;k& POQ\ .qK4lhXt;Y `6N~+]KeUbrw>Բg8Qƛb|.S -2ŀsSܬ :U-R,9/UJ ,>l!De_1UNY@7w[{w>b3c@5&ϑsޡ(SrIhi[zL#f9JW-H.UCqQюZKi7ŹۃZYmා䈮}IkaXGU\,[D!}O|WJ]L4d:,dr$TAcGtv%[㑌ghnU1}.хVgVj[ĮAf9Ү ݩ;W<9gc#f_H֔)ڡ˱VCXW?J,?u9 TQ " G5b$P:NsR|S>Rjo+}+A&* ahۣ Rȟc"SVWe`i 2I1JAHGa;fKGsLWp2iʤHe!B!{;'qƖ1dJ02ϷG=cRCI S=*;3M=w^P=SH9P"Ҍ('Z0HX-N)dF9O7q4A 1gfT&a?ZrHAG|U$!GU%c`;om (:r\9HʡÑƙI%;][Sk1*=yE$3DV6+!fR {ݷM. Ys9'T=ԯ//X5hXŖS0>ciMjA#}ԏB!dU_Z=Eh2#]T7r999ۓQyD]BRBe;bߧЬ A.g~ 3@G2X|&]㏺*1k0dcҡ7~2y>x 0F\nd~,bFLˍeO^:xF9*(DWy*xF 4rBPqh9$S$}1S=o(˝2+*SI%P9rusW5QD`|¦IPxf %٠c"gq<*4VbK 8?Zsi?(lUwg K {E yR9^S%{T#IcY%K( $YۉY|,/\Jk%|ީjF,4q4xR p~+r9&Zq;ۜaI+|Ii;ʸ|x~jcF<99ǥ)q22'9^1@t H%?L:^G5"rqLdN2)mDȿւ jӟZG] aU20g{fXc9Ұ{ZQ.܎~4 +TY"[Nb?) 78擐ONi'ʞnOBsڐt}0\:`bN{$cR:fHҀOz{8fʨ_4'?*VMLCz<ǹR6›=)\3J(5)#"g늻ch[$#naK#zĨ!Lϭkq $<`J0 2d~‹2JS!HdIey:}3Z2D!hϼab8N)i$I wmEXRzIo"ScRC2ePdU$BO6ЌdH1~@65Цj*9[H`*\)oi a G5$VBzр }M+c)45 VOop(HEQ k3RǡՊu3֪-n T:G`ɪ^ p X#C&84F\;$ zJ:lP܄O&rOss3FdHTv qUrȺE|cgGF$jkX7GڨrdHOK|jv[rHdbPI’Oi!GI٨\dxCK-"+sO!,N 6RpILIeuHF9uZDX3go >2J4x`w2>ŸJщaC*?矰"Rh),{D0-ArwgSLB]%9,G#>[yry +#/Md:U{׹q4;$0Q"oOU%xK]˖U8 2z֑ Vx#s1$>J9I7U9$/84v);Ugy`2>5D Ro^3S;Z09bFRfIy0T8)?*E >Rp~m$hCTonPҺ4[Y[F;@>϶a09bpGb3?=) !%:r9zT_DZV@ wJێM. ~T b8>#tc'nsr:н8BpCs9Ao7RAvF{8zcJ0O zb$] ֵtM/f`gFK@qC~aZ'̸QHqޛcҁaY+qFCN+>|5@Xؠdy3hJNXP0Θ[돘 :RR3teTXYj1Fң嘜[1-x`pOlZ"1fv\Es#vK8Iz0%ybȍd13mr##-[>«s!TDXg3,2K/ru%𧍽 pn9/Vn0}+۩i&%%9TmcQcHTCUѬH]p 5IT<%R@3x*xk kymeWcLRϾMOssVlL hU?pzK-7@f>3.Fp?*Ϳ(Z\`]bS p[tҘیdVMRv;ݳ] Rgq7isRP$h[ w(c9$c*ۖ⁇^)@ ZB@I' ֥;s+ѐ) 8W`IIn9 3*mp:;ysVl.2=GV$'@@>0eIRZN5OPC%9wRP;2y(Ͽ9g4ܜ$g##hQ($?OpfjPAi rqiBw ch %q@c4RhG|3W=vʑn• 0VCnGy 8QzθY|8'UUHqZ]3@c#t:*qLp# K TX ۾zoWvGҲ[cRG,TgY ndh-+0eS`|8A֤eXns.тI3t,2 Wyo.#6H |j֩+sm3ȠcB\F 0Er$ӹS4CWPxS|.¼\Ql=i @ 6ލDm;oC3K#E,(FUq\weZۍd8jUIr8#RXJU ! ޟwYImVՉ_V,H8jYnol% Bߟjݚ'e\uսq,qϽu%XimԮBnTZ]B8Z d?@w }EU!VGV\JByXĤqTU(^UɅn гI"ʮalE,8I++*.F@j"E t]*#UxZVR\BXE3 dj; H|#H;Csϭ+HV2YH !8Ͽbݣ\r{բ]p^:Ȳ 0Pı$p$rY鴉.`PcZip[( 3SN>8]&s"(ʶޱdlX$~Jub < )^ WOx+%!ÅGROBEII0Ŏc!89@Qq:Du0\*7 ʢ3(lQ$R.L#I,q4m1qPyk@2`*)"wGtDF ۾a0H$DoŽ&j&@<.IX4=3aH=̓I40{Rq)n{< pttlѸaٶ;\1XEOg7 OJ6=髜,I ԋM_Z+s4HMXLR N庑Zch> imZ -J[uc) u2ӂG~GObz$^4V‚)ѹEe@>n g|RcP Na_s{s@G8&is`0py ycԙ('= @Ip= `)r08ipF=*P &$^^'X q<pޞ8>##ktFܐ61B fW>S"\mp(o0 a{qGRBVeiЩq*ʟh`zaYz1}'CS$~U{T̶RR+c;Og\MqpgtXv;Ꮵ q-K6Z:[Rɂ˸CN$-vOefڈMTTḢ#-<*n*3HA*}Ujn!{{[w Sުt$-Q|]$AX{b4r[145rtF}5ԀDa#ɢcjV0#K I {qSȄg-$HJc=i,/Ycku^zq]G,($3tP;wDnQ Ri+v. ]Z =*`@f-ti VrEo3&a93WSmܴ(7HSpϰ-R\+LJ<Bč } oZK*:|q늘;,UʹjK -$$r8~NKԉLQ" VtWoY}UʾBY#FPHl=3VB}BJanП6 XTW\k~@Mo)dBH!i#Ohw[I1C6 ݼwZ-M ޘ ^[cu:5f{0y9]$,QYTd@cX}E%il*rYXl;ri &%8PWdе5Pf.f>5YH:Cuܧ(;sHBrP$sPش8׎i2qK ,˒?³"0T=j]"5TA%€̹Nk y7Hˊ;u<(~D򯩫9pIn#8wI)oe2a(t UpC``㱬TA]]sUMI"n{Py'׸׊ G2h̅<e=$}:qLT$4 x=h&FrzzP~fcځc44ǭ#ր)#wH2z~4ysDO*yUh<Df$B h$$渝 X6@By3+Y~DިeqQC\B7 °|M8 x?ְ7{fbrsɥ+SDtzÐȮK*p01ֲ -RYrHEGrvW- *NdPkBDЂR9cM`fc<hӞ=(cI?*LA\gdt8iA t$vŠw3,_J#Fu5bhdBқO%=nnc[nC9qKBP{ wLW=Bi1}@+ODZTc}sޮNzJk :yiLfHI#8zbP6k~eAҡyc%t=n+ i@֥v-Dww#F$r]y=? '1v_zZO$=zm+k{<1)-]bZ2F(ǖC{cֶ#JRYQQVb;%7Ac\idv!a-r~PjI\bMq+2$}"!Ǯ^; \EK5k\Gj;B]NL+v;x]ҭѮ4s0 93ڧrYAjd[p`ҪoHOzt4@ !ޙuQ"18S.bR⵳+<~UŞi` ~u \8 =F(-l BqgkMt5;yH@ul6}ګmH4qO3vhfH#A`̠6$p 97ܝE%b]˴ j,nϐ$#BΥ4֋"ID-I!OdUb@>*&K1ϦzT[ gf0>6 "my# 51*Kb#p߀0rGCBaȨԟ)iZIw$ U_0uA`[PEIrѺ2zI6lI3ګ*K)FcQ =hE7Zշ'ZvgW NjN܎xH!=28E8fcӜԁ.YJ@ 9( (18.p8`cA>r$C׊P!H&M*;&@ސNZ2}}CNC6ETy2e*pj\I=ͭV-VEF[Xt&L~6yF:VđYkVAgLrE>)| j +{[hݺ~cqR\R#%F+] q&yOSyj=qF9CAbɂ0; woZv@<Gր,rm%qUJqR4P.*8js֛:ғۭ 1ݺM옷;I=j;(T@EjH 2,j! U*2,bs2;VX i|x5&21@#g~p͜ .][]E=Ucޫô 2URseffP e2]b931МbȼZmFo+l<Svr ׄ&IhyNrHsUsJ\%xL)3FHK4*s֑ 879@:Zyz7J ;<})1E.hM ns87A@<`ܳEH+ԏW7RI"C{b-#$3:.55 p%7w/FJᶂCZe2 p[͔`Z6&KPK"SQmϡ ^Gi~Tޤse>,| ^y-l˸(*{YZvHTQQ3{-N(OoIq{rp@ Y1ۑ/qϩJ2P2?7&d˜ZR8 nz&zjY-Uw2V*+ 5 V8&L}Yq\ur/S{c‡{VE0 vm;+&^Ou]BښEKp2jݬH1L&~2qP}{m[&0Zw^q$sSF!YV ww5jQ]dYF-W1_.$ ,8ϯjɺ#MwsE+3\ ~=jOVˆF2SZyM)W cqJbgBvϦ) J$ pz➱UQIA#؃Vw(vFzR3/LFi23@"JUS`4X`/#<̈Ȭ@9/)ێi#RŎ:`“ ;RHPƑ`[I%aĜIĮGڭqܯ5mQtfM9ێ4ْ4'+ù_PTí=.~NêqZRV['2VbxVeIr{U&!ZMAcUmsWGjX<)YoS' ا gZEuA@N*B{~OQsҞ}iO)e=;ғ4 14:Ofqpj is; `eH1޵9wɜ8 疌hY@qTeCT,M[0i$ ϵ\aϡ G@fkA3ٗ2H1-AULq$d*&$VgڶiEY)D@'d?jZYF* Xrݕ%x  *$3)3f cғ_j^= %v nݞ}(G9ݎRךQڌz!G4RŎUxl75aޱ=eR4~R ̳ZۆSFZ^ $S`9^WKں)-摇HLKGn7ͷsHgDVmGU6I7,d'֜ɱfPOQ[*w<~|f ܥsjw R^Qp *7q@UʸPD r#BvG0m"cӴm֟h]c#èn\Q,'j? I^9Xđ{4v]/\n8$}jAEEM%r5*z.M ojdʲL0@Me+'Od;,*;5PN=zҕ[ UqK bVh_*XpGvq)b 2F1T+ZBp~ROH1^Њl)l4d۴K8r_Pm͍զ∈V?|߅T ˙@QFav1, pƄ$FHݥU,5 Gn%g`jh/-WXgXj>P ֢N7ܵ=)JqcPm^(an08<@P@&zg=M $txʇP7.AuAg4 nJTq4z F=JNy=j0OH>i,I>-i~c=)b-CQ9yd8Y8bVe r:B2n #pj-')C "`vDpjIxGDg'[]D[Q;nnښw{()еӒP|R{ߴ7vy."2}qTȎ2"Ug46L6և?"G'zyB 7ub-L}$+/m-[t:zr5em4…p%֮JB(fjӺ] T6WSSpM,{H0 A$ѴR-ߨWnb-!,~SBWBwOB).;`"L<=ޡim1`?|qIut$18z(LnŬOsaϧz2Nz*KmR8qE2_=M2Yٗ`F cj+vtbX=[Ur$ 'dSF[c zjY6nXPAmȳ m NXOEs>o9rKSt61rmPG(bN:4J1o[7  T/jX ;K&=if$Mi;$H;si.I7[ЮI*N@S  fX@0zҏ~Ԥz) <9=iqS@9H* =),@Jj#vFCf N@)0O=G1 $gKi!@7 J@jl;Ԟ`QTS^IU]0wn_N(fU<~*.WiH\砨ޔVNqNDrE1V#^x%pJi:b wV8 iuBrqV cHiz :@!ۨ(Ҁo~zHpG7u"=II"sހ[wMu#"cҋ'I1MJ9%K$F,Q^;323ӣ` 9#]ps\樵<5WpB W {UgߺBqҭ[ܤqmpzNW$?U'4;3Fi;7B49O=yM 8\f݊_3Jw"ŨRKK*]>[ǥF4ǃV\Y~ńs kJgq0Wvщ=hci Z]݁;Kl|ۜ7|BgfH|CO-[dBX ݅9lgk(^VĨ3ɩe6%#HSNכ9qX*v$LSsg҄v7K" pu٩[!e}MӚyj~B+V:EFi>cKB\Zz .#7; RTPmfaU7V{h8T G YR7<`qZX_I#ǧҦ٢H Rb؂UHd{}ͨHbEڠj qO:\goԑ\Ek/ '(pE%iHYO)ϖ*l(;9%+h+;je;P0*ShrKb-ekNF=qM֗t ɻX}{DϾBqګA)r?h)9ıNN)=)CySPwc=簧(F$=}( Q(v LӘTq 4L֐9HdtwQNҀr 2Q>" FğFOSv$RUQ6*;*2$=7M.x";śѸrE #Xi a5fՂ7zoA!@Tu82d5rG99S*'5(h*94cei\.5LM9TԪ5WyI`볭3EZ-I*"bZ)z~4t(I@ nZ3ю>QF(q@=i3@ H@&ޓB}14/5%:`JOL})Oi@.ǥG#z: "#a5J̴; ;%M0P1OInqwlҸ?PJ ;q }jN;T u4f^T{F1쑚f3@@?.IOjBqzG֜ǧ=➻)?$_>43ixtM݂@imGeOz*;S8+r9 :Ҝ͎.j3rI8OSҴ{8$gҐ\ns!$t*x9.FқN9ԜzR?ZP AJ4`4iu#98ҝқ)@ѓ;RuHR`hVT ծӚϺrdTKblQҞ>w M?y4=S*>qR2ˑڡ%E ҁF1JhHxv3Mۚ(Ԡ+u/b.VV f1E endstream endobj 181 0 obj <> endobj 182 0 obj <> endobj 9 0 obj <> endobj 8 0 obj <>stream xTkPS>!䜨-//eEVTt\XpEPAAKA%!HAH&!p0xCeAEEQ(ʸڵ6nWmk]:odgںv3g<'(@|9/!MV.U= 3\S^iB2ܜ}TS_&f"%4*ܫV7%͛73d; "[ʑg(sU{2r+dQnR.Reirys,9M[ZTTeQAE O(E+\:G(JItƘM)AK-\($5 fSb*K-Q˨$~i251Mm^s¹J_yBDDOiG&Bĝz1(+tyΖ*b("Ɖ#O yܧr3*:O׽qI;T2"jz£v]xpW{-K*t~o!ً!SP*2 Y?,=N";:7Pdc_?%.,pV4'>O-nv&\,3Ngk2851m4Es!!L,L[iÇFEEvJՌ_[Ϧt ݦCk>3m: i0LF)UT&M rfIK(Igͫ" H@ytZh[yο:LtS5m)1<drh,mP{B [n m/!qa_4ybMuꌎrGԯնZM[X?_ۤood[ùnvmVZckL1BLmi:07L*^rW[\,4[TuY _:_BW*FF3?}DGn K=/ս. ͓|axHٹ9ۊc`5hR;Svy':/u/C*#0sJw|WNꈜmtx}ѫaD\EڢgfJN/|_dhuOu !a.?;MI.;3#ƺ\Fnfw:BD)T9^0οT9*ifYZ3AˆLRSA7wT"%́%os;}ɥejNߜto`{T-[jI+ZLmҷOt~}b2o8Yzߜ2ho0o_bd@cJa9}J@d ?s`b_? 5:@a:$%1;t>.xI_­^'F}IvPVQd?$FvVBs<ϋ'Ѳ'm83 JQL^Bfɭ#g5N;J.ӬtޜKTRV(H+v#a2UFº:xY}VvY>џiT<2VT\ìlnh<9(46[@nnz~Y_ pgw1ah1O-w]R+%/U> endobj 16 0 obj <>stream xRmL[UFK4 - %|:[d&Jf&NJGYE(vص BVT, # D Ըd1.f#~ Azƨ&$''>@d2m呃_+8f{Qf9SRe21#A|T.J_:ve$S0&cNJ. l;:߰64:ܗ+O))--ek;̰ڬ -lygk$66:mb^1N6aogsy\6jg+8(ˏ|ʦJ*ʧ (HYU%y Ulw`W{9[܅F̕ԘVl;uÛ5//<8s==;Nv]reNzԬu,4ƭeoN''j1:MwtARgJiw4iP|W0(Puş+V̷hIxsC;HŠ2r 0pj__kf0Ix&I%IS->^'v3;#_7OTrjsh cFbڅ#1J!L:\?˻Na\tNhs;1NRBP~K ͸vXhgptj{),|UPJ"?Yx-HC VϜ30D>@GP}ѵ!!Y̒.Fh'*H:k|`,$-SjWPx`kX=oGkЖ0:8O/A $'l> endobj 11 0 obj <>stream xU{TTu0sVGq̤VV ؆I(H{F&sl13ff1ϤSlHH>u-o3":$+GMDb]\dC\s;'e>ƖOpc&㘉ʝṙeʝt 9fl5K}|N<t:d IJE쒏VcMv[_((`mԁ hfXdxzwD$q RG7fto5T ,1V3V*!ce| zSs<|_O-ntg40wQʮΙ[%9hI8;B#@ Aǰ,^b¶7hpuc ̦O---@N\o1HK2jº;Su'wՅuB6X9n9e(.>A 38L}~fU feXA!swOH[=d`oǁ׊:*^ytk)TtU[[pڒA"1C3wPqw˙W)8ekipy](4Uv6H@փ9 Q}(*/I+eN )0ė|~pzXGj&vOֽUb<`N.,SC2R`.]p'p3Yfn3:̍ Bm+ z(/- &u:o§ TyK~ih}K.J[$ٺkG%_,'AnNv[O>jr2c}3d|o*U yf#b%ح9=30֓i80I%1]8|KD$_. -]=yvxzlP}J  czɦ8f"kֲ WK 'ްu-ks?7O7CTճ9u@tϹ+:_M`$&$#~H]w^9x|OcwFIH7.HF C;`X!RǨezAf.bS al4!~k+%Xf`aF9ZoVG;(]kv{D{֡;b ABfAsr {hn3wn ߸Я͡ǒʨCp^f2o}܉F gh0ڸ:j`=Q퐰gKL.N߽!LO 1B6s ~9rudZv@Y<~13y%t endstream endobj 185 0 obj 2379 endobj 20 0 obj <> endobj 19 0 obj <>stream xV TSg~1$穀vHSPjVZkkETT,l$IvP 젠SVj[im;E:33/`m{9uΟ޽7 `N56ÓERْ2If 2TOϪ :,?14]jYaofᗈ%LLޘ3w@'&-cH9‰'_UstP0r߄GDz .Q0fn=M9D)+Xqe!ӹ=%D-u]@J٣I]#4Bf*{<3\X{y;SI0aE.:"ǖD.ؒ$ouӪb8e )׈71tJyˉDcvd:V|.z ɵ\JȀ4@&;*X$!:w"/!ktUPB5 \m%8kzNv 6QѻCE*@kao(z=/*ۅd)Q@q`?oqYJd^,p"[0Ǚq)OϗԼo!.z͘@ ?Ps}ﯾL͡/ ^D:cK|k v/q;Sz۵ޮ:԰p"F[Љƃ!'_[ ۀ@ؙ6zd- jࣹG9Kqs@)֮JaYB{ՖLXÊ]Zշa:gGca!74p]QhZ~ 5w;өkw NPvcB b8ˍ:g68E4241*&bٚtB[)VAUo[RZqI סA]$YMl8 *ʂ\q&ho-B"w S쐤 VKI}d &ɪ.8 jkn A^=k v^? "u]Eg; AŦ>+R;ɷZn4 jIn>.7+U |o}\m篜 uO3Æm1 (bV]ACg7*EC7}ȽoSi\]iΖ=:x NChWZؗ"4Yzl&ȘC]8\mf S)ٲmN%Ի'ua`a+s@+ph yu5j[?,n4EJH{␤*Pe);)gCQ(a epϤ% ]ͬ c3Wƍ:l4NfV$*2Ӏ^=(@ey57ucŬ^R$Sc@BIJRp'Cq1Ƙh#)* 1RM~ɕ$$H xYѿl/PWLaB,) d%UrU3h=]_?2Vr$4BWiCݕx զC+tNwib&/sg0p_~[=ݟSGA \ nM֢t>$xY,p5uJV@(2<i٥9ަ)Jiz2km(}IMhjK+i.D̡r+4fm[Σs!@v| K!LJ5&gh8C'p jHui|">g/o.юV0BgQ$]h=ar endstream endobj 186 0 obj 2837 endobj 46 0 obj <> endobj 45 0 obj <>stream xcd`ab`dd t v 443J f!Cw/MK%ݝ #Ots~AeQfzFcnjQfrbobIFjnb ZRQZZT9?$H7?%(/,̸X|{^)p}Ms&us̘9}t~Jݳ%gNkojn-7IόEEݒuu}u 3z^7[zzvݛ[%g3yw-X;jf^ݽk&_Ÿ ~ L`[|>Y<< Ԓ endstream endobj 187 0 obj 375 endobj 43 0 obj <> endobj 42 0 obj <>stream x%OKQ,pU[AJ\XD%'5a|-2)0AډmBh*e_e:^)9Wb^]d/L&z 6LvɮO>.}o& p.Ue6j{>1 SS(vM{t^4TMCu^X4,^0DU6͖-L1*lB]ی=:| Kʁ=@qTAGTFG%RiHC;oQQxȢ汃]Lc 0EyPҔ##hݓ2_WZ獽W7? endstream endobj 188 0 obj 305 endobj 54 0 obj <> endobj 53 0 obj <>stream xcd`ab`ddpsv 24 f!Cy゚?X}_%D!w=fFF7(ʢ gMCKKsԢ<Ē 'G!8?93RO1'G!X!(8,5ls~nAiIjo~JjQ *##{FL7tɸY~!]b;Llm}=wE*tNZ#c#I޳Pe[nQAj| /lil-b>s yx\v endstream endobj 189 0 obj 323 endobj 57 0 obj <> endobj 56 0 obj <>stream xcd`ab`ddq uv 443 f!Cw/MK~H }A':9(3=DAYS\17(391O7$#57QOL-SpQ(VJ-N-*KMX윟[PZZZX dgg ``h`b`fZȰl c2 Ȥu?3qU|gJt+kle./=SG?3~7}J 6No[7c'O$[wSO-9vz]{[Wso!Mzft-*ꖬh`)=-ݒu[W^]-Y=~F mQ3~fE]39J_[`fr\,y87a` endstream endobj 190 0 obj 425 endobj 72 0 obj <> endobj 71 0 obj <>stream xUOHq^}7m}hXL!]Y#`-%u2gcʃhMdtH %KI *ty6^K<χ/DzL8u|R:>pj&p飦OQ2#P6tq oz]{!S"r]l7wP2B) ]~t>[ >PZa=%Jnޮ)f,bVv9Y3Z(pnnf^mF٤qXe`%0 X<dQ*ڻtT800fMƧf~|¢hC,Fb'U,9y|H,[ɱosVURWΧ˱O%!M@T%\ !u2-HB"ɄmݠUfFDr׷ˎ!a+ L9Wq~[+ҿ蚸/mc5A*x9֣ vF 2 n7Bof25NK=Lm,`@wOsW9sܚ5'j]լyO endstream endobj 191 0 obj 593 endobj 69 0 obj <> endobj 68 0 obj <>stream xolun1'c D (Ƣ@Bݮ[]۠ݵݵ}zv3[[c34^ !f'8}F c//<o)UgWUƟBX5B7ݧ9hi5oضmy8lmzpټ| =;NNA$|%|MLEYّ}g=|޿||pˍ|K⊊va{ T;`'qmX DB8)kGΧ_r`L(v<9 TeRo,i k^}z 2n𛊟jATrZț^jȲ24OU=$+)F(&&AР4PT8!)BeE(Ybd8 /",).BoAPX)a}6p/52{vh3}{iǮ]A1>0%~usi׷W7Zo~ۿlPQ'羿(OYg務r`_I8!XP4}xFC,p> endobj 101 0 obj <>stream xcd`ab`ddwvv4433 f!C゚^?XW~$F9wcfFF7hʢ gMCKKsԢ<Ē 'G!8?93RO1'G!X!(8,5bs~nAiIjo~JjQ/?.v|E ]+㫅{DmJ*//_f)Sz{zz9zzj3;;8Z&OvwN99_29 xq^^qq^+/^!W˦M;q*r\,y8La`u endstream endobj 193 0 obj 319 endobj 126 0 obj <> endobj 125 0 obj <>stream xcd`ab`ddw v 243Of!Cy゚?X}n.݄3#ws~AeQfzFcnjQfrbobIFjnb ZRQZZT9?$H7?%(іA?ohf%7Sۢuϟ_]+5[mEwyY?^ "3StO7wtU\Xp.sa>/gx endstream endobj 194 0 obj 279 endobj 84 0 obj <> endobj 83 0 obj <>stream xmTmLW+"b׶3if9b ~LY||ҞEh8 Dɲ%4nX&f4q˲h܇8l?{ܗPJ%='@ȉ. Ryg̈́axΠܖ޼0]OEI!RJqv"r|C1ӫ-vkEYM"}.955Ed0Wrmbw̺jcf_j6FnjM֣ҫ+-u6US]bVFTjYʊi`jkCETa*b*?Lr{&y L Dx ,X1m*~ s% B=DGN;h'=KG"e*MZOC2,(ϐ= SS;ݦ'Kz'(`<,MTxa&&tuJɪ9dG0WHAAINшp)D(01x^B`NS x$fh'7 JX659<]u wq Vf|8H*`+,*jya9ڟfF#2*:L➚_pq8و)g!F 8dE>ya8J%>hs{>mP1@'s1a:f|784RuLʊ[, XǬY`t6;w U^p9;uK/:B]m.[^_1[LzXv[Uh@gͯP;e>|p]D$xHk\ iXn>Iꋨ ,w  P71]$Ps[j_2]qѷ3Huv7h-j`\x|H鐶CQթJ{kX҂SSbˆrO="*ǰi )g!; *:MmQ; ԣpZҶ1v;}1[.l v7hXز٦ƛ[z@hCvVɫ\eV,d9Nw֪fG5`5,w$լ41]y-tϼssACY¬1c!%? FbFibع# endstream endobj 195 0 obj 1274 endobj 75 0 obj <> endobj 74 0 obj <>stream xcd`ab`dd wv44f!C゚^?XWpn/݌3#Os~AeQfzFcnjQfrbobIFjnb ZRQZZT9?$H7?%(֎AAݿ`|E ]+㫅{DmJ*//_f)Sz{zz9zzj3;;8Z&OvwN99_29 xq^^qq^+/^!w߂_{~3#:aFwwǴ) --rmnl4mFߤ9&3sHYc|ߙ6aӛ'4LLI@ts44554Mh"c?@\6{ 9҅?^6m ߉Wq]b1ùd"F endstream endobj 196 0 obj 463 endobj 99 0 obj <> endobj 98 0 obj <>stream xUOHq^}7m}!LtaLS`-%u2gcʃhMdtH%KI *ty6^K<χ/2L8{sS}skK:7|&pOV멝|J縺[@~GP.ɮJ\ӭ:}m=-ءt%7}Jp\?FO a{k4-"[\ܰ<>"UԋwKurs |+QSe8(O!"* qHB8ȋ0B Kh$!aMDym*"9|>tixZr&]Ƨ=U\:/j1^`̵E"0=Lyo>ZaޓE2ScTl%yCdvm,3꜔۟LW'2,tw,{3;íYM͚_ endstream endobj 197 0 obj 591 endobj 96 0 obj <> endobj 95 0 obj <>stream xcd`ab`dd vu0433 f!Cy̗ŸIY^#{;#OtFiDʢ gMCKKsԢ<Ē 'G!8?93RO1'G!X!(8,5bs~nAiIjo~JjQ^RQbrvjINjZII'[ JXLM{{X5&g 4k d^`'zA9~?dP S(sjcb;nS&{@e@SϾkKe>I<<@ԛ endstream endobj 198 0 obj 336 endobj 93 0 obj <> endobj 92 0 obj <>stream xcd`ab`dd v 443M f!Cw/MK}nX'9(3=DAYS\17(391O7$#57QOL-SpQ(VJ-N-*KM뜟[PZZZa1122ig<.j3c?5WΜ=~Ewlg.i\XpnR| endstream endobj 199 0 obj 245 endobj 120 0 obj <> endobj 119 0 obj <>stream xcd`ab`ddt qv 443 f!Cw/MK }nX'9(3=DAYS\17(391O7$#57QOL-SpQ(VJ-N-*KM뜟[PZZZt"" bbddR(z\{WC(^W\xŊŋW.i\XpnOj endstream endobj 200 0 obj 239 endobj 117 0 obj <> endobj 116 0 obj <>stream xcd`ab`ddssvs54(f!Co_UX*ݎ#OPxTls~AeQfzFcnjQfrbobIFjnb ZRWZZT'1$5"8$ĔL]'?oh߯g~*~ -ܪr{K^.T \woDݾ E~.ɖ[>o!Z O*Gߒ{ ]}Ѕ{˯̵jy endstream endobj 201 0 obj 311 endobj 114 0 obj <> endobj 113 0 obj <>stream xcd`ab`dd q rq54 *f!CO֟@}w;-X}B *23J45 --u sS2|K2RsKԒJ=ǜ bԢ>!&  ] Lq}C~Ifn#KO`K>ߧ%n {F q9\q^ endstream endobj 202 0 obj 247 endobj 105 0 obj <> endobj 104 0 obj <>stream xcd`ab`ddtpv 443 f!Cw/MK~X}U':)9(3=DAYS\17(391O7$#57QOL-SpQ(VJ-N-*KM윟[PZZZXT_^ZR2,c`XȤ|?3qU|gJt+kle./=SG?gn_Eɝ1wĩ}-}W|lޒj]]4u^]9~Yr C ):{nyywe H]MM}:ޡ6w²<{:)mVy6r| /d-0}3n9.> endobj 204 0 obj <> endobj 61 0 obj <> endobj 31 0 obj <> endobj 205 0 obj <> endobj 112 0 obj <> endobj 206 0 obj <> endobj 97 0 obj <> endobj 94 0 obj <> endobj 123 0 obj <> endobj 82 0 obj <> endobj 207 0 obj <> endobj 91 0 obj <> endobj 134 0 obj <> endobj 58 0 obj <> endobj 111 0 obj <> endobj 208 0 obj <> endobj 30 0 obj <> endobj 209 0 obj <> endobj 85 0 obj <> endobj 55 0 obj <> endobj 18 0 obj <> endobj 28 0 obj <> endobj 15 0 obj <> endobj 175 0 obj <> endobj 210 0 obj <> endobj 81 0 obj <> endobj 156 0 obj <> endobj 211 0 obj <> endobj 29 0 obj <> endobj 212 0 obj <> endobj 76 0 obj <> endobj 27 0 obj <> endobj 13 0 obj <> endobj 70 0 obj <> endobj 90 0 obj <> endobj 213 0 obj <> endobj 26 0 obj <> endobj 10 0 obj <> endobj 165 0 obj <> endobj 214 0 obj <> endobj 103 0 obj <> endobj 24 0 obj <> endobj 22 0 obj <> endobj 52 0 obj <> endobj 215 0 obj <> endobj 23 0 obj <> endobj 127 0 obj <> endobj 25 0 obj <> endobj 51 0 obj <> endobj 216 0 obj <> endobj 143 0 obj <> endobj 217 0 obj <> endobj 133 0 obj <> endobj 170 0 obj <> endobj 218 0 obj <> endobj 132 0 obj <> endobj 219 0 obj <> endobj 121 0 obj <> endobj 50 0 obj <> endobj 220 0 obj <> endobj 122 0 obj <> endobj 124 0 obj <> endobj 118 0 obj <> endobj 49 0 obj <> endobj 73 0 obj <> endobj 115 0 obj <> endobj 48 0 obj <> endobj 67 0 obj <> endobj 60 0 obj <> endobj 106 0 obj <> endobj 47 0 obj <> endobj 21 0 obj <> endobj 14 0 obj <> endobj 44 0 obj <> endobj 59 0 obj <> endobj 100 0 obj <> endobj 66 0 obj <> endobj 221 0 obj <> endobj 2 0 obj <>endobj xref 0 222 0000000000 65535 f 0000138770 00000 n 0000294106 00000 n 0000138579 00000 n 0000138818 00000 n 0000135909 00000 n 0000000015 00000 n 0000001967 00000 n 0000218867 00000 n 0000218576 00000 n 0000268972 00000 n 0000222630 00000 n 0000222359 00000 n 0000264894 00000 n 0000290785 00000 n 0000257722 00000 n 0000221216 00000 n 0000220979 00000 n 0000256493 00000 n 0000225394 00000 n 0000225118 00000 n 0000289619 00000 n 0000272647 00000 n 0000273923 00000 n 0000271510 00000 n 0000275415 00000 n 0000267840 00000 n 0000263761 00000 n 0000257664 00000 n 0000262404 00000 n 0000254313 00000 n 0000244628 00000 n 0000138873 00000 n 0000138903 00000 n 0000136069 00000 n 0000001987 00000 n 0000002331 00000 n 0000139056 00000 n 0000242284 00000 n 0000136213 00000 n 0000002351 00000 n 0000011025 00000 n 0000229238 00000 n 0000229032 00000 n 0000290847 00000 n 0000228549 00000 n 0000228340 00000 n 0000289052 00000 n 0000286142 00000 n 0000284511 00000 n 0000282030 00000 n 0000275478 00000 n 0000272708 00000 n 0000229864 00000 n 0000229651 00000 n 0000256144 00000 n 0000230510 00000 n 0000230295 00000 n 0000252535 00000 n 0000291411 00000 n 0000287349 00000 n 0000243495 00000 n 0000139088 00000 n 0000136357 00000 n 0000011046 00000 n 0000019390 00000 n 0000292897 00000 n 0000287274 00000 n 0000232332 00000 n 0000232015 00000 n 0000266064 00000 n 0000231314 00000 n 0000231043 00000 n 0000285644 00000 n 0000236912 00000 n 0000236673 00000 n 0000263607 00000 n 0000139285 00000 n 0000136501 00000 n 0000019411 00000 n 0000029245 00000 n 0000260060 00000 n 0000249190 00000 n 0000235290 00000 n 0000234878 00000 n 0000255570 00000 n 0000139438 00000 n 0000136645 00000 n 0000029266 00000 n 0000037557 00000 n 0000266631 00000 n 0000250399 00000 n 0000239370 00000 n 0000239168 00000 n 0000247619 00000 n 0000238724 00000 n 0000238453 00000 n 0000247042 00000 n 0000237754 00000 n 0000237483 00000 n 0000292543 00000 n 0000233840 00000 n 0000233610 00000 n 0000271350 00000 n 0000241733 00000 n 0000241511 00000 n 0000288482 00000 n 0000139613 00000 n 0000136790 00000 n 0000037578 00000 n 0000047738 00000 n 0000253102 00000 n 0000245831 00000 n 0000241155 00000 n 0000240932 00000 n 0000285996 00000 n 0000240512 00000 n 0000240284 00000 n 0000284295 00000 n 0000239936 00000 n 0000239723 00000 n 0000281460 00000 n 0000283233 00000 n 0000248186 00000 n 0000283291 00000 n 0000234490 00000 n 0000234268 00000 n 0000275060 00000 n 0000139839 00000 n 0000136937 00000 n 0000047761 00000 n 0000056535 00000 n 0000280249 00000 n 0000277904 00000 n 0000251531 00000 n 0000140156 00000 n 0000137084 00000 n 0000056557 00000 n 0000065691 00000 n 0000140371 00000 n 0000137231 00000 n 0000065713 00000 n 0000074401 00000 n 0000276693 00000 n 0000140516 00000 n 0000137378 00000 n 0000074423 00000 n 0000082408 00000 n 0000140606 00000 n 0000137525 00000 n 0000082430 00000 n 0000091246 00000 n 0000140705 00000 n 0000137672 00000 n 0000091268 00000 n 0000099308 00000 n 0000261193 00000 n 0000140881 00000 n 0000137819 00000 n 0000099330 00000 n 0000107800 00000 n 0000140993 00000 n 0000137966 00000 n 0000107822 00000 n 0000115274 00000 n 0000270139 00000 n 0000141103 00000 n 0000138113 00000 n 0000115296 00000 n 0000122763 00000 n 0000279038 00000 n 0000141204 00000 n 0000138260 00000 n 0000122785 00000 n 0000133337 00000 n 0000258855 00000 n 0000141327 00000 n 0000138407 00000 n 0000133360 00000 n 0000135887 00000 n 0000141417 00000 n 0000218464 00000 n 0000218499 00000 n 0000220957 00000 n 0000222337 00000 n 0000225096 00000 n 0000228318 00000 n 0000229011 00000 n 0000229630 00000 n 0000230274 00000 n 0000231022 00000 n 0000231994 00000 n 0000233588 00000 n 0000234247 00000 n 0000234857 00000 n 0000236651 00000 n 0000237462 00000 n 0000238432 00000 n 0000239147 00000 n 0000239702 00000 n 0000240263 00000 n 0000240911 00000 n 0000241490 00000 n 0000242263 00000 n 0000243434 00000 n 0000245771 00000 n 0000246984 00000 n 0000250341 00000 n 0000254255 00000 n 0000255463 00000 n 0000260000 00000 n 0000262346 00000 n 0000263547 00000 n 0000267782 00000 n 0000271292 00000 n 0000273862 00000 n 0000276627 00000 n 0000277846 00000 n 0000280191 00000 n 0000281402 00000 n 0000283173 00000 n 0000294048 00000 n trailer << /Size 222 /Root 1 0 R /Info 2 0 R >> startxref 294156 %%EOF jasper-1.900.1/doc/jasper.pdf0000644000175000017500000063143410554235557014706 0ustar ernieernie%PDF-1.2 %쏢 48 0 obj <> stream xXRG}Wlh'!c 2ZJ_bMIX+ɏ$+hc'].\3}OKɰ~N/s%#n/γv 2JW=!HIR$罝lo4]h~9"ZʰH&~!}< 9"2aT[_3# 4@}֧ nL'0ar?#Ytb,{<{ \R%&G-ޕřdUnI791sI 9HR F\|<  !'T i6ns?~ĹL$D;s^ cn/6 tx7XpDHn˪ @% Npɲ\d <բl7##DǦM"!a#7ϠlBOgK#)ã':qNغ<W`MU/Ci#+}V(" GuiA1Y$}f\/ۛjo$3Bqb0"~-62hᓄ(fuhB7Qttwo.(5^Q~2}JBۖ$;Auh$H[c "sJ 1@jy_,S.uӈaw^^+zRH2Wc/Hc{ħ !E[5ufLTa FKq ㄂ ᲓH'wU[^$7qoib*fYZ%e|%z+@M Mk]#CNre1on/$HHhڟn۪]^ yhʶm\qo-(ib| lL gt!"R^ԗA UqqoWKO,X<,KDa1A{梮h@\ k s͢*0:(Jz|
    Gg[Zb贩lkjé$?GWE5Qbǫ3d B-tU\ݓǧ=@hʤ u Kx? R&n 4/! | ^"mYazA!u.£aQWF˃3&FmCN_eE0wOR4/A GU]3ixϊ?b$ 8 S'\`o9XRbՖ<7^Xylpz~EȂJ(wC 1o&0^~7fk0O0H5YUfkTOwIIXi}S-R\O' e]Ug{)cV]54vI BoM8l#hHtY8%k* Cjq, R ؿRendstream endobj 49 0 obj 1937 endobj 80 0 obj <> stream x}1O0w g;>{LP"$[R;aCN޻绛*\,qa'gp!+%Iln[h NOQW 9 Oetj i[B"*a54ZYss;I h닻c|#.Xe3G^w C!)Drҋz'2lr]|˸[*D^2ud~/mm! ,jendstream endobj 81 0 obj 273 endobj 84 0 obj <> stream x=;O@[&7g  U˹ (-Vf4w d2s1` S%11J j F¤ŶF{~Ƕ8s-EQ$B,k)ݛ[*3\8m>1*ŔxV^OU%w٣hx=Oӣ3gLDHeV['5)4V1j.^+kEa ׂ%&D$! KC8Zؘ2cendstream endobj 85 0 obj 275 endobj 91 0 obj <> stream x5;0D9Ŕ1kc " #p_ĄW<⦆[{bNShS n'ZAx׶PiuHq$ i endstream endobj 92 0 obj 107 endobj 95 0 obj <> stream x\[sFc~ӽ_:$\ ^ +iw-a9đH&ØYG߮wn{V_Fs<=re11~}+H|_?#)MG"\Χ(z|Da O0_Q<[<Vۗ?喈4qb`@SF-g$ShoU,< a5rU7A4f#@v(.LޮzPthUA>oU<f8E4ݑthTAG&g[6WTrJs\wo?CP(U7kD߈%;O)%xdgI<yinjqbIV;>;`.p.^UO`ci&8!ޜ|/骓n >b .\o\@:Mvӧ8ƛYE/=qd4_WvDy>Jn0[,'Q])\& 2y K>-M2ѩ[]03ZZ"FYDT,Y<87.|qɘ['sW.P;Y;*wL c|ɾbmx'"򲮑 C^+Ⱦqǒ2_c[I|%yS7n"U鉌_l"Ɠ=Lxy `1GqQ<ciZQM"CPJU -mFiromD^ij ٰj~G)UwVaR;mR%QJC)D+Z+Q{< .Ck%(WJqz7!]o$Q8I,La`wWPº=Q6g)LNoTq'I֖ޢ½ϢE\EXjJEAg @nu8g" %qWWqCgrO\6Nβ`&]XeѸm5x.iP*endstream endobj 96 0 obj 2093 endobj 134 0 obj <> stream xAk0:f7I:v k%>:Rde88m21 +O?"@K]FlY,S!>ΙdF쾠eP:Yd-)N=k1",V|V,҅BV"X %T@Qr[z}D[}j9-( s#z5M5ulX 1jg"L/zsgB/uD+߇ URK4v ƶgB0a6FGOBcfq5Ɨ_q p6FG%@Fcw`5]fbԸ05j> stream xUMo0 Wʉ|쀭(0 Xc/Yb{qO%waE<ԣHdq]5.1 XZV {]db9FXg2\HFĊ&[ܝCNL( KΕ-Q4+lX(rh0@yD֛CAmW{)؇27?̃rbZY. h9WďzC-ʃI?C_ĒK{,7ݙ!#i?LGTJx[ЯX?&!&ً[0jPȮUIm)MWV@59eD2Y,oBKRuѦ^'9Sdynfe[hs\$Oh5_j} }{RD?E xѫhwuyXn-Δ{> stream x5 @ E,&f^ig+RmjBu;#wq䆻#A)7aGux&vL!ԨTOp^4 zO d^쌐lml|h4B`EЧ"zb|=`!)&endstream endobj 153 0 obj 147 endobj 156 0 obj <> stream xZK|ԯ[dX؊aXE^#".rDr$OP+++pz|UUP6Kw'߰,7?\=yFˍ#Ns{u$~6BARfsu|}{_)h'6*?āFpu؉NA_a7f-- JH.ëkn:Fsn.u43GTg Y&QQ3*>C<]T4Bl1<[f_6X@CԊwu91Y~`n삉VRgsݎp% U: ,<-_Pm3Jݟ8ţ*n1|e 3Y2A80ծ9y:QyUDRio'0K mr>i]#1NE:: U c6\~.ʻ&\ϡSM bKOw H2d, 9q_RN):볼5!!xܗi Df_Z?ɏW>%ݼ)lgV?1B}g'zM x%t"(IY= {.ԐJ$=w\EME<o.8_6b֧ X.GΕ"fPrG]ǪRő\[%ڈ2y)U롋x4E鿶mE<_p+Н{DW_GCKP+.|$gNLVִG~VӆR{4m0'&' Mvh l2=*u" j^(\gxAŶPW}!;}絥Ҍ:'@b҇ VSs|8@ΙS WC$D_+?mIJY5e5/o(E =Irdm1ʾVX5m 9}*sȍJhY;BZ};K%aԔvþ΍&UL1c$j˕S9MZ^')\;[B՗sn|$Vr,#<D(KA>F-q9BK2g$ m34™]X `ճ3 ɿd[sIf2rR0d(\r2tK3Er-=q /v?JG'.C>.?(iX%z?De:ףH j(8t>`KEyFrg)VP^L>ևC X{sUK7~%*V|5d3B}^?r#[߾;ٴS&7YrPHKHϖ\.}+(Uɰ_G{;Hno̖#J OS1Z* }!g|h* HѴGU}h?zYJ9iL PAUJ=s2 \ 7s&.`g⡇v~~f˱Kh|j6bw*Jzc35_r ūfolfnfTD9>p;oQc[_?6mHq [Z e*x 6P[$6 Ad)>4q`/7ȿp>~<}#G?kRPVma]%@d1&oKJ*J(/y8;e?a `Rx&͇_RFw=BeyAj-Nu/֐ج GlL 1pȝO>F1ts1.s9bIe8PMRߞ:nKC$NrB T;JkOO Oea @-`+<+5/^LFSr`odC?QtVD9^Hā 3/桌4l͜ )+.Fwg샖. dJTJIrmABR͚*6+Ɠv0(GJq]_E]yW_9h*46VG1hV`\^¢|y +^`#W~f#peXN|1 -eZ*^03=$7ӘU{sNi {Y,, YI:k>FAnۘ5=OWgPItHSWFYW CoX}ݗr5uw ^N=в>\dߟ 7hIA1G@)Ӫ9T}}/\:\`"%p.Wb+7PؕR'&izUa(JW3{X.U'Gs,Muy`ؔ37R1n+p '<%PfP= I|o!a%&j sjʖIb˺ 2)2Vp\t|ӓB+o3r@h86q6d*Xvs9򍧩;?!1̾Ei ^[K1}AQ^r\}0L`Pfe{jendstream endobj 157 0 obj 3823 endobj 173 0 obj <> stream xYrk_Ү[~q4vMي, `(1J>7_Hǥ"jq?-XXfɹ Gyqu.D)//>qk _^śs@1„#~ BKKo_$8V?o?O\,G\.$EW]=Sn$X#0<`Ds'<{/KRT~ Keɹl ( .9lYXaEv/w2-Lp%K,"Xj#Rr (g4ozY* s")#X|o[5˾ueN_شjr>8qUBiV6˕i/" d>w^DpV~Xc&NGǚ0dz~]bW_,xzl#_'@=?MtON&MZ)b)=[GTťDsJ^>.XZ jr>xB׎eU*gZcWk8nS u:K#k}nPtN9Uwֹi7Zj>ڔ@`ݴM'E\M$Hn\.21sBn]WE, C(Ru9G?hU^)Jb:Y!/Wi[]m[\W {ie:?|ʔoDTpκsU Ŵnb4-6L5uO/jRY\w]MĪTJ^YP nbW''*+R,NYbӟ|.m ف Zs#8]܈;*Gm0֠5Ov'0aD9`6 )6MԵ7'Mےąe4*H>=3 'ܢ$%ЬO!7'z?u ثBu2D7X&( 8׊&sΤr, zt2`!amC\C8@ >gX!M k>L"SҁPI.&,ijlX7 I-Yv̶a|o"JTd+uN l;1 JP4;zBOաMKofVlbs@%FU=#auv_'Qhh*5HqY}_m&m)@ *f7z9omB]{C3cQ|ly7ZbTsP|JˠLZ6$!пshy5s9 `jӧ$23Ϧ ?y a+5"SJy0XPe*UDC$-f$b5 [/lUWUEtt{O/=A OϐQS4A$g{,v@C*u>scϕZ`Lj&;{D1) X􏕆UM.cTK7+ ؕϽG}b$t[tqgقjHXpBT>Dg1>4u);m.LpNs"ӕlI*fjCawN,hUERf-okTpRNzlMRrv)Q-k-.@k1݀hʢߥ(^5UߓD4꓈7ufAqM)Ƣ-3d Pb_u@Q~kRA]MO)Kܹ&n.^1hc2z=le^OJ7Yp,!Χqf- s,'s.M? dvHQGt.A43n!wFZL't 㶫ʺ T]D6 '*F<`ӥ@i&3P~)!UDL0֎ `$&@wT]e5њS#D 18Gc޵ĢR1̠B*oھj ~,vO71O,eOjպrjaG ~{53x`,p˾oRL Ue sTc q֝}=1xشC١ͻ&˓B;D /5Iξ S=k*?CFpb<> stream xZKoK6 ؜6xulm6|#i CG#{Mzf8؋@0$7{UW|-I'_-7?]>x9~` \,D)u-$BjNfNdN׈("a(NJ#8MgD^}ͲP`s.u…ǾuAhHx6.~@)5{xX2+ɯX ' F۰n0dC\2F]81|$nOZfщz^ 7,ig'4}t crޫ4ڮad[}2]E1pFC^9{B('owΑݻz]WsI)԰htS0| $s-Czu>H, 9TpyXcZ{2j JiԶԫ8cf*CJ`4F򇠗k,#~U8:'VC$;4wQR+=˱ 3:+F6+ Q<f5h)dn=Ҫxdx z=dun@҄Es_>(@[lUIreS(mJXe(<&8CJWSmv]ߵhLMurJ޵]2-+AelN_t'!9P9e#oe$(n~ vZҬnsUVYhQ:MQy6'&CYHܠߓi5- ϯf@@afEϰ47#ʧR))`%pEey. 37 ~ ԄRgddgi!gRa ]H{9Lvqtsq`A ѧBzVR(Iŝbb4l$Cvc0ƏuO0=W _uTڳ fA%ǾyD6 % Sy1z1U5Ԅ #EuTNKwh'{`c|֘£R(7/d Ҁ`6n<,|c0` {H ;R(--ɪR$$אbx̐CR R@c0kfT}gyv[El^\&7K m\ zHw *cᘨ6aX(,gfxjQl ݮ^&BqcŨ8& }vfk7 ̪)kQDNԸ?K/Eɕbn6L%MamX5 "<ޑozG*H!4!=5Hn6ЍKlM Mz_aⶹ- ͌=>ϒKV.z"#uT, 6aɖ8fNSgiKl˜puLOlbȂJ;f0s1*UQV! #udTkW~GA 1mQh"冟 飍gY{q`sis#dF sҩ!hdիmPFoT0>(qt^J!OD-zJ`JZ~4l\谀N$aJV"WDŽS5<6~fw5HYv@|DIfjfj]MCCta.oܩ%=O "QHN ($euy`$"`%zBrL /_XSXS i/ģ2pr8E`C (L@rӚܐuF/?9K2-K~IugP\KlPmBh_S:HKi^C|{/8~5:'y{0p'UgZ^ %g4e<_Fl;{_! ?endstream endobj 187 0 obj 2961 endobj 194 0 obj <> stream xZr#7t_m}ݶrL[I^"PMIIDIQ-/C;JE {/qF Q_w:xqƆgj3GI9:3vuJ~~ 7P߸]zۯ#LZG'h#^\ E7? %1Ҧ^_~};X8 qgRp:<{LDHwΩ᜜ 'pj}?TÛ\ƿtN -7]-Jm "B29yap 8oUݷa?Ki.B] q\lDzcP-|Ub=۪{ B F}ѲX}8%_,do8991΄3 !]=neh?l(+jͦn 9M%"&@;(#a2 ¢p{?EgJ[C~1G,V26ǺWCO~꾋WCU`  \'^ؿUM?[j|!9#e` N.rmTc t:?³٦]ax*Z]5?gP㻪csb9nL[FۇjX'6}4Jd qh(5ucU+;''?F#V-7]FA %Bcx r)qkq@$1"P]H {1"r H[L8\Q_+5d>S>& A"ځlthݱLatzra.}~ :hHLq䴩,.@Nى?!HG^{sj$r^}6Plz^mfFw&'+4d٣2WmWuB];^+_)dԕ0TLv$KG&x` tXrylʐ_\KMRn=mx_ņ9SM(Aq4m{鞱Cўd%?|(Hbn.PsǶ\.c.0N[m&%$`PI $ xɄEQ$bn~8F.* з>ID;<=[V~~jF{ {:_*4# 2G?ղNPA{"O-,CI@M2]5ojnhǩ鏁;A`R<&'I{Eщ G)R;R5:"-_Uzl@ab̛u%|EY 8,XZ`mu]S&dX;lލ"&-)`N  7ۀBbտ ?~']|ݒ`+iVxrc\H]hŲSDMUy|I/狦mY:2Ϭs@1zj΄㾷 'xJ2oICG71'ӱ2OWj#LcqP- Hc'e̒A9l z?uHg)ua C"I!nHnoE|4WMLAdnj*EG`Ѳ˪/'JI֎GP{HqFN/rZ`,%#d<9v迶#H!b}_[>%;Uk Ih#IpB<: Uq2c١dAD=z< #Ħp6LeRw&NF'|o/wǘtL~)$ slm\z r}yF ZLyV^iz`~rɏ>MA:>_ iBI:_I~Q?uD51Iۃ(AH9p:J;M{h{Md)2lj 5&ZAGW &{W܋-vZ8KB^Qde@1ub1!7z:5ʻd,m,rZHQKPT]t6*S^߃lۻ>6V#,ƕozAEy! OLDyߤ 6Zˠ6x =ڙճ\gt?6dg_>Ze&m"×*]Ie_?_3/m?Z&|QuS|-mZǰr+ӽIK{_, ^Raq>2BՐB<(BA@3Nb\?|nU-__>JE9|^,Hs⡳OKZ1N)F4j;6@bJ"-T`ŮJȞ0`_$I\EY'}A0gwamq?M`:3}M1({ \+8-mi pViN̏5}fǜA5$.-(Jͧũn2y8$3O y"H|Zd̝%T?K%G!k0R8v^08?.!vϝ';M*'M;Μj w7I3n-t*)JŦAg OQD/\a~U!e(-p #+ '`i8_p(N|9{zv==>3~v%QsԾK~NA!̇{ZG`!%"⮋bG9@ mW♶eن+#endstream endobj 195 0 obj 4081 endobj 201 0 obj <> stream x[MsQbJ\%Q78{+9셚$zg1ɱnhKZR*eDЯMX:B |F칧]ؠV-98i{))JNSP88-S'F%Urs} &#z8#@4`&~ۖeo]:%P}6}4e7zfT@/(2Vrᕮ,3ʺ.(\nP4:cđP'Qoޏ,}pb(״!(c'Y]DƾTGAtWu}[D1% 2z8 A!@&@ݑABN¹=}TYϻo~@[cj ,z5P4A!DB 3n4 5^wY$yN.3P9饰M1Diae* 0QBfTS[zxŮjQZ)b\t5l?~0!$ )c6̏ƶ'E<>V+DKrm+MWhOL@mŧ94qr"Bl.,)[@ybMΪ߳$R(Yw2~+<ȕ=q$x褋}=Nςg4LHX0= ik T#lb%ńIa 2QX+yPÍ%tsA<_x2YE@oJL o @ jy -D8m Lf1)D/@ mO|7q $_ Bdno6O51PҠ xi[oG>28' %1qX ~%Ngy$  -WlZ4I*1[_MP\cTGDJJɨ8/ ,i}) iI?TGgIQQ;HFFʔBܴ}0 uU#DȒr7ixBXLD+]+dԡljXiЇ I59ݨH k qA/CN;BQxn&eAs\we]C,Y"Teߊ:æ$>q9)H,"hGCV(ZX\U439yIuT/ Oٌ"%K@ɩQȎ3Iq:S_PqT x{ 6Xn50;cdKM:3us!|T?pY(Ci;:s!qrB L e*Ne8d.ܹgZc71Hl}5=$:OG-!̵ܛ $V /doFi&|t+G|:Q.ݖǾ RH$+`Ҟ7eJ,2xjG{OScʘg8>{!CQ8NR*<\z<@@z˩W= qUHƄ2_$kJҘNN`] \ݬ0ft L&7G`b$+CJr? ⬋GѓTH-"CSM:H6rj(l4-v#ꩤ4]a3i㷩 4"dVMJ^b`DU7Лh9[ ,xV,vmI}Ne0gyUBOl9E0/?dg.9$b>-i;/pXw! SN\1 eR"4ؚ ۶ڕ9$.i[7XD""1+~RUPFLjj[toJ`޲TEơx *J #sDBIm Yڶ$y*tōfHlqn)99u֖Aᬾ}ݻ -߽]cbȾi~AqIm ˱ jNŚ;C %Z/\>tcL12cw:7m8 q#@̫#w< ?:|uw[c]OUH#M+cO -5Lډ*;Bm,)6cJ( ސ`T ˱:EJ+-|I*De׉*kveqZy0 o{JGg(DNO3JU!]XF_^T-& L 1$WpHwhRn 'TXML5\QG7>ܩn:QMTw]*>vUkHݗ#ʍL-rC/ ȷl-[|x=x 22@j/zFFe|@ԐNQ8|Ų%r=jp"hEI{ |Šh{`!EZ3G#tUj^@ήfQ,;5Om޻*JiE2%HfqatBpX>e hy*U(LזX9YB,,gr! % ҈9\ָ PɳXhgamJYed爙/̨-u >9ވMhxPVL?> 1IzDxAzA{[Xc76vJ ~ʳ!2 o ^rl׆?`YL&gc+#9Bs_x=5ն3mO=ꀠ0!ЦF&z?GE/\Xפb:Mm==qj_qN vE_mNx5pP\ ~yߖ8&EXȌV NsEhkCte'Aw< 1AZ& ʵD&mO9bbDoC܏́x{F,c"x8C ?P3]Ntow! mYxeN_v整8o?Oendstream endobj 202 0 obj 4279 endobj 217 0 obj <> stream x\[sƱʣ~úJ~񛳶ˎ8[HHšd\e7|z03=3U"^g{}M"]Ws;?ֻ՟.+U 9_+KVJJڝR_]}¨3+"Xx{"*7_沢ǿկcQia߼=jp8Sj%8#+[Y7g7)WVVJz$&J'1Y%*e(a?fzL*BVf&exf6(߆ ]OO}To6*jvzQUFFRxشt(UQnL'༒L e5\⹺ʹJ}t^x W k5mEIkw̌P9TVB]ƒh5:x}emxׄoOϙ^{cךfH-~A3RHmדL\WVryTe9cgiǷm*8~? еb/(FgYTP*MjBc'WWP"lhwa ;¶yxz ./>;,~\P8<\V8e&W:85ξ>2[0OC=: !X(H5e9;x4.? .6Pv-`wUq~SJ= Yq9/G |=a`2$%\*jew߾}ېQ:pʛGo ?<_.>XW*je]S4%Fu 5D(m%).dL%kEWشøocXcd1>j:HUBSP肬QV2cvmw; kd&LfJջf BqQoۃsLQ[XWU0BXO @|h$,ʂ:9&GM<2.pxy(Y&av L `y>|u< xIhaĐƃE)"9 +k"v c~!G^Rf͏ANØ4͏ynkǜ6QX /fe3(c>ÅE ewfP͎PknvRHu*(@ I|tVFͳ6xmpH՘[CVhv] z$} e]OxwDn o6BIc-DIcbLŀMPE]I*l-͌*,ar"GX:84ۛ#ԒH"clېLrlY2H#w .#v4  Y&cma}of%F9!0Eч2Y l QHH>8a$CU ր.z>aO]LG s_K$(9_Iݜs膉fo^p.?:5E$reUIC (L }N$.IsL1!c?! ^靐\.u`hQSIm/%h`τ>}63 EmtH"w0(w !BNm5PKOVrn__Og*Q:ơ-|UQUZkQ!F:<'dvC`qi.Cp"`vNM.n?V0ycEO@X}) !UQDBi u6B3#M`LD; $<$Ac`X"~# xdzȋ$>cg!1M~}Q' 8埀RNė1ݢ鼾 vb6*x HcH|m`CAȇD ԝe5.[x,"#RD%G cUGRBJю nk/D]?bJ]WK 8i0Z1'zRS R\ +-r\><k= G j *;|BҔi&›Vag6 qNw UrN )6kHk"DL/a1̑ .ND@lC,D[ $$=ό-jn ]*ibU )L\_ !B:#kW9lTBCmv=:E9z G4Jχͨ"bD丶 B>;G` c} RMh7Uy ~tKHQ#4a/ǼC@wgR#| *\Ŭ T"׏m?'z&7sia$d&,\ -;v%'yk.C//m A+7 =o7ԑ-ҹKZtD臥54W)ǜjf"wEdM}ȧԋEAEdU\܄'#JE7K3ϗ(ЮqH 뻺m΍jrODyK$>$ᚙ+qi"u $ga/6-t[=M(~a B~<|mA:t9¥/) 8sg +W޹J4ëcuH'!HC`R$& j:bH¬U(9.*cRe ӳdRfD+GY!˛i OI|u:\^#HDg ?K$>)@2b^C%ύTRiڸ e i+biMl 쫬 SuL繛PRI}0>- ˹ dMoG^(󦎵nQY 0%]Cq~hߥ)_f@KtĎz3=k # pNS/O#Fı|(0}2Wttƺrr&/O}ඎ!X7Cd%+ C@H\B@׿{XUs4\R/)Pv NJ7}6@#3GdƦvtIV.^ 8Ӧ >60 X;'wG0QT6 uKm6ةԂ.)g@ BOIStoc܏u,^I:0Bz%5VEج@r3X:67dWCyыuIXa䓶e Rp_ \_$5į~>c2fbw0fm׺BI?nޏΫendstream endobj 218 0 obj 4710 endobj 238 0 obj <> stream xXKsq. <ځ~ll)x-+TB !6aE> hgF\*TMXP ~~q`іŻŕ#Ns{}?`(e '|{놃JxڼÏW*$\dw qBd}L(K9~- Q,m'p8 ~pXD N ItfvW?ݳu %V-1jC!o˫]*k9<]{}aXr g~6 ܽ? N ?FIS|eLjb:4 uZnjXI7mm0M FG /2`18#{).wN.\=׻DUCY690l0m-,jxu3DX¥}Oo:6 җ}ҋ?/R%rTMRWgrV%d\0<"%59:K QtvSrP29a!TZ~$ a6$`;ioQ7 FfTڳԹ úBjN j̋DsyP.6N僚a^{}[+s.m9mn?uS4vg4vͩ`Ʃ-P:]·tw? Hec0Q۷nj91QB0%*\nqː=x8vdV _aH%/͜ ml}h|9Ź8ɋL7zx E `Q%$R=%UcD TL mUeh  r(@"}J0@@09bL JÈu8pP$8I_y Ba=j3a,H7u"빠VeFc KрUrZ)IBDv*[SnA* x+W3V}?ցSOyd4R7Af75mJ})eORZmhoSk~S#:F#Nm~{DZ`VMCN6h)AY8ρVsWty1<}IV} P6y d"WFP5e;)Bu#yjヒbS3 s7*x[lPuCRf rs4X%4l+hJ }Ù]q> "vc*{*q <0V,;̽}WM>q+"{v4̃Jkl:1H3[s݊0e-hÀe tcN$Mf0`;Cu<  ی+q+N 2"{*?:b9A'gܡbB|媆1T9mPغɹgH$Bڎos)~"FfPSlarK[m$Xj3umvXwfFf9o8>ɞdrIu#9G1 3sd WBYrDyեB)zæT:ݾ|Bq05c-W',D&Ҡ頳|b\NQro)h'6Vl,ŋ4Vх>}Z'ݳ0 ̋%'MLm6܁Yud5׾*r?|_{I~_v&A8]oApVƪ)endstream endobj 239 0 obj 1900 endobj 246 0 obj <> stream x50 w?GXL *B,'PRII[PStaye3#z+(X4NBgU8ӤBވ/8\nu>ДR g"dWP=[Tw<> stream xZKo#7rc%$`d e.Զ:+5z;~dؤdL,SiYz|;?m7?ޤx홐vۛ/W \N+;%;}ϬW7_^O!a]mAMꭳK &<>pX>dS}U/Itx yXBܝΪW\)|:8ֶr۝ݝs:zGpR7Y)-z5Wr哜usAF~cK+eehr0Wtm#1=c(re>` ]nBsKN+)쥯ʖ3 *>ed-95O-i9.N*dιMx(.CʘRa)v%2vߌEN{}ZfI~IڭPt7e6s\ 7U~@hYʱ|AJ0q؝SXEooO1&SfmҦd1 M}-梑ڼqXX^Z W1<7Ӽא9Vc2'i@&pxN\qcj4*ɏwj 3>P*:PlS^C (ڋ@9fs|쇐qFY?x.Nx6+oCC0FQ~X% SZچ *0rJ8d@SLҔ0w24:*Am-l>`eIOHא5Hɯu7,vY@l tu>` %n?sХ?=ugݟƧߐ3 yʛaADfܟu??{W+t+-ùi+Asra<9 Aҟ1HZZ-|/I]6[{jLK5TjhKE opTRQ%ۮe{]Nys3r>n6j VTYsQ3J)ʭlN U=D @Vyx.7c_z"SΌ8i:S&z4ѬH { {|`m ?%`,I7Aԕ; gDMJc\޹KC(#B-af c8\_Bn koYFq:`Q5~XinYKCOx ;f2`nqh RCiuhv|Xpi!֔WPϴ%0ؒKe`l^ ("QűF]sW 8x !{LAmŞJ|K(53Y93 ce=ŌrW/f`pN 1 d>vZi?r3R jAv%~WS.k{>PY3{gi0 !&bOySʻpXl|pgS$Ft>˽-@!d*K`{^ \Ϙܡ/7}K\D˄F Z.Baءq:Ws%&Yz),m<LZ.QQh#T590JeكkVZy@ ?JEiNUJZ`ؘbCw|0aV׫6n9|[;)/cgT t0soxJLvf6.}>] N2to!4L =!O$/ 6U˛8y7ݛz e,-`Xv~:ٟqWQ|?iG4>1|Ţq\[-T}[0Rїh)endstream endobj 251 0 obj 3246 endobj 256 0 obj <> stream x[ێȑG M1Aj`J/2 v3uY`fD&웽 ,Vfĉu%.j]m_~Bׯ~"TJuSue޾~#~-O?|6}*|&TUkOteV.=zee*!<=~xJiE p}?pu| d}a/b .<Гֲ쪲G6#ӷDWT^:qq%a{WRjLJy~וHLJ~,jG |$7UiG`IqQQն&MTu%mIKHE{60'0껛v=.]W>7&j leI%U|ӧ7W&(BΏ$ac|S,O'L=k<`\hЬ豷UlqyUiHf3./+'"W T%#ǏɅ 3ݫu!^kIk^YW [U+CoKiŒ{ӢM 5Ib`ظ>TxKk4,)C ŤxVZ`k ?7ߖ"0@*wOndu% /y]i;էF #``45bP6wQӞ-;kQӛj'$buߎ#5#&_wC],}zr'y3B,pjAڷ`-?[єPtϧ%wھ٤XV>!Ǯ%2ӛ^)%h(6m۷* :2!Y[c2HpNxa*g;")'2m8ũ xi?}wJ-k,ya#'t^=IK@bY/|)U`xP %0L#n6.>W6T6L|sM**Em Z2r5thM$9BDvvzC(H5 C%%oTNJđ$_ٲbF3l͚m4\MuhBͰN/rp htLkMvy"igI Y FpC *ǬYzjLr8*`x_m` 6DRM>=I}x`]7fLWʎ[ Ohܳnr$gu'环*]/QYVG<]T7;0`{ZEMxE8?RzC~t50BdWб϶͚ԴXn 'e-J/7RLx6p:ѿ֕$ё"tW)@DMߒ|sZ */m f+Ԇx_/SD&2E+tLdb=3-?@Ñ=V-kl?>>!˝1Ď s=XwMQvS % !lҢ 6 \t$&YLԲ Ș ifAUB2Jub^{jVJ9s 1D~2'v':iл]SZ2l4̖!|w o/-v*\/\5Bc7!20X_|٧LKY N to[6KV4M0TJsbi)LisVM߬66Ӯ2k LaCG VOJsgګ%N+6b99fe6~?D5,ɢx.J Ɍt8@.sS* L]PRz˂D4/n[TC`nc S RqjY:WR Xr%t2!Yg'F{:j&qaq1L%л,,f9$AM?$bɿYGk.T N4j̀c̳g0|hr=;ZQqf"jZ%$]ɩ\X6.I2Gʓ-+'uT]aN'$IxS*p8/iY!ȋgkaVtϲF t t=yQRmZH-j)T$P45mA:=N8+xLzd=e–_=P9g@4mrA,3K]$`9s%.;NUh@NB3k>Js[)glUPH, 9'0&8榯seݮ۲"}/Z{9ä$h.ZlZ2xs˙p Cn92(zv6FMfP'33 릵c:8v@"t?J*zLZ>S=kgxMah7:vu4!BX'H7{qbXY 2oWCS-+jy].t`3CS k8]ٌZ ZYy܋Xr7 gPb2QbNܣvv,:78WB^%S nK`)EӤhvWO`va*O1Q> =J<P@2V{WėB@0LU*鮸eP^ tiNf<5?J8?{)jQ!)z{N2=rW6_o}}q(;GmO7рT9_PVY< aS.w@(O ȝ9dMl 5,eMd[^h\ϳD}"`dD# 4MQ{Y_2eb/O՚622?1u*^DNK6ݺq?Jx/z$V ,IvG}9+[\e~-+ƕQM)MX8e[mSN|9ż*Ε/;Ѭ;:bІ,S@_; [se9|ΤPA:% jʓc*AMa<L8NAL)N`?#*(=$xH'Hت}S`6v'xW[:,fpKsWlRM=08G'A9Vzɶf -`U\=G T-Oxb,1bX.MP\ѪI0 ,Х7XN.U0gvb.&\%y.aXd RUl6:& &:t@Vb*9 ,lm2_ןr'=!O?EiNGc"J@gXlz,x5: `g62 О9}J3xSQtnGM:Nsqa& E_"</7[ml3kv*ngo6+,46c.cҏd,+R{=V`xȽX-;o{Ei9<`!/IFS1=oCEohWZSx?Fgto\߆$Sh nDQvFpmp]y=&)o7ݶi%oZƙ3x0Ce ď7 mKsI PpB~7)eo&?p yt/Zaa? MYF:kՒ HpRBv+&8 !DU8t oM:lv)5#~ >VdC^[ d^9S%{}!WݡP^_ɨ^IߙV`Qg}:# Ũ HN1o3njD*f3 U5;endstream endobj 257 0 obj 4821 endobj 262 0 obj <> stream x]]qqWqhڍnt7?}⯕/ %pfaShԽ49Rr|(nBmܪMn~qf{Xͯ*6q7nnԷ0L77_o~7Z/3|?~hNwW̴ SpJJ~8%;h߼YUnob+2q\kWi} _뺮iԶm3)w3e'g(xjwWz?u!86t0&tS8ALϙZ$"@qj1+|L,L]M?g%qN&uQN|tϱYR=gjƂP?uChb jj2>><=7ʩ*g)]ǦAM٭njbT!ocҵinMώCXQw\`ӿu_( .+j/+bc8%eL$ͮSDwN 1B&n>sI&gؤte,:İk0^N}Y(i݊ F48= AʠNO;KH:15ėXju?3!yq%##ENԍ(8CA*J լT(Yj~[]}:Wp%C#ENԍ(8(C|Ʃ(~v?LؗK)g{ochg;eP; T0⃥vF؆oh؇%~vҳ6C_,(9(vʠvD@j=T I>R;dlAP%9Nv$]3(9(vʠvD3 eCCF"t-vh9H`b-Zڄ , xaPcђ3ZZ,t$>ɀt$t 9p<(tquP yXhO*,ݐBCITbulzلs8 (SӍ y\(D jgR l nj34}ƴFdc"56ʠ9g(jeP)QkfHB$A"pq&a5C661>tAY" !# "33pK4J6$2PC"ApBT z3 pT0PLp`!43JF"Ap0CB7EdS_$1g(vrH9dc#1s+%Y!El "q'A9h| F JEiڑP;J<EE"9`L팒b jGAʡcQQ/,fd1̒+rfG0KbJ,Thb9+bZ4.q&Fɱ 4VP A`1*ZEoFIn*s3J=9`L4J6)rP %Qpp+ZvfF&09H66P1*rFG0Jb J,T34lS X3J (M (FIʡBuCLK]fF"1ncpi33B7ddd)g#8TZ,t34J6(A$qb'aMC69I>W|RbR4-"Z,0P1cQr$ XBP: F}ElɁct}`'(8(c'#EW zwr،wF+O3# a3 錒]|RlNl6#cHQ!T#9! %Y4b-Vȸ +#h$J1sXhtkuJ\qFSbr# t%1݇PN g2tX(ֆ]YfYt`f6!'gjmt]robt\h:Ԛ qfBg7CccBR/xmOs<7"F׭ ylz T uc041 턐iFȖ40[AB" ٌff 8! (H1 ^HYTY=1(ي@hPT,+ʆ$OWD&d!(qLGTDžqQ+ZzL5 ֜3tOcf9eP7 E *%}-h(!6dM)Ц9",zjp(Xf(-g(tr@E0g(H0u+QrP*ע=1Qr (BP)P͜/Ayqb'mFBKAo# npX4o [+7f~8r1[oD*-%{ › lFNHBMA#HePkQV%)jRʖ& ThŌqFilR&G4J V ,%h&@3p>1Qr, hBAʡVbыoAބFZFr1[oa3Z9TZ,T33J7AqB'odw!&g(HePkQVXQI)[X5T`<ö9E%Q-8CB5 %h _ HPlc@@(((8CG݊,#EiصMXhDcjg;eP; JvfFvjvL2|80Kd"5:JYg"8TJ,zMcZ4A3CL#hF   ݘ@@Wxȵ$dALF! !’@ RE`ho8Z6#Pcf "L5 C9Z,T34J'AY$ٌ l $%Q- tAf -j݊@b -ʵ@61Qr  @B: f %Y E7"Ce`;8p `A;e00ܙB.1]WmFei5xK;R\VLxUƸj3J(#H ^grXhgWmE" 8CƼj3J(#H ^grXhgWmFe4H6` N㪍+#|Fj#|xB5j3|SHXj.P`!ڌ/@/(Wmj-1ŁH`l)8C⌐ A8@*-Y3JNP`3:9pGJPd "32u+RQrRHa*R=1RQr"M`GʡVb8R4A/$[6P1SQr"M`Gʡ#k_Rv N6wq[ݦO/n|_MQ̏Z8)}Xϓ')%Pdf7o?voC/134IÈ[rNW|?nO,Bd1uڟzQMFroVgCi@uT[~;S1 ?wXi K P'RItI|eX2$6@58Dۋ[I}o>lttܜTŮ Lsii[V&6F*=a{Adh{Akt-aI ;o3d):e_?7;zz|A瑛5MSi}ܿ^|ͦJ.4ķ$m'5lNꃰ=/M,}FWXϻt%"RGġ[.$A˹yx=dٔqOԓIWXa#{uJw)>Y[.]%9re2@WD=w٤k|h}w.u\:by BD[|b0= mȶ'>yFW/_gaQ]zgJ~o9H9IE+rfHޣm=dz/ KK+"qRx޽& X/|{۵w&Lx ׇyo){YgZ<3FoQnsq "aD~O'iktP^^o8/ՙf~w:#m{֐n[i}el|E|?ny 1N/hyHܿ?eSP;r8$lv.kqMVwlu9w#7p;i!Aw1gay6=JM^_8$EMS4HVKצx7] j{: ?tN*h:]:U/'_?qO>ʺHIs7_xDFd ZRk .%=0Iʠ&!6ݯOkE*!LKOj\"vOuTrPmbp# kIP׻z`;>[kKhjcsUx]p .${KyV/jC%[RGeɿY9tcA",+EFׄ_kW%:;޼`%e?Q)UXlL~ՖlIQh\wİ2~MՓɲU44 uP( mQ(I軗*m(p|_79/O!Nv=}RI8/8yh2-q;jbAjma~<J h7rb:g6r MZKj.Dݳզy߼RȕHwґc[79#I0XʱGO=' 7R^KKO;KmP=]uid3|Iۆ<7EFc%>O&ἻWq: lК&`eQΥ̺Wzz} Ie_[i2Xagy,JE&g!vWH]ZMSy/k 9th#uEߓZwHɵ׏kfybKW,`1/1]K{ʋ* {*M,hP׊ށv>i].c5hb_)-BIN+(8Ã`J(Xrmn$>VAX]z "90`|&iQw] XV9U8q̑h=@v~ޓS4;9lw<^C?\IV׾dytC„R(!IOwcIgZM-4(#dgM3cmQwt\mn>J^ %;ut#t|2Ť4^A ,v7X(EEp0Tkf"UpUT֓OOʔorY,1DAb&+ 6%.su+(ZSi0> =n&EGzw3݌TLM7X阝6\-[[jRY;{: @ vU NҸX3@&+|HL+| k';#endstream endobj 263 0 obj 7711 endobj 278 0 obj <> stream x}i%DZ+.>48ڗg%Z ͞;zv<Ϊ8Kfv@Ƙ=72✪ȬStvW?]t\ݞ~ikO_ikO6Ӵ^^|_EmI/~w?L]ӍfuCӎ=D%c3/@wtJo @osbk~Oз1y7jvSvmfNLtHn.Ʈn.]E۬SwwLkm s:Hs"c?E{(.C3ͧy붦wؖ8Rk96Ѽ=M2f͸f> =z@ h= H%t un1'fI@kl~ٚܬaq$.n:/@I*C$ ڴ۴7a)m)6I\ز/b Mi.]N̒6u]3Ԧ^2bSM>4uW$0py5A!BI~i-fI`lMys:w˞7]mRdAAH % P[!%%-fu\˘ܴC{:K[m2dÄ H%cZY̸Iͼh^ԈvO>\dqotr\68NYѻPKqɉ'$ZץG{E;#f-lؼ'miTg65)5 ,*nSʽ)Vosɜ qqE;f@.j.2nSJjnSݐIidQhHK"8008 9%IS ̀$BJ"(ѻPs@JxY: K -l+ -x](A D %Ғ'eȤ26Rē, B( RF(YTYX:KC-a(5lmrhA܄cR2A hV6bҒ)@ɃbRaabQqs"$2Oг3 Y!L$D*HrD"FBUA%q31ֈQ&3K,t 5a%Q2H`Ғ'Y@ɇ"R(!ܰP9Xv(ٙجeAmI dB>KDI %wXZAқAa](eAm%Wa' Ka%R2aI`pY`[aiI, Ca) nX(yTDP.& ` dA' KPB얱ݹf, l˰6}g05㐳[~_4R^r l$& .b' JZ(yT hqGώLbF`D\N>BA ᆅG)ŒH˄AN)fn l3X9A"eS0wADDE Ėbǀn@X=P;Q2 yЎ Pi$QY;<%If5b3DI$,I 4B%$*ʑDke-lkY#E0Cc 0P9MZIfYȬe@mfIId9P>% H%jdw,|df]2^ i+l"j.17oq >)# ,*n7Ðsƭ&qƥ53n2vȸ ~܆iimnRj(YT)sM? ͖mqF ~e0>?M H%j1iIw+rpLrC DHB. bE1) Bvrp$2) $BJrt)5 ,*nIK"h!ǎI"ˀڌIIR 0HidQoUfʶ|ƛ5b4ɀڇlu [9sq4=wI:i&fI#nQ!N Mb4Y@^B K %$-(lQY!vlmfK" r<(41 T,*n" .=; ,bI$@eaQEYĒH$AN#f@nl3H$@," FXT<,BKhV66%1\h p AnѻPmyYcgKZ`5bsNh$,`0ɇPPC(aQpv9Íجem7Kb|h 5J;%S˘g%Y#˂ڌJK"d!N.€K5K",S:5,d" r, WȇPP(iQmNzYCۂR8֢4( jsYCF0CN(APyI!CRAGlvY`[Β2!%tB! ↅGΑiI2ّIlvYP) Jw i%-<*vN)DB]& zvJ!6i,͔bIY!L) K椩Y3H;45.Z#vmmR$B@ R.^9&-YF:& fLJD|(&DI %$lA'fn h+X@-CD(!ܰPy.$292ӳbF`9X\CsPPC(aQ% Q5bU&9K,|APAadQqs\JY:,\VXZA% :PXJ7gK",:5 ̈́" ҁ, ]ȇ APidQqD`Iqe_Df@.js$,D K )%qlf][B]~6ms[.qm^~dAAH %/YWhW߈M. j%qM\0wBDDE$358ۺgI\@\`] i7,<*vgI\A]^ag_#6i,kp,|PH(iQfINً=4]fILOK>4 4J;Op`~]_ؤf8KbL`N(AܰPy$f( FϞM. jsS,` qB! GΓ%1G.0z,GlvYP%1OBLcrYN;!{I" 횔21O 빕Ԝ'4%A"e'~cޝmLA$e19C!BIԺ76UuzC=g5ܚ%;&n$$,"%y+N: Ͱ, TC ^j:fm}{\θIJz̋K`b^cKe& dc$q]ʫ٣I@aͻMf < Pi$QQSI2IvQFɳ -aF`QeR ZƀKU4%@ScDQGjL쓗wWݤi9'&k% j%J\0{NAew㋾c+ j3%AK>BA~I-zs k^Y`[Òﲀ| BAv~I^-ozs'k^YPޒϲ-BA~ȓr=,[o32X#ʂڜ%|* oC3PP#{3reϛ#zsE<*(KG J(=n^&&% Pqi@\;ڃ+  HBE$Bvb $6j: !/9P 4*5 Kb.=;c5d ƻ#ȁ҅ HBE. 32yӳ;QiM%w "9;2( 4:,T$*j-v9ҳbbӀ)Lf@ Ha"QQsdI<˚]55d$A=%dN|ѽbPJ%;BD-#➒5b&3K,t 5a%ђ&eѯmmƣ$'Y@ɇR(AP9H,@L4Bl춀%dyB>I %%iٝ `I$pY@MBA G%1.ezMl6nI0ff- JZ(yT\qIvYOѳ+.bF`UsY%,]BA ᆅGSJ5{mfCOmJ]04? {f[Sۥac m?$aCؓI$33KR3MϦYdAA %3$ 'D?bfIc1hs8Tw$8o73ފoU5K \@PCadQ1mn4ެL伛x4p;4 )n2r7QBɢ7$ h)yۨRkč2YdBB %.@s$<z[?fI Q#*3 [?L@ƻ.eې6E͒@&@.& jX(YT{fM@}hqF5b#[ФLr @nfjX(YZ&yNv1sɬ%eز6ʒ$,b%Ȧ|5%I̵Yq1I 5џ-q 07˾( 49,T$ `UFԅ2YdBB %p4ucxe^viu {p8mm# 6e[Q eMG3[=.ip~93kpPpQ[`B"f&A%")`ȏrTg$씡B66N<43>c`( 61 fFj, Lw3ląM&F D(9Y0UG)*(V3b(g3ܵ S#i,,r,*pԪ5Tֈj5 .L  e`QVæfwTͨ4b76Q@`4@taj! EY 3޳J5cZ68j]P( . n03` @M̂epP͘F6Q@`4@tafa) L0& %p֩J68*W Qi,,Jؼl.c*(S3R(d3еABB "idSY,ȂwOB5#RVQʀ6!7Ҿ5!-:ؼ,qQ 5ԌL(s3 lFNFHY(XT5EKz?*(y\-&j&Pբ%kШ B%23Kz;JgcjE MfB#r f CQBɣb};g`C;̸wWw,J1^` D%XNH-=9fYBU7E4kr[JRZ8z ?3KH ' ⦅G.HYӒmvN`' lKHֶv՝\ i,)fkZ[FO& Ӈ4Ji=f ˈbx5P[~M&%M]>N(!Puې'~͞;f/lh:()FCVW D,88]pK 4XP[% %,(h}$! j%-T<*v(AAA,85$& `=7JPP PI"JXxT첏QvQrd,I8OQ$B ! X4*V,(`VnWIh  9z"U% QCaQٱMj*IN\Âھ C/$! j%-TO H%X,J`Obz$.̦?A6uFuFz=hebCp3eFj`?XdOCF^Lzz[i@4PRj[`xч5XJ,CB A!FJY(yT5q8JQ`qN4L l,|PP(iQ(!D-5}W-.Ցxiڌl#Kؽ^^FI$0dמ1 5 Smq莑l3a{Œ:;bȑ"Kۃ)6Yv5PBţW(IQ/ dY`۟,``BA G.%hsS9;;%1 ?f)94& B()TIJW`,xt jCy=7z%HSނAܴP(S"XxUd' }=$ciuT!LJYXM* :m ;rYSrĔ F ! *gogoʼndߏΎ;-m._fi2CoHѻ\ƈ'9xk~[ %18t0x/&j7,Ttq"n~FL ؁݇_!SJo iuԧ#_޾qaغ?px؝R)`NtڥLBZHoMyoOs=K4A䞾#!u"(C zꡛuK_|?G^mO=1R9a6/9#//(ھ'Fq/u^ G{!wd]zFs,> Tp7S7VzUNGykwƱK]W!sy,t a|v> C~0ODyQ3Vc:;0 \,qnbgKPB);x77.ʘVmO]ĀW6'ScT^!rgsh)1nN[Z ´N JoٛW':+Z."W t4=[Zmx;?\|HD6% z :tx#Ɩa{})y6a+u aHdت[o}xJL;Tóqc_K7Q$-2SVf )& %KGNcTp|&5+Rq2Fٴ)?p%i(]ľjʷ/9bB8eHTui靏7Oׯ~@}tOP/1Ys> j灥oaZ-2"4қJ뻷G4~q~^>A Wݜryʝ:bE^4 mS7wIq7J8_P v,aW=ņYC=jӄh7M\>MC'T*O.~F; oRJf~!?{x!VJiBI=ꆰg&~CV{9iC5դ_r(7h5NgzO]H볎)v}8 ^>??:4m)F)Q5~QeX}]g{Ky]Ӳ|?7_t^}_#L 7u$|H/Cs%e{< ,(?W,t_#YMӶqvbAG`:mlպg[*[z2IE!?wy֗onX-z!ǚRv+Gu*_%GV[ KG&LiKetgI|TQƔ?%ẽPwZ"#҄8:' _gMqR MlޥV$M|[w/O=G&[,KS~^?+go^Z8xuW`˼jTbj6nu!,/zTt2Jn+'Tt/b:hY+Gۍ/+H~7h)!znA>^dמ#6E͟ hHK0rZWOju+'U a؞^^>id i=~~TXϙBv- ߈eT Ȳ^hk^\o ӸOٝNZJiuRL 𸡡Y?9Ms &NM? * 6uTn!N ClB<<[07jOeȟk"Oeھr4\uBճoKiᘫa{a_o:4$*>62&ô㾐ɲ__6X/`N޾Wwoο^ n--endstream endobj 279 0 obj 12287 endobj 287 0 obj <> stream xZYo_؀7o^#r(-phG#h =:frZ.qߗpta%J zJxru?SI eF#GUTW}*#,T0&?AQЅkӅ$T:۳&1L!5ؤlSEf?S n nT.#₃(3Ŀ@D9/4QNtT%'Pu14KGMQVdWvW_]JG&AoE>kߴ$\}{gYKo~Ho?GgعX'&ZֆXB ?7}x]?RX-koSZN}_;Jj?B 42&%&cUTŐ80KN8^S`"]']O새J0~#eYUH+%H$(O 46REd)& ;[׶7_ g3*f-v+[_ Ÿ tJF)ڏ 5)g7^xSgWySM@a?d/70&k (yIGoA 0i>cj2{6&_k5&RL 9<"Z m;WgnNw0dxĤiD!Wo?u9)uۭp0V/ '2y \e0r8MK H>= MsiY46n6wNt$dD,?7//:ҒTr&4<$-=L!VϝF 8o,}w]_^6 u+dVḪ& b9 (4UQDl-=;^ZnXhgcmL}2vwޝpXK|h)*V2T嬒,xzD9/J:?{Gwn:tL<À6fYK!tlRrN/MԤ"HEphIKp[HMIhǧn*Zp6\nG騹 QV-LE_M'S8ln-@ ܔ%XI 0k 8;Z]maC(y`si!efqWCpn"=x;ru')picZJu3*f52x*?Rt{aJI,!Cr,#F' .yI>N~T hv9Z6!{Xb. p[`\xf(J" w-zϖy_\6}nův#`KwowSEqbzHg3sGI/ h裑%aMN@YSՓVRx>aR :9nۖz0fɭ?.P5*g1eFW"V0̦4?"Hǎ?2|4Y//Zrzy>}xKrW/S%pO$:v٦C^=Uovɍ277B NU MٲyB-U+2@J"~}`[ULV\ԟdXYA-qӬnr8d$v/bA`uhS\4HKF-\bV7ɯjP7o).V"8٧nX ñ gnVSs}E(M2 ,UHSZk^r}{ FrsL:Pw&逌`ҭpRf ;5_›f ѦkS+Dg^v"zQJ9>{?Yz){Cv*IW~ sEyriOyE-~fhĈ}O 4PJ45HoV;j̄ErMPI Ov:P'ƷW\C^}BB v "3;#[vRq endstream endobj 288 0 obj 2527 endobj 303 0 obj <> stream x50 DwDz8vdlQ%@ m\R muI|:/hdm>ΰg36S M'X `%ʲ8CzޒpH \wrP2zBQk&JR6T߻,%1.Pܓkڈ}z sb jZ /O5endstream endobj 304 0 obj 172 endobj 307 0 obj <> stream xYnF}&K޲`A&~-!4Hكda6Z}:uNUÊ3'|xa%gsX7X ,Xwo2B2)ΌqÛwƯ$gk⒵iZDgwqyfs7~&f;1Qu`^iwqpLnql3\R?{?& s<=a(+VNG c88#ݍ8WIwg;}5BӾӦ_ܙ 6ڬְ6o3]Ɣ,H;^mD{,/ӄ ,x.`~8V}3d%4bߌOYᘲ%in .K)oɑ$ N}]UCj9kCv\vN%Ou=^E$9FMQ7A],ҋ2~1?yXG%Rh\yA1^{:}w* $z0v=%8&SA7Cy3ffW(oG̘ǶگsV^&)2ۮIS *, gǶ9ׅC(n?L4l]R}(D]ӾPSm}ucIUӬ\0O)}wJggp\8S84$J\TC<hvlCT ^̓X7ؠfE sDyˑ)";9&PN^TZ(wFuosH{늇(`;OIA ҚɚY/G<] ϧj!(s^}$$p$*YA18$8#~f;2k/@Ν]<Ƭpv32SᒖR+gqs˻16cpܕͿۏ+Fsl(yrNz-Zpa%EQ23Ŋ*&Hk8;6Wm@eCմR*CfwAqHƎ utpY5JsAᆁR>卤|g! _TvWʆ%téI3׹F%pg:Y<nUShӠ hZKNP<֨G6MO^[ >_AIUhP媗 :IYm84\R_rU(~zjT EK˹ J3jNJY*2%G|3U]0 JBHN;O= PMގ JoM=t} z=K.l5*Djm\WNw\(T79O@H!M`R7Up: YOmw~[kBX.?~E|q }}/iڟƮi-pbw V!ɭ5hD,)lc~El%Ϥ GHcB< +Yg*8g s YʝwZGY&#tkH xdhW(E%$>%~nuvv((w Y?ڙqTE9CXHxHA6Yŧ 9'IϛO@9xKM.ie5q,%~|ûO;F^\;u[ǧg]L`)z⅝=w~^tfy\s?sC+Գ@˯>KΚg噪.gv[h6EMWcly>ga)g ψD? 8H>`suі9jc#Vl}IۿT48! G_ b+Cz[p@:0L<}r ӎ7|Nl CeFm1nbQԉ$[c%Qc[F] aW`J,ԗYendstream endobj 308 0 obj 2532 endobj 314 0 obj <> stream xZێqB^7q&^kx̓_8%E,򽩾.p /]UNj%xﺸ|yϺXFN ʽ-$E rq[\=OWD0ns3% k&(>bǛW/uF"tq/vih* +*&ڻoߛoF%%hV*ra͵O _v(Q< -Bh@cX{5r)?ϧ'Z\i11ph"Dt!J0Sn Q cLJuo IZ,1H[ntcSҁvA0Xyl^;4HȪWqbb]8EqaB':A`!1gp%Dx7d[_Hs{GAN0(Uc`֧I+< A\HP`zh.5!U>Wu,eT쏏%rNjĺMlJрuUHsYZF4d`j2}i&فM&Lɞ֣l>Å,VMmH7v\QֱZu^υ)uV$7 C׌Oyi-&iYXbJP*eIL( dW~>(!@ksN8Rh=TV2mv*Su! 4jH`+}@@0̫U.ۗ᪤a˅h:Q 8Fc|'!9S?tri:h'9 ٸe>3/U9P\7;$QضU<5jGI/ ̺BGzdőX%Ñ^] pz'BRL `*K+H=v(ЍTE3*rye9 ҵ7‡IVq{!iyv;WY!b`X8)ތaBCʠB86:s#`O@X%3Q5/G?~qgc7{pPI2r͒!N$HF;.b{g`׬?u5@L5拏*l6P3m;+C4Nݝ[2ن 'E!# X<:鋘$EپILs&فڅR6%uПB3)'o3~&vW)YH7񄂣A7"QɑpF.+s:HR"lZ`Ctd$#sݔ*Bx5nv~*MUMwsuӶ{|wh^7`apC/YuWNi#`'_һ}hK0$LSD4oغۻFyjw7vD*OD%S0|8T՜tJ팣X$"v%qcFxcìo_'Er* 2L}LἄVynC|2v6y $JSi fذr|rl^ނ Q;,%(hZMQ.D(}]z(HccYPk=N{B}<7T }x'Y>y-}n.gű<@r y6zfnaB+@+d>K$_Fe fBLhBdo`+NCmVA9 !*i)t@ *emA8( kUX53Vʎ4n 644>t)Gti2ꍯ3Fu# D_"JĂ`nPlFt~wق ~_減#cb?bfTu}#I <3Yu5UdҤ|R faAٻe&KPmSF0W8l?_]up)N;Hzpc%;~^^5P~^N8,aaνt\RejW&?UYZ@΁e>gcѮ> stream xZKor%Ȁcb Z{EbD$zI͡VѿOz3%0 =3j~P&IΖG_NXX̖gG?k9qi]щ(e&gˣcIyu?އ5A<-|'.5awOOˏfɯpQ8k=Ӊ$T:;GWPƈS(VnY?ΜH'Sf3< Krv^7mDIT!Fx^dH&TZ#jw3XXf KC[JpFmZ/*7 m/y»ԢYHgXv_N_t2jej6˨(wDHo\% ˻eRDq'Z,o?lzӥD¡0 _ԫK&4¹uuҙ_RMZj5 V^W2Xd*%}ðMt̼eFm(˦>?^4m ._Y”;Dj a)9|ij,p-hNju!&!I6u{ax"S'& 31 f_alo$B&PzQ{cN52H8 ىgdDv8STciFJD 99$bXc b@(+1JeVKpCJDJ]JJQʍ{)H3BIw%=JntfWq6l#QzPa_. 8[ ?RQjy鿯g"(%3Zct9$eRW.q̷x'sf,4\0ɮWa5DrsA̱z^4)4FԼŨ媬#DYA]j3n!Ѻ@@&`uY|u/6Ku *e̋E3M;j#ѡZ")lOۛTr66+<%垣ԐQ7f;j)[QM8wp _n}ެFdSZnc/v(ѝ*rQ$13TNjUX&^̀6O=$@eޓ uQ&ce"' *4T`F>\0(Sbp3|O^C/( ;MAJlur?YFm% Czo2.r#y&5aS8:í.)n<'Q ɑMp >',3< ߮%0#g?^oŞo"zYuUE:6&F_]n.7ri#j`4W)@L Op%HT" bY!7ᔴY.e-xrcƶ~լۘw4ȋO=AqgT[?DX烳ҏm7SM7;B3 iK8O7mJi~ tN^[զTp:_@H[$WS(ݦN:3"72R Y 9HXPy^J뺁2uss p`w~<'59I\+{9I :Iy%^iF9I%U-@ Zn܇߆}][QYמ*hr$>P!Vhߊ@5f4U6Xlgfmendstream endobj 334 0 obj 2692 endobj 348 0 obj <> stream xYKsF򑿂UiUI9P$h=O(el*Tt7ycvϳsүns{b 9/fi$9 ^]/_߸ µ8rk!^]_Օ[ Qi҃w2L^ŵwon~y_/E˙%8xA6sB+ E7ݡ-}DQ@3h~g_0#7< *nk$qz)bFU'1%AQ[Gp֮!tyo/Z lHd8G̑ w%;_dx_Ds&5"LycK2fD[#~]gu+*f:>D*Zm7{'EvP ˸;lS^B<ݡ˦42Dױ>Tm-ӳM] cEЈ@d ήgS0KSDO½D n{4{<Ž$6_]Uu0+LO+T^_D}EhtWvSJ_ζuzj61S*IK8 e ˜l|8KS*`WpiP~ ͷa"ᎤjpmT N%2Ύ ˳( (L$_r-ZNMnL"$I'XL /Ň%RKRn{MW)lqu{}nO\0WAqQFY"ǰR4xMb%)'JtD?lKOmD$1`ňz+WÊ@CπFƜʲb*OSm,TT *P; &S#Q, 5w  8c5%29iD9٩$[xǣp0j>U 帵u /_a{&]LVU)R b RJ:HoF0dJT)1P|H=9ӈ x"i4苏M= $e.ѻPSyz T.iDyէF}O#]:'Iz, iyPX>Y~A\ߦ _Y#r˩} 578'I)I`ЅAKOo/!(w֗FAkLǦ114Q jåm9vSl[lw%;^^p:u՘4Ysp)ۡձ֪>NI *T1ue)Ss-We sҿmNI8mr{XջX@KsyTT ۚ^g Y)v 7L!RtL[! 7+"y*;9_@iǶZ֮Z;!IB|Uv1,Tޗml7fXwFFMtTjV*)k(u:&t rn|g;l".$xAЛEnZx#s>AED>;Q̱_M4;̳8ǐ:;my{A%&m%!ѧnzCu!!O$W/҂CUHM[Euqū(p) }_h&-qDۧƫ5PS5?tas&98ynڴfPL{!ܐ6{}.m҅U:/P9xNub:n6r8UBX%έ?XH~K"ʼnj(M _s. zAOP]|2&^cLY 挹/ E*w!kMdvIɚ+p]+F7Lu3]l]솂` t1R} 3G> stream xWnF[ 7IMB>f*2Iqݝl)MP!w̙3N]mw~U|x}eWE< G #(Q$\}\p0Q oŋ/oMO_5%s޿?@(G$ŷloWşY8 nօPlUqJg赃 ty%ڨbt_`0?6E5\$dNwme[O$'NZ<_7nS>!xMJ2a0l5*Jrh")̻t%ﭏnKm5Rn1 ljFȮ2l ij_G،a0nZߎC2Ȟ %K9aT&*-nT^tVfht#TY%r:Aܗc )H"vm>@ 1+ Ue) ]BmftBk$>)1Jf헓I QQ JH9SR39U!.߿E.Hsۍ(|Jdgy>mCӪ fվO+Nrs+G1͎*;7?x|"]ך6Q`÷ah9c ҄b?9)dS RSs#9ѹ)Ox =_8alڛ$ E(swZI#)VQj棑:3HQЫLˣiAs7?R y nNMt*{˒O¨Zio| pjc=ŀ ^w h!ebnP gbD~;5/_tM{eHSFp4PJimXԖBsov-.?ܟ\o{) grGߴޠX :DMHN2 !XЌif$vh>̈́2iN2 ʝI#8ۏeAd Xil etޅR+W 0QW~K &6]R.Xc_9&p<ɗ!<5f{[Ƀsy_I,~|6}VU;endstream endobj 362 0 obj 1326 endobj 367 0 obj <> stream x=@ }R=(ʏ}DIi3"*ͪ3̨0{7<@cP[EY#O3jo0 ,v9\4iWpm/uwus[s o 풪veͩ{c'E_4rQ_(:/\\7endstream endobj 368 0 obj 178 endobj 371 0 obj <> stream xXێFx4}BV )!f:̌ۀS}+_ƻ R񰨧ΩSXP cZ=O7'o,q*`bPa #(QꂳG?Sh8㏬%{׌)"(6ųW?a,QPш3XÂg(TFͮvqxqyV? WewoH'tZKXMe[5ps.m¢ ?׻*SkyZ}u}1lЎHn&b}¥]_2.Wma'eٹi_ ۆ|.?h s٫j5.GYLV9CdSlC/ bEg7ms3E}br(C44*YMQ9[+}Vt:5m"P>YRS/lhǦ:IQд>@} ^ۂ'Ajp'UNH{zϋh:U@$|/TZ 1'lOgRw)r \52Wc4@bK|V1%\p|/]nWG7wQZ@Qn$Jߍvdf.|b"BJyv04)0о l2]tM"a9C JCA㣡Li2ȠGQ9G_ L۠p,1[K"XU34+Bp01|rR0I!r?n)W~9Rq/eWz._yws0CgG#{s̡t_U 6>|*# hB)Q;5֣QK6ȓz)+u&_:vsx;|9`aX2endstream endobj 372 0 obj 1638 endobj 377 0 obj <> stream xZK6ϯ1x?R]+\sʁ#Q3\K☤2 hGMˇq~Qf 7g?ooA˙#Ns{~fΌD)3|\.滷wb EJwo?w_%ՍL Ng&;;kʛQCͤJL;,ceo!`lPJ.^f ?SJ#ic,MUII 8C8! c&>E`4jT2 Ԝ9PWBjc(*j(B9R !Y' Eu|>:cGj1H6w .P޶ZQN¸Dj;Q 4;)\{2VqwMU0N=L _ [vwuu0^tbBaUN \#&y"+(xR.{Cdz|ܿ҃ly4ԥBc4[ޯE!| i>+qX~7ѱqıΗn])uZ052mQtx>)j9Txb朎^M 3I C UV-U(qErA3-,A(HMZ>;@Z1R}Z\͌2}ޔMpH<&D*ME jsT}uM tj`_%jZѶ ,Vc]+чNP h@w  /4&=_| *DZ05 NX !(',dD )\WҥGIyZS{Jyjn*ZdcȄۇz^q *cZTsJ.u Is$!I m.hQG=Rb5VA Ď6DSlz"Bmۮ, 9퀜wD< FE/8s%1VhU3~Sli]7-X4ba{8N,oC#Ή2LrX g93U(Tp HRAngO- (e:B}:n >Iq2_u (H I\}OrՅn 89HaK' {JEsheB=hߩy6FDL+DM|Fj8ɗ(/󷇓I/ 8f0UY^SOMAƤ$J}S-cKe_YQGc\QQIE>PO2j=qHEL4JN\~%Jc֤.k~kc^I! LJ<3jΗ>_asBgzCS^%>zl3fq-Os`lűXK OjBx8Î2lNe%tl-I7/zIAww!{FiT'p~z_yPQR8&#r)20m|v]!}1F{9:a-+'9,?);,?3d^FFD*}>A/?}ErXZK1_Ko“,THxN pu~Ix}Ao=ic]V)*ah@heVEML}致E4,grEwGJ6]I{endstream endobj 378 0 obj 2695 endobj 393 0 obj <> stream xZn Q_12`u~ /5ב$f9|} )_4Z TթSiE [Q'ޞ}:bóz쯗ZqÿW7g l'T(eVW۳s.^\Zu(]J NWP+nθvl3+g CV2f%#ͬ(BFۨ 5xjsv^%Z.P'^P.uWU-ы[X%O)6[5\NՀ`dLcXtm Tpn hqJt&ι,xNW (3ł!sQm1pb%'ۛo5 uѸ{ >YϹ#W}\EMW]y9",K08|gD!9۴ǰ&#t}_n ƱOq{*3 cj*ҋ}N^J?w ҳr&u!,A}vGëh%%wm.7sMMR4YR}` ݔVM9.5ݥS~wB̂Y^v6e.mP:Z4D֦?G[AW ;eVʺr.-im0[A*˴y"AQ pÈ/2ѡ6xEsܥYt<O7?21PG9C4B+司]+3ifyS:Ӆt]ncx_<tJrmM`cɁ)+ qaMڈф6ѡJ!05g +e4clXakj_EBHsD+r.;C:"jdUF*xc#=GD@M5=DX]Whf6Y:htB4A ̬@n6w$3pxybF=YnWe(MeZW:Ľ"FQB0 d\B8 1}ya)DXL=f_P'~H&,fԺmjSv'@e@䀬懦qjʕȌUs_M 4 ,lԺT,AӚGJ@Rtv9 V~}9ɚliM^d1<ātˏK+[:kޅWTѫ& iMbP˵Epαs2P 9ƖcR!@8fYU]b*_z U3$,<)K,NRLw!=k,1ؙs؊O"puBdq_ e``O嫮$4Bχwz`3؊ ~$Hv.PG;wl QHto“JkVa8Vɜq'y`A?"{#N9-:5p[8m`ݺ;D;E'{#бaW7܋it}^}Op0,Rëav_@7kCJ*-6N:Ql>=8_VRW8m.A qFhlS4O#WKuW<=sQtpX! J>4W6yhl徫JIl&+Snp_GMc/0>e%ws Mb-4>G#HmItUݓ|8]/8|L5v(|Œ/b7Ź琏ZG>݇%0ϱ|y6--ǯ|pW1UGs?飕x3Y|v!%:^kǎV4] NZd"E :d9x2{AtZ#AoPY3 5hPt.>qF;y诠;Yv')y %&"s1NUjB@ccfX±lQ_bI WN@p6$3T?h9dl4Q<)IHc[tǧB(ȿU@ZD5حρYpv8O;Jt\_@\Y} %VsQb(`{8P@ _7Er8Fv)?4.CEr/TIAƵyU;Є:zi)h1vԽWEU(Gb3&2)t-|y"`/opn__}.xh (6xaG?7:endstream endobj 394 0 obj 3069 endobj 412 0 obj <> stream xZoB}Kx!8$uܢ@J-^)Q&,wwh]{+ڝfV J؂{xxXY.r{F˅#Ns}{w>.D)^Ok]_|׷nnsNgL*yZwQ8kӅ."7YэNUIzI1  *]Q tq =k`g*X”v{W X?'XfE2Kժ &pI4eq"._5>fDXKߑ&F ~+ JIZpߖjzx'A^jWUCTۖ]ff4nw&J,٣Y˪hmǶYu7.1;p%KbڤLdXez`)_ewj+3if,A'/\+X^LΤ8 w,+8.P2k5 j.<'%$,Kѐn/%ʉa%Y$l!( n_?.Iힱ6jd"[">_,4|lu4 la.&t˲m2fzQHjӛj"<%)H! qB'Pz1a6 ىϗ) ,NmAHkPҴEf)[/b:U3:S8KƛQAK CLS(|Žs9#q?;ҡo~+&m27R[7edtwM`|Gݵáb@}L%z;,0eLjryCH.`܇I#YW 90Juf(QOak_ArfnFlb Iބ>z5깋f6uv?soW;_VXKj;qr4֤벨.8X((Dpܼ) wFnur]gN6q H} vS>'t/b?Znm~(l\cn]fN`#R2uf9#v~4 P2Bd/v1sX6KPCiEihT$bFQlD#XW]hO% PRآ<[IHV"q ;._+S.Z!t2 NL%Hʳ]!n ` (ETu/+裹'd93iO&\sۄF dj`lj@|8gc-(qFڭ.@> stream xXnFڝ~tITGȆhD$;O"HhsϜ{f2H/wqcc^ggIs}? a20Be O,^`Z0gJqFqFgMKI[%ĭۢK18 f'o]YWRB-%H*o ;(Cb!cm]#Ř UݹQq_0yeG hB\SFŦw6gwVOoԒH4ْJĉOOE!-̿i[Op!ANp>`N/H@iBF^_2 "'y a '%)M"@u1ItCK| &Gfn$PWۼ̰bb_ģO*X#C1΍ c$@tHQu+eH>zW\) 7喂Zwo qplu[ f&&R_%`lFޯ;n)a 2{BS'sdf Ac$L-|sLJ!d?0+@.ajU~燳&/>phMӐI@F}ȉbݱ t˜M}8&TV3N!LzeTMͻN27ȸ ~P JsTzxr9毃coZpٔRzfM'qMG8ELȩ;2c|M̘Alu+"$=G6A'CN* ~M,*YS@“Af5FS 0Y4>u]&} ށ,>T]4>0e ũi\y_Ρ`.߄$ty<`]+J1@K<ۗܥ%pv}"` *UKwV[OwA?&42#VEQ>XKr)GUi2`BXXR|rT7Jš2q- &60evErKHh FvAGD'XYwwb 7Ԫ"^0=p`oɞ<9z*>zsw8hL`Hendstream endobj 424 0 obj 1792 endobj 428 0 obj <> stream x50 DwDzI\2B-B%2H '-䐫V2,ͦ'%601)-C#7xQ_r{@]7ʣ#瓮Aʜ'u羻W˃bJ9/\(oendstream endobj 429 0 obj 144 endobj 432 0 obj <> stream xX]oF}ϯ[ɞ2 }#6i wj8 x^<;4ZEJas;DAx? ؟ar\FdwE_H!$ us>ɟ֭ i_i*;XG{4E bt:emW4jи9Q5dZ&1i6]V~ bv"3|6,gXl}218ٳ b֫;Nelz!uliYd!Kh#C5~<*Ј-E}$d1uw㶇k,jׇ:VXV0vBP o^,0lQv K܎DWVD+mb({DUdiv'8q!yʼnWn{s7݇. 5Cu~"&2Td)< (b8*A `yyz} 2Uˏ=&C4E3eo}"E-LTjU٦xOC5Khض"ҧLD*jڭ abD9-d%c-fun#Ŷxe Su7yi𘧔bcNQ`j(*[*6zk&Bw^Y==Uɶ]Y4 `쪌]i VbM.iJqsz|i8Ah"d&mΈ7.]^d_Y<ˀF A2$?h6K TYŝtvss# Tzڧ n4moVZW!e,#z9R0* S>߆NP+X6pTOj.;GË7/&Q6`HKU)@ L'w Oi\snh-J7]'^mjԌbr9|FNeiF5 tip=TNÛ j؈7/ WAk"c9U,ki-+S ~hcP6Wi$$ᦻoijt o \M7+*g ;f=E$_XPM|ŢV^<΍ o~D$"yĉ7{ qV*BaI]&2uEׂPij]#}ҕ IWC8dFB }F:XXqD4a;$ӹ*;b_R WQ[oQ:R?WwLD"KXџ=:;{v ^> stream xXM6W9m5+<2f* I> {H#Q&A PxZߣ$Q<ח(ח`w"jR)<[Du4&y^FewV߻HMS`ݱa(79%U]_ߐi,H2fTka2uΔuN4\g׮QZQF8HUϟoo, VSd1-rdIؓ T=9d ul4XV'2mA4ΗVf^Pd$+6\`O„fҀϼ&I+Mhr%ӘQOge~ y;Z=#?NмX?1Z<"2-WP'e)> stream xYrG}GsͦXJ "r>$Mf@o[*]t>}aB PG&~ɳ룓7ZNqQxM 31z}􄻟 o83kc*yxt8l&׋'ϪU,7qM8s),cیp'Sň7><ˤXr\ί.NfIp) 礚$dy}lEW5)QuhprYHKͪWJxuMztͪH㍋r?N w4 v˸RWڮ\^k%+7dr}M*^Ǐod&{I@ K6'T$wZmcmBe1[xbd#PFP%`x`ZbhuFKFbgt]@6SJϫe2y@#KV/6y3pQcL"Sɚ6!iԐ"fN Qcvj! i6l.",:v,iBC߼)?lpTr]]gȽ%zr[-UU$%i#IDdɀ#f+L:wIu D t: 1OC^Qq.z1轌#s8u߬u<hR@"2H<Ki 1tq+${N" n<]DBgz6 <{1[h*>we2BY:`Mp"d^ R,z/c$tϜ@U⥏!9$ӢZ%4n%zi?\C@)*"v@yI9'[/ u ywآjMu]%+ŇW3.@j%,$!TQ V6CUlL5䜤{ Vнt`c,c: M/+:y\@flڶ"IA3:OC V᥃Ιm TSMpEB^C1//~  -l 6(Q` %?=7Q! %yd(^R|iw{eԙR5!BBC89øԆ~6*5 $r`GMpD@$S߁ACm]/Q:%v$d_59K[]>\q^[yU!"VgȺR9˧}00ʇwb`?h}cwv V|#8}c_=ƾC#qVE>(֪ OA.]vl0θ!}=4?*1UYߏ"\@߈l~ [qq #yM);͌8;b 8*a*c#F O%|wU(HQcC ȬwEV{X6&xxps7ʰR]UU(=T &a/_DBrg34Vb:NYpz^57@&FsVm!\ n.hŰƽ~yj4I!\T$B$Q}>DQdžm[d8OhU+ ?>Ann;J8yA T#1777VR V`cp2iod6=ae2_ J`'?nozHu:t^UMXM~*$q?3K ~I/뷑3(WyHCAp *mpD*,?4iٝY>5ԌBJAbnޔendstream endobj 442 0 obj 2543 endobj 4 0 obj <> /Annots[72 0 R 73 0 R 76 0 R]/Contents 48 0 R >> endobj 79 0 obj <> /Contents 80 0 R >> endobj 83 0 obj <> /Contents 84 0 R >> endobj 90 0 obj <> /Contents 91 0 R >> endobj 94 0 obj <> /Annots[98 0 R 99 0 R 100 0 R 101 0 R 102 0 R 103 0 R 104 0 R 105 0 R 106 0 R 107 0 R 108 0 R 109 0 R 110 0 R 111 0 R 112 0 R 113 0 R 114 0 R 115 0 R 116 0 R 117 0 R 118 0 R 119 0 R 120 0 R 121 0 R 122 0 R 123 0 R 124 0 R 125 0 R 126 0 R 127 0 R 128 0 R 129 0 R 130 0 R 131 0 R]/Contents 95 0 R >> endobj 133 0 obj <> /Annots[136 0 R 137 0 R 138 0 R 139 0 R 140 0 R 141 0 R]/Contents 134 0 R >> endobj 143 0 obj <> /Annots[146 0 R 148 0 R 149 0 R]/Contents 144 0 R >> endobj 151 0 obj <> /Contents 152 0 R >> endobj 155 0 obj <> /Annots[160 0 R 161 0 R 162 0 R 163 0 R 164 0 R 165 0 R 166 0 R 167 0 R 168 0 R 169 0 R 170 0 R]/Contents 156 0 R >> endobj 172 0 obj <> /Annots[175 0 R 179 0 R 180 0 R 181 0 R 182 0 R 183 0 R]/Contents 173 0 R >> endobj 185 0 obj <> /Annots[188 0 R 189 0 R 190 0 R 191 0 R]/Contents 186 0 R >> endobj 193 0 obj <> /Annots[196 0 R 197 0 R 198 0 R]/Contents 194 0 R >> endobj 200 0 obj <> /Annots[203 0 R 204 0 R 205 0 R 206 0 R 207 0 R 208 0 R 209 0 R 210 0 R 211 0 R 212 0 R 213 0 R 214 0 R]/Contents 201 0 R >> endobj 216 0 obj <> /Annots[219 0 R 220 0 R 221 0 R 222 0 R 223 0 R 224 0 R 225 0 R 226 0 R 227 0 R 228 0 R 229 0 R 230 0 R 231 0 R 232 0 R 233 0 R 234 0 R 235 0 R]/Contents 217 0 R >> endobj 237 0 obj <> /Annots[240 0 R 241 0 R 242 0 R 243 0 R]/Contents 238 0 R >> endobj 245 0 obj <> /Contents 246 0 R >> endobj 249 0 obj <> /Annots[252 0 R]/Contents 250 0 R >> endobj 255 0 obj <> /Annots[258 0 R 259 0 R]/Contents 256 0 R >> endobj 261 0 obj <> /Annots[265 0 R 267 0 R]/Contents 262 0 R >> endobj 277 0 obj <> /Annots[281 0 R 282 0 R 283 0 R 284 0 R]/Contents 278 0 R >> endobj 286 0 obj <> /Annots[289 0 R 290 0 R 291 0 R 292 0 R 293 0 R 294 0 R 295 0 R 296 0 R 297 0 R 298 0 R 299 0 R 300 0 R]/Contents 287 0 R >> endobj 302 0 obj <> /Contents 303 0 R >> endobj 306 0 obj <> /Annots[309 0 R 310 0 R 311 0 R]/Contents 307 0 R >> endobj 313 0 obj <> /Annots[316 0 R 317 0 R 318 0 R 319 0 R 320 0 R 321 0 R 322 0 R 323 0 R 324 0 R 325 0 R 326 0 R 327 0 R 328 0 R 329 0 R 330 0 R]/Contents 314 0 R >> endobj 332 0 obj <> /Annots[335 0 R 336 0 R 337 0 R 338 0 R 339 0 R 340 0 R 341 0 R 342 0 R 343 0 R 344 0 R 345 0 R]/Contents 333 0 R >> endobj 347 0 obj <> /Annots[350 0 R 351 0 R 352 0 R 353 0 R 354 0 R 355 0 R 356 0 R 357 0 R 358 0 R]/Contents 348 0 R >> endobj 360 0 obj <> /Annots[363 0 R 364 0 R]/Contents 361 0 R >> endobj 366 0 obj <> /Contents 367 0 R >> endobj 370 0 obj <> /Annots[373 0 R 374 0 R]/Contents 371 0 R >> endobj 376 0 obj <> /Annots[379 0 R 380 0 R 381 0 R 382 0 R 383 0 R 384 0 R 385 0 R 386 0 R 387 0 R 388 0 R 389 0 R 390 0 R]/Contents 377 0 R >> endobj 392 0 obj <> /Annots[395 0 R 396 0 R 400 0 R 401 0 R 402 0 R 403 0 R 404 0 R 405 0 R 406 0 R 407 0 R 408 0 R 409 0 R]/Contents 393 0 R >> endobj 411 0 obj <> /Annots[414 0 R 415 0 R 416 0 R 417 0 R 418 0 R 419 0 R 420 0 R]/Contents 412 0 R >> endobj 422 0 obj <> /Annots[425 0 R]/Contents 423 0 R >> endobj 427 0 obj <> /Contents 428 0 R >> endobj 431 0 obj <> /Contents 432 0 R >> endobj 436 0 obj <> /Contents 437 0 R >> endobj 440 0 obj <> /Annots[443 0 R 444 0 R 445 0 R]/Contents 441 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R 79 0 R 83 0 R 90 0 R 94 0 R 133 0 R 143 0 R 151 0 R 155 0 R 172 0 R 185 0 R 193 0 R 200 0 R 216 0 R 237 0 R 245 0 R 249 0 R 255 0 R 261 0 R 277 0 R 286 0 R 302 0 R 306 0 R 313 0 R 332 0 R 347 0 R 360 0 R 366 0 R 370 0 R 376 0 R 392 0 R 411 0 R 422 0 R 427 0 R 431 0 R 436 0 R 440 0 R ] /Count 37 >> endobj 6 0 obj << /Count 6 /First 7 0 R /Last 46 0 R >> endobj 1 0 obj <> >> endobj 8 0 obj << /Title(1.1 Motivation Behind JasPer) /Dest/section.1.1 /Parent 7 0 R /Next 9 0 R >> endobj 9 0 obj << /Title(1.2 What is JasPer?) /Dest/section.1.2 /Parent 7 0 R /Prev 8 0 R /Next 10 0 R >> endobj 10 0 obj << /Title(1.3 Software License) /Dest/section.1.3 /Parent 7 0 R /Prev 9 0 R /Next 11 0 R >> endobj 11 0 obj << /Title(1.4 Other Sources of Information on JasPer) /Dest/section.1.4 /Parent 7 0 R /Prev 10 0 R /Next 12 0 R >> endobj 12 0 obj << /Title(1.5 Origin of the Name) /Dest/section.1.5 /Parent 7 0 R /Prev 11 0 R >> endobj 7 0 obj << /Title(1 Introduction) /Dest/chapter.1 /Count -5 /Parent 6 0 R /Next 13 0 R /First 8 0 R /Last 12 0 R >> endobj 14 0 obj << /Title(2.1 Version Identification) /Dest/section.2.1 /Parent 13 0 R /Next 15 0 R >> endobj 15 0 obj << /Title(2.2 Obtaining the Software) /Dest/section.2.2 /Parent 13 0 R /Prev 14 0 R /Next 16 0 R >> endobj 16 0 obj << /Title(2.3 Extracting the Software) /Dest/section.2.3 /Parent 13 0 R /Prev 15 0 R /Next 17 0 R >> endobj 18 0 obj << /Title(2.4.1 Build Process for UNIX \(or UNIX-Like\) Systems) /Dest/subsection.2.4.1 /Parent 17 0 R /Next 19 0 R >> endobj 19 0 obj << /Title(2.4.2 Build Process for Microsoft Visual C Studio under Microsoft Windows) /Dest/subsection.2.4.2 /Parent 17 0 R /Prev 18 0 R /Next 20 0 R >> endobj 20 0 obj << /Title(2.4.3 Dependencies on Other Software) /Dest/subsection.2.4.3 /Parent 17 0 R /Prev 19 0 R >> endobj 17 0 obj << /Title(2.4 Building the Software) /Dest/section.2.4 /Count -3 /Parent 13 0 R /Prev 16 0 R /Next 21 0 R /First 18 0 R /Last 20 0 R >> endobj 21 0 obj << /Title(2.5 Reporting Bugs) /Dest/section.2.5 /Parent 13 0 R /Prev 17 0 R >> endobj 13 0 obj << /Title(2 JasPer Software) /Dest/chapter.2 /Count -5 /Parent 6 0 R /Prev 7 0 R /Next 22 0 R /First 14 0 R /Last 21 0 R >> endobj 23 0 obj << /Title(3.1 Introduction) /Dest/section.3.1 /Parent 22 0 R /Next 24 0 R >> endobj 24 0 obj << /Title(3.2 Core Code) /Dest/section.3.2 /Parent 22 0 R /Prev 23 0 R /Next 25 0 R >> endobj 25 0 obj << /Title(3.3 Codec Drivers) /Dest/section.3.3 /Parent 22 0 R /Prev 24 0 R /Next 26 0 R >> endobj 26 0 obj << /Title(3.4 Image Model) /Dest/section.3.4 /Parent 22 0 R /Prev 25 0 R /Next 27 0 R >> endobj 27 0 obj << /Title(3.5 JasPer Header Files) /Dest/section.3.5 /Parent 22 0 R /Prev 26 0 R /Next 28 0 R >> endobj 28 0 obj << /Title(3.6 Initializing the Library) /Dest/section.3.6 /Parent 22 0 R /Prev 27 0 R /Next 29 0 R >> endobj 29 0 obj << /Title(3.7 Memory Allocation) /Dest/section.3.7 /Parent 22 0 R /Prev 28 0 R /Next 30 0 R >> endobj 30 0 obj << /Title(3.8 Adding Support for a New Image Format) /Dest/section.3.8 /Parent 22 0 R /Prev 29 0 R >> endobj 22 0 obj << /Title(3 JasPer Library) /Dest/chapter.3 /Count -8 /Parent 6 0 R /Prev 13 0 R /Next 31 0 R /First 23 0 R /Last 30 0 R >> endobj 32 0 obj << /Title(4.1 Introduction) /Dest/section.4.1 /Parent 31 0 R /Next 33 0 R >> endobj 33 0 obj << /Title(4.2 The jasper Command) /Dest/section.4.2 /Parent 31 0 R /Prev 32 0 R /Next 34 0 R >> endobj 34 0 obj << /Title(4.3 The imgcmp Command) /Dest/section.4.3 /Parent 31 0 R /Prev 33 0 R /Next 35 0 R >> endobj 35 0 obj << /Title(4.4 The imginfo Command) /Dest/section.4.4 /Parent 31 0 R /Prev 34 0 R /Next 36 0 R >> endobj 36 0 obj << /Title(4.5 The jiv Command) /Dest/section.4.5 /Parent 31 0 R /Prev 35 0 R >> endobj 31 0 obj << /Title(4 Application Programs) /Dest/chapter.4 /Count -5 /Parent 6 0 R /Prev 22 0 R /Next 37 0 R /First 32 0 R /Last 36 0 R >> endobj 39 0 obj << /Title(5.0.2 JP2 Codec) /Dest/subsection.5.0.2 /Parent 38 0 R /Next 40 0 R >> endobj 40 0 obj << /Title(5.0.3 JPC Codec) /Dest/subsection.5.0.3 /Parent 38 0 R /Prev 39 0 R /Next 41 0 R >> endobj 41 0 obj << /Title(5.0.4 JPG Codec) /Dest/subsection.5.0.4 /Parent 38 0 R /Prev 40 0 R /Next 42 0 R >> endobj 42 0 obj << /Title(5.0.5 PGX Codec) /Dest/subsection.5.0.5 /Parent 38 0 R /Prev 41 0 R /Next 43 0 R >> endobj 43 0 obj << /Title(5.0.6 MIF Codec) /Dest/subsection.5.0.6 /Parent 38 0 R /Prev 42 0 R /Next 44 0 R >> endobj 44 0 obj << /Title(5.0.7 PNM Codec) /Dest/subsection.5.0.7 /Parent 38 0 R /Prev 43 0 R /Next 45 0 R >> endobj 45 0 obj << /Title(5.0.8 RAS Codec) /Dest/subsection.5.0.8 /Parent 38 0 R /Prev 44 0 R >> endobj 38 0 obj << /Title(5.0.1 BMP Codec) /Dest/subsection.5.0.1 /Count -7 /Parent 37 0 R /First 39 0 R /Last 45 0 R >> endobj 37 0 obj << /Title(5 Codecs) /Dest/chapter.5 /Count -1 /Parent 6 0 R /Prev 31 0 R /Next 46 0 R /First 38 0 R /Last 38 0 R >> endobj 47 0 obj <> endobj 72 0 obj <> /Subtype/Link>>endobj 73 0 obj <> /Subtype/Link>>endobj 76 0 obj <> /Subtype/Link>>endobj 77 0 obj <> endobj 78 0 obj <> endobj 82 0 obj <> endobj 86 0 obj <>stream AdobedC  $, !$4.763.22:ASF:=N>22HbINVX]^]8EfmeZlS[]YC**Y;2;YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( Ǿ%ඔ͜3{횩 wif$=oN*aJRMkiy\)+j:՚HdB~5xVatEI~s'oQEPQEQEQEQEQEQEQEQEQEQEU-bU̹`BRA<X*љ6uL촞p\:k|o)l1RO ircrjhWXiNӾ6%һN1^MvI H9銹mskКW*^.A *X֌aER((((((({y O;mA}X*/?wP''̟$kcRq~z ^3}q]ɉ*IJtW֮™> gRQbzUI%Pp ?fW=sIm}()2 Z$-P5&8a8\~*6ˋrN$'չgH挕|ʑEJ׍6P A{M3&K8Xi^F*Ӫ#ycCTXXa9evwu I>ԅjdf7'|*jΆȶpĨ`IG27F'PGҲ\5q @z`sRW+CЍkGu,ŸZM ^+VdY (Q@Q@Q@]M{YۻF|gyK rH\j5-"0?R+Ϊ&˸W*A!yRL>s6bUv0ѥ݃5yRZ65RM^jr\dB  |˭tj4sҩJ).Co 5'8EfAF660NP@[zqEI$ Yyv r@.֠!)f3JZd\XB8p؁ȦkvH2s'W'eN;w:ry9Sp:ou;m:W=vQsG2JdYӁW58k wRP* "yt袕7ox iۦ=}W]v+p%dI)':jZ( 7Fn&@ :А3Ph 88| mYy61gj5im>so! pq."h "X'z)Õ+D:B%eҦI;(p$wL3n.wm UaNN{u+9N<gYEsph' x/gT+2Ϧ+9RwArQY+7Uд_ yUJYAulV|>i4"HÜAʒ,gRO֊V"zV$6@BXckZ\ZƞFswWxWY,d!{sD׫ripc`9 gڨ`Q`3,,gZcdsA]- iyn\6>\*{KY.cCQު3q|K+1GXAnRJȬ ![gHPtBI=}>j _NcOKai1F7;ʣԐk%ݧC1^޵%/ G8.)\rVJF*uzkNxz|e۫i})tW7\/r ѿ?Uyq-Iw9i WI~\RNqjQl¿CU&hP@/xGԗD4'=4:F'aO0^B<3[N|Rh̰\1hOokYѬ$iid9wY W>*X+((((((~r# X1; p2q#pyWSdD6EWFYXdz)X" jQ.u`N8z& T 53t#5$qq( Nr4/\z XnםMrNj ?PTI;I[tlRlX*uĝO5ه-툏֢%R)tcŚ  =T|}GoGҩ^^ r!bzsS3U+ynmif;q~$7_ק貤5rJp0PkѼ #Sy`1-lLǎ kM6if6DG^yS`<;aEM 麤F (Q@d;qXQ'nT l9foo kIF$1c á;qZ"*(Š((((((((((( =s41Gp{{k ̌#Mz4d RZ8`yǷ~umm5WME0 (? endstream endobj 88 0 obj <> endobj 89 0 obj <> endobj 93 0 obj <> endobj 98 0 obj <>endobj 99 0 obj <>endobj 100 0 obj <>endobj 101 0 obj <>endobj 102 0 obj <>endobj 103 0 obj <>endobj 104 0 obj <>endobj 105 0 obj <>endobj 106 0 obj <>endobj 107 0 obj <>endobj 108 0 obj <>endobj 109 0 obj <>endobj 110 0 obj <>endobj 111 0 obj <>endobj 112 0 obj <>endobj 113 0 obj <>endobj 114 0 obj <>endobj 115 0 obj <>endobj 116 0 obj <>endobj 117 0 obj <>endobj 118 0 obj <>endobj 119 0 obj <>endobj 120 0 obj <>endobj 121 0 obj <>endobj 122 0 obj <>endobj 123 0 obj <>endobj 124 0 obj <>endobj 125 0 obj <>endobj 126 0 obj <>endobj 127 0 obj <>endobj 128 0 obj <>endobj 129 0 obj <>endobj 130 0 obj <>endobj 131 0 obj <>endobj 132 0 obj <> endobj 136 0 obj <>endobj 137 0 obj <>endobj 138 0 obj <>endobj 139 0 obj <>endobj 140 0 obj <>endobj 141 0 obj <>endobj 142 0 obj <> endobj 146 0 obj <>endobj 148 0 obj <>endobj 149 0 obj <>endobj 150 0 obj <> endobj 154 0 obj <> endobj 160 0 obj <>endobj 161 0 obj <>endobj 162 0 obj <>endobj 163 0 obj <>endobj 164 0 obj <>endobj 165 0 obj <>endobj 166 0 obj <>endobj 167 0 obj <>endobj 168 0 obj <>endobj 169 0 obj <>endobj 170 0 obj <>endobj 171 0 obj <> endobj 175 0 obj <>endobj 179 0 obj <> /Subtype/Link>>endobj 180 0 obj <> /Subtype/Link>>endobj 181 0 obj <> /Subtype/Link>>endobj 182 0 obj <>endobj 183 0 obj <>endobj 184 0 obj <> endobj 188 0 obj <> /Subtype/Link>>endobj 189 0 obj <> /Subtype/Link>>endobj 190 0 obj <> /Subtype/Link>>endobj 191 0 obj <> /Subtype/Link>>endobj 192 0 obj <> endobj 196 0 obj <>endobj 197 0 obj <>endobj 198 0 obj <> /Subtype/Link>>endobj 199 0 obj <> endobj 203 0 obj <> /Subtype/Link>>endobj 204 0 obj <> /Subtype/Link>>endobj 205 0 obj <> /Subtype/Link>>endobj 206 0 obj <> /Subtype/Link>>endobj 207 0 obj <> /Subtype/Link>>endobj 208 0 obj <> /Subtype/Link>>endobj 209 0 obj <> /Subtype/Link>>endobj 210 0 obj <> /Subtype/Link>>endobj 211 0 obj <> /Subtype/Link>>endobj 212 0 obj <> /Subtype/Link>>endobj 213 0 obj <> /Subtype/Link>>endobj 214 0 obj <> /Subtype/Link>>endobj 215 0 obj <> endobj 219 0 obj <> /Subtype/Link>>endobj 220 0 obj <> /Subtype/Link>>endobj 221 0 obj <> /Subtype/Link>>endobj 222 0 obj <> /Subtype/Link>>endobj 223 0 obj <> /Subtype/Link>>endobj 224 0 obj <> /Subtype/Link>>endobj 225 0 obj <> /Subtype/Link>>endobj 226 0 obj <> /Subtype/Link>>endobj 227 0 obj <> /Subtype/Link>>endobj 228 0 obj <> /Subtype/Link>>endobj 229 0 obj <> /Subtype/Link>>endobj 230 0 obj <> /Subtype/Link>>endobj 231 0 obj <> /Subtype/Link>>endobj 232 0 obj <> /Subtype/Link>>endobj 233 0 obj <> /Subtype/Link>>endobj 234 0 obj <> /Subtype/Link>>endobj 235 0 obj <> /Subtype/Link>>endobj 236 0 obj <> endobj 240 0 obj <> /Subtype/Link>>endobj 241 0 obj <> /Subtype/Link>>endobj 242 0 obj <> /Subtype/Link>>endobj 243 0 obj <> /Subtype/Link>>endobj 244 0 obj <> endobj 248 0 obj <> endobj 252 0 obj <>endobj 254 0 obj <> endobj 258 0 obj <>endobj 259 0 obj <>endobj 260 0 obj <> endobj 265 0 obj <>endobj 267 0 obj <>endobj 276 0 obj <> endobj 281 0 obj <>endobj 282 0 obj <> /Subtype/Link>>endobj 283 0 obj <)>> /Subtype/Link>>endobj 284 0 obj <> /Subtype/Link>>endobj 285 0 obj <> endobj 289 0 obj <> /Subtype/Link>>endobj 290 0 obj <> /Subtype/Link>>endobj 291 0 obj <> /Subtype/Link>>endobj 292 0 obj <> /Subtype/Link>>endobj 293 0 obj <> /Subtype/Link>>endobj 294 0 obj <> /Subtype/Link>>endobj 295 0 obj <> /Subtype/Link>>endobj 296 0 obj <> /Subtype/Link>>endobj 297 0 obj <> /Subtype/Link>>endobj 298 0 obj <> /Subtype/Link>>endobj 299 0 obj <> /Subtype/Link>>endobj 300 0 obj <> /Subtype/Link>>endobj 301 0 obj <> endobj 305 0 obj <> endobj 309 0 obj <> /Subtype/Link>>endobj 310 0 obj <> /Subtype/Link>>endobj 311 0 obj <> /Subtype/Link>>endobj 312 0 obj <> endobj 316 0 obj <> /Subtype/Link>>endobj 317 0 obj <> /Subtype/Link>>endobj 318 0 obj <> /Subtype/Link>>endobj 319 0 obj <> /Subtype/Link>>endobj 320 0 obj <> /Subtype/Link>>endobj 321 0 obj <> /Subtype/Link>>endobj 322 0 obj <> /Subtype/Link>>endobj 323 0 obj <> /Subtype/Link>>endobj 324 0 obj <> /Subtype/Link>>endobj 325 0 obj <> /Subtype/Link>>endobj 326 0 obj <> /Subtype/Link>>endobj 327 0 obj <> /Subtype/Link>>endobj 328 0 obj <> /Subtype/Link>>endobj 329 0 obj <> /Subtype/Link>>endobj 330 0 obj <> /Subtype/Link>>endobj 331 0 obj <> endobj 335 0 obj <> /Subtype/Link>>endobj 336 0 obj <> /Subtype/Link>>endobj 337 0 obj <> /Subtype/Link>>endobj 338 0 obj <> /Subtype/Link>>endobj 339 0 obj <> /Subtype/Link>>endobj 340 0 obj <> /Subtype/Link>>endobj 341 0 obj <> /Subtype/Link>>endobj 342 0 obj <> /Subtype/Link>>endobj 343 0 obj <> /Subtype/Link>>endobj 344 0 obj <> /Subtype/Link>>endobj 345 0 obj <> /Subtype/Link>>endobj 346 0 obj <> endobj 350 0 obj <> /Subtype/Link>>endobj 351 0 obj <> /Subtype/Link>>endobj 352 0 obj <> /Subtype/Link>>endobj 353 0 obj <> /Subtype/Link>>endobj 354 0 obj <> /Subtype/Link>>endobj 355 0 obj <> /Subtype/Link>>endobj 356 0 obj <> /Subtype/Link>>endobj 357 0 obj <> /Subtype/Link>>endobj 358 0 obj <> /Subtype/Link>>endobj 359 0 obj <> endobj 363 0 obj <> /Subtype/Link>>endobj 364 0 obj <> /Subtype/Link>>endobj 365 0 obj <> endobj 369 0 obj <> endobj 373 0 obj <>endobj 374 0 obj <>endobj 375 0 obj <> endobj 379 0 obj <>endobj 380 0 obj <> /Subtype/Link>>endobj 381 0 obj <> /Subtype/Link>>endobj 382 0 obj <> /Subtype/Link>>endobj 383 0 obj <> /Subtype/Link>>endobj 384 0 obj <> /Subtype/Link>>endobj 385 0 obj <> /Subtype/Link>>endobj 386 0 obj <> /Subtype/Link>>endobj 387 0 obj <> /Subtype/Link>>endobj 388 0 obj <> /Subtype/Link>>endobj 389 0 obj <> /Subtype/Link>>endobj 390 0 obj <> /Subtype/Link>>endobj 391 0 obj <> endobj 395 0 obj <> /Subtype/Link>>endobj 396 0 obj <> /Subtype/Link>>endobj 400 0 obj <> /Subtype/Link>>endobj 401 0 obj <> /Subtype/Link>>endobj 402 0 obj <>endobj 403 0 obj <> /Subtype/Link>>endobj 404 0 obj <> /Subtype/Link>>endobj 405 0 obj <> /Subtype/Link>>endobj 406 0 obj <> /Subtype/Link>>endobj 407 0 obj <> /Subtype/Link>>endobj 408 0 obj <> /Subtype/Link>>endobj 409 0 obj <> /Subtype/Link>>endobj 410 0 obj <> endobj 414 0 obj <> /Subtype/Link>>endobj 415 0 obj <> /Subtype/Link>>endobj 416 0 obj <> /Subtype/Link>>endobj 417 0 obj <> /Subtype/Link>>endobj 418 0 obj <>endobj 419 0 obj <> /Subtype/Link>>endobj 420 0 obj <> /Subtype/Link>>endobj 421 0 obj <> endobj 425 0 obj <> /Subtype/Link>>endobj 426 0 obj <> endobj 430 0 obj <> endobj 435 0 obj <> endobj 439 0 obj <> endobj 443 0 obj <> /Subtype/Link>>endobj 444 0 obj <> /Subtype/Link>>endobj 445 0 obj <> /Subtype/Link>>endobj 446 0 obj <> endobj 51 0 obj <> endobj 50 0 obj <>stream xTkPS>!䜨-//eEVTt\Q "z)HD#DI$ .PYPDQQ2vm͸UZmWwΛG=ٙ7swy{%ؤSbc$)Ԋyrr4${{%&6|_ :6YqO  4D媴YjYM!ŝ.Vd3Y9ρ ejoFz,߭T*eYJ*;_&gȽǶ)3( *,8*D` ehe\+yexQ\9&9dѼ ‚프fPL*ZHSEj 5/MST5 |ԠgK8[X _(L[yf0hx2u/u/E.8E87baOz5[oEڷZihGbB*F&D_n7\|$< ;wgI9Ւ}8TT ȒAM}|f$|Bf&j |Ss|ѻ UqO\Gq 6{(vn[pԢwDJ;fδi,r԰לd^eʅȆT 3NcOs#I ( JL@[&]g,~Z i<0&3)QT$NrKU.攵r ШUmvF,7㈒cGz/3ZY:%k‡Ȋ]Mv9ĸ8UP B< _{vGy>*Bt{kuu52|PC[ٹ9ۋa lT;[zt~X> T$Fbߕ( *9[_4;Acת.=. 2s uծ@ 6A*#Lg#& -\ 2wgGMչ|+-rR S*rs}`r?]:Q}%+-Ms^Y µ쎎}ž|Ӑ47A?n[]Cߙ+]w?Jp|QJ]vB\=)_ ^'&:Z8Lc,-/tbm?UQZ#eEx S.r9N\-ƨ7DF&. #3s&W~C|Jig}c_*0Rd-Jq5;Ԟ0m*#!6cA^VE{> endobj 58 0 obj <>stream xRmL[UFK4 - %|:,L S0QVhʇvm{{)6FH5.YY~^x1j9GFQ2L[v>v!EԎ/< 0&S={r|BgKqK+!^)tt3E9hIZ9 D.vOߎ8a|x3-)Cʇ%2eT0!J[8&.h` FR.r817LĿ/ÿ-x07 \u\|*T2%5܃'> 1co1}ͦ tOhU]3#RaeE0H endstream endobj 448 0 obj 1033 endobj 54 0 obj <> endobj 53 0 obj <>stream xVkTgVNQ^ZUhP"@$*@7 !\+ŶVZCWuuv}gNv{vON7s{GxL!x<$,РBcU{g֪U wߛ1SbvۣAC"Bus|b=L,%vD8'""%< /Q'ƒp_?E1 ߏ#㚠K8G 1LZSԗ;ҿNJWs|좥\h0*D?a_; M[W8!O~46~M.Ebd̪?b 2.f#gi kt$F1+qxGhf n+4?9eI2Cd75oœ e9>7)7i7"qCkl'Uw'U%wTl6݋ϲr?]'s!{}gbq~VQHҷb\x1*mȯH+:vfk1)DŽ~V&QeB=hͩf p->"1C3w0&=3')8amq58a׷WHDj -!& /ɃD1dF^NANEl ;KK8wP|_wnpD[4fm6VY-8Pd4ı~luyN󺎣8NU`55lZ!uΐy}e Yqſ_1xgpݍjUec5mё^u csn] Pf.,p|ߑ>*ۗZgRL X> endobj 61 0 obj <>stream xV TSg~1$穀vHSkժL+ֺQP*n**[H6YIn%, ]tVWJm+mUt?sֶS999{s{ݏ9 |])L$ɗlKdon r r.ZNt,ۜg_gQsHՕǥ%cn Zh_xz{{}(Q-s$$8HZ"GGKb"#En$XwD'Ov_fKz.^#IK"rw òy8Ѧu щ1'%J0Z1' bMfVc;.怙fkli!8kzNtEvqѻCEJEK!o)B@FA%NNy>lYޔ $8p~07E/ 2A/:SZ CcLLKBj޷fW´}ﯾL͡5C/"KQg@'^r5znpFɗv==ٮZv.C@ LAc}&46 { \pNjEl]iiJ!6=9aGhDڛڝVg}Ŏnpr҉[Upz 1N`Ex"y5Vs+ b#/'#?&-_+rQץ#ZfEN\'A뭖ɨkMZ ] =-5pj 8ͽڻa{6 9| t\= "Ѥ]E!g+ aŮ>+R:ȷ:;=]h>|܈GU4]ƮoRJ;=zU_9"H3Æhs8vqo>d 3ғS,r !Z:mPЅOnSiXm3gKʞz̥U-#&ÅEF~*#ӫ =汎pnUK̐fJr R]*Hu;1d u{-@LƭQ&Diw_rRY]|CC}]=.ay/;Q?pد'%届HyIz\oOwIbK8 =YZ_{#ȴ ?]\i F|z?HԭoH#U5l'px&M鐦 'ǻ4Z˒eɲel+U['B\7񅴶H.iVMƘW@SգYlSEqK:@WWj".3ƭИ:Y=C]Bb*Mdh8C'p jHui|?g/o.юV0B{D]hrVӪiJq_[f qMHaɱCh04]C.˒]w ˴N~\8= "Cti~{Si;w#xz)=>iÐ'#S V{9Q Wl}5z~^4b?f6modQ8_c>)j·6ktvq /zTr( endstream endobj 450 0 obj 2837 endobj 272 0 obj <> endobj 271 0 obj <>stream xcd`ab`ddsv44f!CN軅wc ̌n>E% Κ Eɉy %%@NBp~rfjIcNBHGBPjqjQYj N܂Ғ"Ԣ<&k+^~]}C3WW -ڔU^_0pStst:fge74twvwpLh0rs2ver@tE⼼⼼+V,^BtOM6w4U\Xp.t endstream endobj 451 0 obj 315 endobj 177 0 obj <> endobj 176 0 obj <>stream xcd`ab`ddvv 44f!C׏%S[ ~7/_PYQᬩ`hiiZXX('gT)8(t+@t-(-I-ROI-c`h`gPDLL|?:/~>cqD?RhfwO.i\Xpn#O endstream endobj 452 0 obj 238 endobj 269 0 obj <> endobj 268 0 obj <>stream xU]HSq٧:;Q mrClpLy񈒮nuӅ}xSmWe{w]xYqH4p8NCԶ~j|պnr⠋ _~/.?'hZ%'9O)x )9L*ҠYzະ}w۞9/z>ŦZŲDMjE(4K2u*tMh *m=&`5Љ5XղQU+;.Ma¥-?me}M9f̖/m$[OPgxv#_B endstream endobj 453 0 obj 481 endobj 398 0 obj <> endobj 397 0 obj <>stream xcd`ab`dd r v 443Hf!C׏%s ~n,_PYQᬩ`hiiZXX('gT)8(t+@u-(-I-ROI-c`h`d`\Ȱ3s^w柚߫Dg?VVڊy3J_[`fr\,y87a`FrQ endstream endobj 454 0 obj 245 endobj 70 0 obj <> endobj 434 0 obj <> endobj 56 0 obj <> endobj 399 0 obj <> endobj 159 0 obj <> endobj 455 0 obj <> endobj 158 0 obj <> endobj 264 0 obj <> endobj 456 0 obj <> endobj 273 0 obj <> endobj 63 0 obj <> endobj 147 0 obj <> endobj 457 0 obj <> endobj 97 0 obj <> endobj 66 0 obj <> endobj 280 0 obj <> endobj 87 0 obj <> endobj 75 0 obj <> endobj 458 0 obj <> endobj 275 0 obj <> endobj 74 0 obj <> endobj 459 0 obj <> endobj 274 0 obj <> endobj 60 0 obj <> endobj 270 0 obj <> endobj 71 0 obj <> endobj 460 0 obj <> endobj 57 0 obj <> endobj 266 0 obj <> endobj 69 0 obj <> endobj 55 0 obj <> endobj 178 0 obj <> endobj 67 0 obj <> endobj 52 0 obj <> endobj 65 0 obj <> endobj 253 0 obj <> endobj 68 0 obj <> endobj 64 0 obj <> endobj 461 0 obj <> endobj 46 0 obj << /Title(A Software License) /Dest/appendix.A /Parent 6 0 R /Prev 37 0 R >> endobj 5 0 obj <> /Doc-Start<> /page.0<> /page.2<> /page.3<> /chapter*.1<> /page.4<> /page.5<> /chapter*.2<> /page.6<> /chapter.1<> /section.1.1<> /section.1.2<> /section.1.3<> /section.1.4<> /section.1.5<> /chapter.2<> /section.2.1<> /section.2.2<> /section.2.3<> /section.2.4<> /subsection.2.4.1<> /Item.1<> /Item.2<> /Item.3<> /Item.4<> /subsection.2.4.2<> /Item.5<> /Item.6<> /Item.7<> /Item.8<> /subsection.2.4.3<> /page.7<> /section.2.5<> /page.8<> /page.9<> /chapter.3<> /section.3.1<> /figure.3.1<> /page.10<> /section.3.2<> /Item.9<> /Item.10<> /Item.11<> /Item.12<> /Item.13<> /Item.14<> /section.3.3<> /page.11<> /figure.3.2<> /section.3.4<> /Hfootnote.1<> /page.12<> /figure.3.3<> /section.3.5<> /section.3.6<> /page.13<> /section.3.7<> /section.3.8<> /Item.15<> /Item.16<> /Item.17<> /page.14<> /page.15<> /chapter.4<> /section.4.1<> /section.4.2<> /section*.3<> /section*.4<> /section*.5<> /page.16<> /page.17<> /section*.6<> /Item.18<> /Item.19<> /Item.20<> /Item.21<> /section.4.3<> /section*.7<> /section*.8<> /page.18<> /section*.9<> /section*.10<> /Item.22<> /section.4.4<> /section*.11<> /section*.12<> /section.4.5<> /section*.13<> /page.19<> /section*.14<> /section*.15<> /page.20<> /page.21<> /chapter.5<> /subsection.5.0.1<> /section*.16<> /section*.17<> /subsection.5.0.2<> /section*.18<> /section*.19<> /subsection.5.0.3<> /page.22<> /section*.20<> /page.23<> /page.24<> /section*.21<> /section*.22<> /subsection.5.0.4<> /section*.23<> /section*.24<> /subsection.5.0.5<> /page.25<> /section*.25<> /section*.26<> /subsection.5.0.6<> /section*.27<> /section*.28<> /subsection.5.0.7<> /section*.29<> /section*.30<> /subsection.5.0.8<> /section*.31<> /section*.32<> /page.26<> /page.27<> /appendix.A<> /page.28<> /page.29<> /appendix*.33<> /cite.iso9945p1<> /cite.iso10918p1<> /cite.iso9899<> /cite.netpbm_web<> /cite.wg1n2412<> /cite.Adams2000c<> /cite.icc_fffcp<> /cite.iso15444p1<> /cite.iso15444p4<> /cite.iso15444p5<> /cite.Kernighan1988a<> /cite.Luse1994a<> /cite.sun_openwinref<>>>endobj 2 0 obj <>endobj xref 0 462 0000000000 65535 f 0000101852 00000 n 0000200118 00000 n 0000101452 00000 n 0000094167 00000 n 0000184096 00000 n 0000101796 00000 n 0000102545 00000 n 0000102000 00000 n 0000102102 00000 n 0000102208 00000 n 0000102316 00000 n 0000102447 00000 n 0000103672 00000 n 0000102668 00000 n 0000102771 00000 n 0000102887 00000 n 0000103425 00000 n 0000103004 00000 n 0000103139 00000 n 0000103307 00000 n 0000103577 00000 n 0000104680 00000 n 0000103812 00000 n 0000103905 00000 n 0000104008 00000 n 0000104115 00000 n 0000104220 00000 n 0000104333 00000 n 0000104451 00000 n 0000104562 00000 n 0000105346 00000 n 0000104820 00000 n 0000104913 00000 n 0000105025 00000 n 0000105137 00000 n 0000105250 00000 n 0000106357 00000 n 0000106236 00000 n 0000105492 00000 n 0000105589 00000 n 0000105699 00000 n 0000105809 00000 n 0000105919 00000 n 0000106029 00000 n 0000106139 00000 n 0000184003 00000 n 0000106489 00000 n 0000000015 00000 n 0000002024 00000 n 0000143385 00000 n 0000143092 00000 n 0000180351 00000 n 0000147153 00000 n 0000146876 00000 n 0000177545 00000 n 0000156761 00000 n 0000174140 00000 n 0000145734 00000 n 0000145497 00000 n 0000171614 00000 n 0000150054 00000 n 0000149778 00000 n 0000161034 00000 n 0000182794 00000 n 0000181519 00000 n 0000164554 00000 n 0000179219 00000 n 0000182732 00000 n 0000176412 00000 n 0000155575 00000 n 0000172937 00000 n 0000106546 00000 n 0000106701 00000 n 0000169222 00000 n 0000166884 00000 n 0000106861 00000 n 0000107014 00000 n 0000107046 00000 n 0000094357 00000 n 0000002045 00000 n 0000002390 00000 n 0000107199 00000 n 0000094501 00000 n 0000002410 00000 n 0000002757 00000 n 0000107231 00000 n 0000165751 00000 n 0000111708 00000 n 0000111740 00000 n 0000094669 00000 n 0000002777 00000 n 0000002956 00000 n 0000111783 00000 n 0000094813 00000 n 0000002976 00000 n 0000005141 00000 n 0000163417 00000 n 0000111815 00000 n 0000111947 00000 n 0000112082 00000 n 0000112218 00000 n 0000112354 00000 n 0000112488 00000 n 0000112624 00000 n 0000112758 00000 n 0000112894 00000 n 0000113030 00000 n 0000113166 00000 n 0000113302 00000 n 0000113443 00000 n 0000113582 00000 n 0000113723 00000 n 0000113859 00000 n 0000113993 00000 n 0000114129 00000 n 0000114264 00000 n 0000114400 00000 n 0000114536 00000 n 0000114671 00000 n 0000114806 00000 n 0000114942 00000 n 0000115078 00000 n 0000115212 00000 n 0000115347 00000 n 0000115483 00000 n 0000115618 00000 n 0000115753 00000 n 0000115889 00000 n 0000116022 00000 n 0000116163 00000 n 0000116304 00000 n 0000116444 00000 n 0000095236 00000 n 0000005162 00000 n 0000005704 00000 n 0000116499 00000 n 0000116640 00000 n 0000116781 00000 n 0000116921 00000 n 0000117060 00000 n 0000117201 00000 n 0000117336 00000 n 0000095439 00000 n 0000005725 00000 n 0000006336 00000 n 0000117380 00000 n 0000162200 00000 n 0000117515 00000 n 0000117649 00000 n 0000117783 00000 n 0000095618 00000 n 0000006357 00000 n 0000006578 00000 n 0000117851 00000 n 0000095765 00000 n 0000006599 00000 n 0000010496 00000 n 0000158539 00000 n 0000157329 00000 n 0000117884 00000 n 0000118024 00000 n 0000118163 00000 n 0000118302 00000 n 0000118441 00000 n 0000118580 00000 n 0000118718 00000 n 0000118860 00000 n 0000119000 00000 n 0000119139 00000 n 0000119274 00000 n 0000119418 00000 n 0000096008 00000 n 0000010518 00000 n 0000012925 00000 n 0000119499 00000 n 0000153846 00000 n 0000153650 00000 n 0000178716 00000 n 0000119633 00000 n 0000119808 00000 n 0000119990 00000 n 0000120175 00000 n 0000120314 00000 n 0000120452 00000 n 0000096211 00000 n 0000012947 00000 n 0000015982 00000 n 0000120533 00000 n 0000120708 00000 n 0000120874 00000 n 0000121034 00000 n 0000121193 00000 n 0000096398 00000 n 0000016004 00000 n 0000020159 00000 n 0000121298 00000 n 0000121435 00000 n 0000121574 00000 n 0000121729 00000 n 0000096577 00000 n 0000020181 00000 n 0000024534 00000 n 0000121810 00000 n 0000121966 00000 n 0000122110 00000 n 0000122257 00000 n 0000122402 00000 n 0000122547 00000 n 0000122696 00000 n 0000122839 00000 n 0000122994 00000 n 0000123148 00000 n 0000123290 00000 n 0000123438 00000 n 0000123592 00000 n 0000096828 00000 n 0000024556 00000 n 0000029340 00000 n 0000123671 00000 n 0000123816 00000 n 0000123963 00000 n 0000124110 00000 n 0000124263 00000 n 0000124430 00000 n 0000124596 00000 n 0000124752 00000 n 0000124897 00000 n 0000125043 00000 n 0000125191 00000 n 0000125380 00000 n 0000125539 00000 n 0000125747 00000 n 0000125891 00000 n 0000126039 00000 n 0000126187 00000 n 0000126330 00000 n 0000097119 00000 n 0000029362 00000 n 0000031336 00000 n 0000126409 00000 n 0000126573 00000 n 0000126721 00000 n 0000126867 00000 n 0000127021 00000 n 0000097306 00000 n 0000031358 00000 n 0000031605 00000 n 0000127115 00000 n 0000097453 00000 n 0000031626 00000 n 0000034946 00000 n 0000127148 00000 n 0000182655 00000 n 0000127283 00000 n 0000097616 00000 n 0000034968 00000 n 0000039863 00000 n 0000127377 00000 n 0000127515 00000 n 0000127651 00000 n 0000097787 00000 n 0000039885 00000 n 0000047670 00000 n 0000159678 00000 n 0000127719 00000 n 0000175277 00000 n 0000127854 00000 n 0000154432 00000 n 0000154193 00000 n 0000172785 00000 n 0000153226 00000 n 0000153000 00000 n 0000160889 00000 n 0000170479 00000 n 0000168087 00000 n 0000127990 00000 n 0000097958 00000 n 0000047692 00000 n 0000060053 00000 n 0000164617 00000 n 0000128138 00000 n 0000128273 00000 n 0000128425 00000 n 0000128580 00000 n 0000128726 00000 n 0000098145 00000 n 0000060076 00000 n 0000062677 00000 n 0000128859 00000 n 0000129007 00000 n 0000129156 00000 n 0000129304 00000 n 0000129450 00000 n 0000129593 00000 n 0000129741 00000 n 0000129891 00000 n 0000130040 00000 n 0000130190 00000 n 0000130344 00000 n 0000130490 00000 n 0000130644 00000 n 0000098396 00000 n 0000062699 00000 n 0000062945 00000 n 0000130712 00000 n 0000098543 00000 n 0000062966 00000 n 0000065572 00000 n 0000130745 00000 n 0000130889 00000 n 0000131032 00000 n 0000131179 00000 n 0000098722 00000 n 0000065594 00000 n 0000068393 00000 n 0000131282 00000 n 0000131427 00000 n 0000131567 00000 n 0000131719 00000 n 0000131857 00000 n 0000132002 00000 n 0000132154 00000 n 0000132294 00000 n 0000132440 00000 n 0000132578 00000 n 0000132731 00000 n 0000132871 00000 n 0000133024 00000 n 0000133164 00000 n 0000133311 00000 n 0000133461 00000 n 0000098997 00000 n 0000068415 00000 n 0000071181 00000 n 0000133529 00000 n 0000133674 00000 n 0000133820 00000 n 0000133966 00000 n 0000134112 00000 n 0000134257 00000 n 0000134409 00000 n 0000134561 00000 n 0000134707 00000 n 0000134859 00000 n 0000135011 00000 n 0000135155 00000 n 0000099240 00000 n 0000071203 00000 n 0000073643 00000 n 0000135247 00000 n 0000135387 00000 n 0000135527 00000 n 0000135667 00000 n 0000135805 00000 n 0000135943 00000 n 0000136092 00000 n 0000136247 00000 n 0000136392 00000 n 0000136533 00000 n 0000099467 00000 n 0000073665 00000 n 0000075065 00000 n 0000136638 00000 n 0000136781 00000 n 0000136924 00000 n 0000099638 00000 n 0000075087 00000 n 0000075339 00000 n 0000137003 00000 n 0000099785 00000 n 0000075360 00000 n 0000077072 00000 n 0000137036 00000 n 0000137176 00000 n 0000137316 00000 n 0000099956 00000 n 0000077094 00000 n 0000079863 00000 n 0000137395 00000 n 0000137535 00000 n 0000137684 00000 n 0000137833 00000 n 0000137982 00000 n 0000138131 00000 n 0000138279 00000 n 0000138428 00000 n 0000138575 00000 n 0000138723 00000 n 0000138871 00000 n 0000139020 00000 n 0000139163 00000 n 0000100207 00000 n 0000079885 00000 n 0000083028 00000 n 0000139231 00000 n 0000139373 00000 n 0000155221 00000 n 0000155022 00000 n 0000156822 00000 n 0000139520 00000 n 0000139660 00000 n 0000139801 00000 n 0000139940 00000 n 0000140083 00000 n 0000140230 00000 n 0000140371 00000 n 0000140512 00000 n 0000140654 00000 n 0000140799 00000 n 0000140943 00000 n 0000100458 00000 n 0000083050 00000 n 0000085974 00000 n 0000141050 00000 n 0000141195 00000 n 0000141338 00000 n 0000141485 00000 n 0000141632 00000 n 0000141772 00000 n 0000141928 00000 n 0000142074 00000 n 0000100669 00000 n 0000085996 00000 n 0000087862 00000 n 0000142153 00000 n 0000142295 00000 n 0000100832 00000 n 0000087884 00000 n 0000088102 00000 n 0000142361 00000 n 0000100979 00000 n 0000088123 00000 n 0000090205 00000 n 0000155633 00000 n 0000142394 00000 n 0000101126 00000 n 0000090227 00000 n 0000091506 00000 n 0000142475 00000 n 0000101273 00000 n 0000091528 00000 n 0000094145 00000 n 0000142521 00000 n 0000142688 00000 n 0000142857 00000 n 0000143013 00000 n 0000145475 00000 n 0000146854 00000 n 0000149756 00000 n 0000152978 00000 n 0000153629 00000 n 0000154172 00000 n 0000155001 00000 n 0000155554 00000 n 0000158484 00000 n 0000160831 00000 n 0000163351 00000 n 0000168027 00000 n 0000170372 00000 n 0000174080 00000 n 0000183948 00000 n trailer << /Size 462 /Root 1 0 R /Info 2 0 R >> startxref 200370 %%EOF jasper-1.900.1/acaux/0000755000175000017500000000000010554237065013244 5ustar ernieerniejasper-1.900.1/acaux/ltmain.sh0000755000175000017500000060342610554237042015075 0ustar ernieernie# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # 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. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -pg pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. # for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` # done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: jasper-1.900.1/acaux/mkinstalldirs0000755000175000017500000000341110554235554016052 0ustar ernieernie#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" 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: 3 # End: # mkinstalldirs ends here jasper-1.900.1/acaux/config.sub0000755000175000017500000007305510554237042015234 0ustar ernieernie#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | s390 | s390x \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | s390-* | s390x-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: jasper-1.900.1/acaux/depcomp0000755000175000017500000002753310554235554014634 0ustar ernieernie#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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 . 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 # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi 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. 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. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # 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" ;; 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 tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab 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 proprocessed 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'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used 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 "$@" -o /dev/null $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 $? # 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 ;; -*) ;; *) 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 proprocessed 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 '/^# [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 proprocessed 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 jasper-1.900.1/acaux/install-sh0000755000175000017500000001270110554235554015252 0ustar ernieernie#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, 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 M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # 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}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 jasper-1.900.1/acaux/missing0000755000175000017500000002403610554235554014651 0ustar ernieernie#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' 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' is missing on your system. 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 missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. 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 prerequirements 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 jasper-1.900.1/acaux/config.guess0000755000175000017500000012206510554237042015565 0ustar ernieernie#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown ## for Red Hat Linux if test -f /etc/redhat-release ; then VENDOR=redhat ; else VENDOR= ; fi # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-${VENDOR:-unknown}-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-${VENDOR:-unknown}-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-${VENDOR:-unknown}-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: jasper-1.900.1/aclocal.m40000644000175000017500000077671510554237042014025 0ustar ernieernie# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # 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. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR jasper-1.900.1/configure.ac0000644000175000017500000002611510554236137014435 0ustar ernieerniednl **************************************************************************** dnl Copyright (c) 2001-2004 Michael David Adams. dnl All rights reserved. dnl dnl The complete licensing terms for this software can be found in the file dnl named "LICENSE" in this software distribution. dnl **************************************************************************** dnl The package name. define(AC_JAS_NAME, jasper) dnl ************************************************************ dnl Package version information. dnl ************************************************************ dnl The major, minor, and micro version numbers of the package. define(AC_JAS_MAJOR_VERSION, 1) define(AC_JAS_MINOR_VERSION, 900) define(AC_JAS_MICRO_VERSION, 1) dnl The package version. define(AC_JAS_VERSION, AC_JAS_MAJOR_VERSION.AC_JAS_MINOR_VERSION.AC_JAS_MICRO_VERSION) dnl ************************************************************ dnl RPM version information. dnl ************************************************************ define(AC_JAS_RPM_RELEASE, 1) dnl ************************************************************ dnl Dynamically-linked library version information (for Libtool). dnl ************************************************************ dnl Guidelines for updating these definitions: dnl 1) If the library source code has changed at all since the last update, dnl then increment REVISION. dnl 2) If any interfaces have been added, removed, or changed since the last dnl update, increment CURRENT, and set REVISION to zero. dnl 3) If any interfaces have been added since the last public release, then dnl increment AGE. dnl 4) If any interfaces have been removed since the last public release, then dnl set AGE to zero. dnl The most recent interface number that this library implements. define(AC_JAS_LT_CURRENT, 1) dnl The implementation number of the current interface. define(AC_JAS_LT_REVISION, 0) dnl The difference between the newest and oldest interfaces that this library dnl implements. In other words, the library implements all of the interface dnl numbers in the range from current - age to current. define(AC_JAS_LT_AGE, 0) dnl The release number of the library. define(AC_JAS_LT_RELEASE, AC_JAS_MAJOR_VERSION.AC_JAS_MINOR_VERSION) dnl **************************************************************************** dnl NOTHING BELOW THIS LINE SHOULD REQUIRE MODIFICATION (IDEALLY :-) dnl **************************************************************************** dnl Initialize autoconf. AC_INIT(AC_JAS_NAME, AC_JAS_VERSION) AC_PREREQ(2.59) AC_CONFIG_SRCDIR(README) dnl Note: Avoid the temptation to call the auxiliary directory "aux" because dnl Microsoft Windows will barf if you try to use "aux" as a directory name. :-( AC_CONFIG_AUX_DIR(acaux) # Detect the canonical host and target build environment. # Note: This precedes automake initialization to avoid warnings. AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET # Initialize automake. AM_INIT_AUTOMAKE # Initialize version information parameters. JAS_MAJOR_VERSION=AC_JAS_MAJOR_VERSION JAS_MINOR_VERSION=AC_JAS_MINOR_VERSION JAS_MICRO_VERSION=AC_JAS_MICRO_VERSION JAS_VERSION=AC_JAS_VERSION AC_SUBST(JAS_MAJOR_VERSION) AC_SUBST(JAS_MINOR_VERSION) AC_SUBST(JAS_MICRO_VERSION) AC_SUBST(JAS_VERSION) AC_DEFINE_UNQUOTED(JAS_VERSION, "$JAS_VERSION") JAS_RPM_RELEASE=AC_JAS_RPM_RELEASE AC_SUBST(JAS_RPM_RELEASE) # Initialize version information for libtool. LT_RELEASE=AC_JAS_LT_RELEASE LT_CURRENT=AC_JAS_LT_CURRENT LT_REVISION=AC_JAS_LT_REVISION LT_AGE=AC_JAS_LT_AGE AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) # Indicate a configure-based build is being used. AC_DEFINE(JAS_CONFIGURE) ############################################################ # Configuration header file. ############################################################ AH_TEMPLATE([DEBUG_OVERFLOW], [Debugging overflow detection]) AH_TEMPLATE([JAS_CONFIGURE], [JasPer configure]) AH_TEMPLATE([JAS_VERSION], [JasPer version]) AH_TEMPLATE([DEBUG_MEMALLOC], [Debugging memory allocator]) AH_TEMPLATE([DEBUG], [Extra debugging support]) AH_TEMPLATE([HAVE_VLA], [Have variable length arrays]) AH_TOP([ /* Avoid problems due to multiple inclusion. */ #ifndef JAS_CONFIG_H #define JAS_CONFIG_H /* This preprocessor symbol identifies the version of JasPer. */ #undef JAS_VERSION /* If configure is being used, this symbol will be defined automatically at this point in the configuration header file. */ /* The preprocessor symbol JAS_WIN_MSVC_BUILD should not be defined unless the JasPer software is being built under Microsoft Windows using Microsoft Visual C. */ #if !defined(JAS_WIN_MSVC_BUILD) /* A configure-based build is being used. */ ]) AH_BOTTOM([ #else /* A configure-based build is not being used. */ #include #endif #endif ]) ############################################################ # Checks for programs. ############################################################ AC_PROG_CC AC_PROG_INSTALL AC_PROG_RANLIB # AC_PROG_AWK # AC_PROG_CPP # AC_PROG_LN_S AM_DISABLE_SHARED AC_PROG_LIBTOOL AC_PATH_XTRA AC_MSG_CHECKING(whether variable-length arrays are supported) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ int n; int foo[n]; ]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VLA)],[AC_MSG_RESULT(no)]) dnl AC_TRY_COMPILE is obsolete dnl AC_TRY_COMPILE([], [ dnl int n; int foo[n]; dnl ], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VLA)], AC_MSG_RESULT(no)) ############################################################ # Check for the IJG JPEG library. ############################################################ # Allow the user to explicitly specify whether the JPEG library is present. AC_ARG_ENABLE(libjpeg, [ --disable-libjpeg Force the IJG JPEG library to be ignored], [ case "${enableval}" in yes) ENABLE_LIBJPEG=yes;; no) ENABLE_LIBJPEG=no;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-libjpeg) ;; esac ], ENABLE_LIBJPEG=yes) HAVE_LIBJPEG=no if test $ENABLE_LIBJPEG = yes; then # Check for the JPEG library. AC_CHECK_LIB(jpeg, jpeg_destroy, HAVE_LIBJPEG=yes, HAVE_LIBJPEG=no) if test $HAVE_LIBJPEG = yes; then LIBS="$LIBS -ljpeg" fi fi AM_CONDITIONAL(HAVE_LIBJPEG, test $HAVE_LIBJPEG = yes) ############################################################ # Check for OpenGL libraries. ############################################################ AC_ARG_WITH(glut-include-dir, [ --with-glut-include-dir=DIR Set GLUT include directory.], [ case "$withval" in /*) CFLAGS="$CFLAGS -I$withval" CPPFLAGS="$CPPFLAGS -I$withval";; *) AC_MSG_ERROR(--with-glut-include-dir requires absolute path) ;; esac ], ) AC_ARG_WITH(glut-lib-dir, [ --with-glut-lib-dir=DIR Set GLUT library directory.], [ case "$withval" in /*) LIBS="$LIBS -L$withval";; *) AC_MSG_ERROR(--with-glut-lib-dir requires absolute path) ;; esac ], ) AC_ARG_ENABLE(opengl, [ --disable-opengl Disable use of OpenGL. ], [ case "$enableval" in yes) ENABLE_OPENGL=yes;; no) ENABLE_OPENGL=no;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-libjpeg) ;; esac ], ENABLE_OPENGL=yes) HAVE_OPENGL=no OPENGL_LIBS="" if test $ENABLE_OPENGL = yes; then if test $HAVE_OPENGL = no; then TMPLIBS="-lglut -lGL -lGLU $X_PRE_LIBS -lX11 -lXmu -lXi -lXext -lXt $X_EXTRA_LIBS $X_LIBS" AC_CHECK_LIB(glut, glutInit, [HAVE_OPENGL=yes; OPENGL_LIBS=$TMPLIBS], HAVE_OPENGL=no, $TMPLIBS) fi AC_CHECK_HEADER(GL/glut.h,, [HAVE_OPENGL=no; OPENGL_LIBS="";]) fi AM_CONDITIONAL(HAVE_OPENGL, test $HAVE_OPENGL = yes) AC_SUBST(OPENGL_LIBS) AC_MSG_CHECKING([whether OpenGL libraries and headers were detected]) AC_MSG_RESULT($HAVE_OPENGL) ############################################################ # Check for other libraries. ############################################################ # Check for the math library. AC_CHECK_LIB(m, main) ############################################################ # Check for header files. ############################################################ AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h limits.h unistd.h stdint.h stdbool.h io.h windows.h sys/types.h sys/time.h stdlib.h stddef.h) ############################################################ # Check for typedefs, structures, and compiler characteristics. ############################################################ AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T dnl AC_CHECK_TYPE(bool, int) AC_CHECK_TYPE(uchar, unsigned char) AC_CHECK_TYPE(ushort, unsigned short) AC_CHECK_TYPE(uint, unsigned int) AC_CHECK_TYPE(ulong, unsigned long) AC_CHECK_TYPE(longlong, long long) AC_CHECK_TYPE(ulonglong, unsigned long long) AC_CHECK_TYPE(ssize_t, int) AC_CHECK_FUNCS(gettimeofday) AC_CHECK_FUNCS(getrusage) ############################################################ # Checks for library functions. ############################################################ AC_FUNC_VPRINTF ############################################################ # Enable/disable special memory allocator for debugging. ############################################################ AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc use special memory allocator for debugging], [ case "${enableval}" in yes) AC_DEFINE(DEBUG_MEMALLOC) ;; no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-dmalloc) ;; esac ], ) ############################################################ # Enable/disable extra code for debugging. ############################################################ AC_ARG_ENABLE(debug, [ --enable-debug add extra code for debugging], [ case "${enableval}" in yes) debug=yes AC_DEFINE(DEBUG) AC_DEFINE(DEBUG_OVERFLOW) if test "$GCC" = yes; then CFLAGS="-g -O0" fi ;; no) debug=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac ], [debug=no]) if test "$GCC" = yes; then CFLAGS="$CFLAGS" #CFLAGS="$CFLAGS -std=c99" #CFLAGS="$CFLAGS -pedantic" #CFLAGS="$CFLAGS -pedantic-errors" #CFLAGS="$CFLAGS -W -Wall -Wno-long-long -Wformat -Wmissing-prototypes -Wstrict-prototypes" fi ############################################################ # Extra stuff for research purposes. ############################################################ AC_ARG_ENABLE(special0, [ --enable-special0 enable something], [ case "${enableval}" in yes) if test "$GCC" = yes; then CFLAGS="-g -O0" fi ;; no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-special0) ;; esac ], []) if test -n "$EXTRACFLAGS"; then CFLAGS="$CFLAGS $EXTRACFLAGS" fi ############################################################ # Generate the configuration header file. ############################################################ AC_CONFIG_HEADERS([src/libjasper/include/jasper/jas_config.h]) ############################################################ # Generate the makefiles. ############################################################ AC_CONFIG_FILES([ Makefile src/Makefile src/appl/Makefile src/libjasper/Makefile src/libjasper/base/Makefile src/libjasper/bmp/Makefile src/libjasper/include/Makefile src/libjasper/include/jasper/Makefile src/libjasper/jp2/Makefile src/libjasper/jpc/Makefile src/libjasper/jpg/Makefile src/libjasper/mif/Makefile src/libjasper/pgx/Makefile src/libjasper/pnm/Makefile src/libjasper/ras/Makefile src/msvc/Makefile jasper.spec ]) AC_OUTPUT jasper-1.900.1/README0000644000175000017500000000200210554235562013015 0ustar ernieernieJasPer Readme ************* This is the source code distribution for JasPer. JasPer is a collection of software (i.e., a library and application programs) for the coding and manipulation of images. This software can handle image data in a variety of formats. One such format supported by JasPer is the JPEG-2000 format defined in ISO/IEC 15444-1. The complete licensing terms for the JasPer software can be found in the file named "LICENSE" in the top level directory of this software distribution. Any use of this software contrary to the terms of the license is strictly prohibited. The changes made to the software since the last release are described in the file "NEWS". Detailed documentation on the JasPer software can be found in the JasPer Software Reference Manual. This manual is located in the "doc" directory, and includes useful information such as: 1) how to build, install, and use the software, 2) how to submit report bugs, and 3) where to find additional information about the software. Enjoy! :) jasper-1.900.1/configure0000755000175000017500000275407610554237050014071 0ustar ernieernie#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for jasper 1.900.1. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='jasper' PACKAGE_TARNAME='jasper' PACKAGE_VERSION='1.900.1' PACKAGE_STRING='jasper 1.900.1' PACKAGE_BUGREPORT='' ac_unique_file="README" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar JAS_MAJOR_VERSION JAS_MINOR_VERSION JAS_MICRO_VERSION JAS_VERSION JAS_RPM_RELEASE LT_RELEASE LT_CURRENT LT_REVISION LT_AGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB SED EGREP LN_S ECHO AR ac_ct_AR CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS HAVE_LIBJPEG_TRUE HAVE_LIBJPEG_FALSE HAVE_OPENGL_TRUE HAVE_OPENGL_FALSE OPENGL_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures jasper 1.900.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of jasper 1.900.1:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-libjpeg Force the IJG JPEG library to be ignored --disable-opengl Disable use of OpenGL. --enable-dmalloc use special memory allocator for debugging --enable-debug add extra code for debugging --enable-special0 enable something Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-x use the X Window System --with-glut-include-dir=DIR Set GLUT include directory. --with-glut-lib-dir=DIR Set GLUT library directory. Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF jasper configure 1.900.1 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by jasper $as_me 1.900.1, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in acaux $srcdir/acaux; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in acaux $srcdir/acaux" >&5 echo "$as_me: error: cannot find install-sh or install.sh in acaux $srcdir/acaux" >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Detect the canonical host and target build environment. # Note: This precedes automake initialization to avoid warnings. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_target_alias=$target_alias test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Initialize automake. am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='jasper' VERSION='1.900.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Initialize version information parameters. JAS_MAJOR_VERSION=1 JAS_MINOR_VERSION=900 JAS_MICRO_VERSION=1 JAS_VERSION=1.900.1 cat >>confdefs.h <<_ACEOF #define JAS_VERSION "$JAS_VERSION" _ACEOF JAS_RPM_RELEASE=1 # Initialize version information for libtool. LT_RELEASE=1.900 LT_CURRENT=1 LT_REVISION=0 LT_AGE=0 # Indicate a configure-based build is being used. cat >>confdefs.h <<\_ACEOF #define JAS_CONFIGURE 1 _ACEOF ############################################################ # Configuration header file. ############################################################ ############################################################ # Checks for programs. ############################################################ ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi # AC_PROG_AWK # AC_PROG_CPP # AC_PROG_LN_S # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=no fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 3944 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to the jasper lists. ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:5543:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6606: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6610: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6874: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6878: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6978: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:6982: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 8447 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # 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. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix3*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix3*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; solaris*) case $cc_basename in CC*) # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. postdeps_CXX='-lCstd -lCrun' ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11787: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11791: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11891: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11895: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 12427 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13485: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13489: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13589: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13593: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix3*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 15038 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15816: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15820: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16084: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16088: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16188: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16192: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix3*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 17657 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' _ACEOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -fr conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 _ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_nospace=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_nospace=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_R_nospace = yes; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_space=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_space=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_R_space = yes; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi LIBS=$ac_xsave_LIBS esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else char (*f) () = connect; #endif #ifdef __cplusplus } #endif int main () { return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. echo "$as_me:$LINENO: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) choke me #else char (*f) () = remove; #endif #ifdef __cplusplus } #endif int main () { return f != remove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then echo "$as_me:$LINENO: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); int main () { remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo "$as_me:$LINENO: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else char (*f) () = shmat; #endif #ifdef __cplusplus } #endif int main () { return f != shmat; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); int main () { shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); int main () { IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi echo "$as_me:$LINENO: checking whether variable-length arrays are supported" >&5 echo $ECHO_N "checking whether variable-length arrays are supported... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { int n; int foo[n]; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; cat >>confdefs.h <<\_ACEOF #define HAVE_VLA 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ############################################################ # Check for the IJG JPEG library. ############################################################ # Allow the user to explicitly specify whether the JPEG library is present. # Check whether --enable-libjpeg or --disable-libjpeg was given. if test "${enable_libjpeg+set}" = set; then enableval="$enable_libjpeg" case "${enableval}" in yes) ENABLE_LIBJPEG=yes;; no) ENABLE_LIBJPEG=no;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-libjpeg" >&5 echo "$as_me: error: bad value ${enableval} for --disable-libjpeg" >&2;} { (exit 1); exit 1; }; } ;; esac else ENABLE_LIBJPEG=yes fi; HAVE_LIBJPEG=no if test $ENABLE_LIBJPEG = yes; then # Check for the JPEG library. echo "$as_me:$LINENO: checking for jpeg_destroy in -ljpeg" >&5 echo $ECHO_N "checking for jpeg_destroy in -ljpeg... $ECHO_C" >&6 if test "${ac_cv_lib_jpeg_jpeg_destroy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char jpeg_destroy (); int main () { jpeg_destroy (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_jpeg_jpeg_destroy=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_jpeg_jpeg_destroy=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy" >&5 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy" >&6 if test $ac_cv_lib_jpeg_jpeg_destroy = yes; then HAVE_LIBJPEG=yes else HAVE_LIBJPEG=no fi if test $HAVE_LIBJPEG = yes; then LIBS="$LIBS -ljpeg" fi fi if test $HAVE_LIBJPEG = yes; then HAVE_LIBJPEG_TRUE= HAVE_LIBJPEG_FALSE='#' else HAVE_LIBJPEG_TRUE='#' HAVE_LIBJPEG_FALSE= fi ############################################################ # Check for OpenGL libraries. ############################################################ # Check whether --with-glut-include-dir or --without-glut-include-dir was given. if test "${with_glut_include_dir+set}" = set; then withval="$with_glut_include_dir" case "$withval" in /*) CFLAGS="$CFLAGS -I$withval" CPPFLAGS="$CPPFLAGS -I$withval";; *) { { echo "$as_me:$LINENO: error: --with-glut-include-dir requires absolute path" >&5 echo "$as_me: error: --with-glut-include-dir requires absolute path" >&2;} { (exit 1); exit 1; }; } ;; esac fi; # Check whether --with-glut-lib-dir or --without-glut-lib-dir was given. if test "${with_glut_lib_dir+set}" = set; then withval="$with_glut_lib_dir" case "$withval" in /*) LIBS="$LIBS -L$withval";; *) { { echo "$as_me:$LINENO: error: --with-glut-lib-dir requires absolute path" >&5 echo "$as_me: error: --with-glut-lib-dir requires absolute path" >&2;} { (exit 1); exit 1; }; } ;; esac fi; # Check whether --enable-opengl or --disable-opengl was given. if test "${enable_opengl+set}" = set; then enableval="$enable_opengl" case "$enableval" in yes) ENABLE_OPENGL=yes;; no) ENABLE_OPENGL=no;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-libjpeg" >&5 echo "$as_me: error: bad value ${enableval} for --disable-libjpeg" >&2;} { (exit 1); exit 1; }; } ;; esac else ENABLE_OPENGL=yes fi; HAVE_OPENGL=no OPENGL_LIBS="" if test $ENABLE_OPENGL = yes; then if test $HAVE_OPENGL = no; then TMPLIBS="-lglut -lGL -lGLU $X_PRE_LIBS -lX11 -lXmu -lXi -lXext -lXt $X_EXTRA_LIBS $X_LIBS" echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5 echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6 if test "${ac_cv_lib_glut_glutInit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lglut $TMPLIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char glutInit (); int main () { glutInit (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_glut_glutInit=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_glut_glutInit=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutInit" >&5 echo "${ECHO_T}$ac_cv_lib_glut_glutInit" >&6 if test $ac_cv_lib_glut_glutInit = yes; then HAVE_OPENGL=yes; OPENGL_LIBS=$TMPLIBS else HAVE_OPENGL=no fi fi if test "${ac_cv_header_GL_glut_h+set}" = set; then echo "$as_me:$LINENO: checking for GL/glut.h" >&5 echo $ECHO_N "checking for GL/glut.h... $ECHO_C" >&6 if test "${ac_cv_header_GL_glut_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_GL_glut_h" >&5 echo "${ECHO_T}$ac_cv_header_GL_glut_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking GL/glut.h usability" >&5 echo $ECHO_N "checking GL/glut.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking GL/glut.h presence" >&5 echo $ECHO_N "checking GL/glut.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: GL/glut.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: GL/glut.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: GL/glut.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: GL/glut.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: GL/glut.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: GL/glut.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: GL/glut.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: GL/glut.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: GL/glut.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: GL/glut.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: GL/glut.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: GL/glut.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: GL/glut.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: GL/glut.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: GL/glut.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: GL/glut.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to the jasper lists. ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for GL/glut.h" >&5 echo $ECHO_N "checking for GL/glut.h... $ECHO_C" >&6 if test "${ac_cv_header_GL_glut_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_GL_glut_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_GL_glut_h" >&5 echo "${ECHO_T}$ac_cv_header_GL_glut_h" >&6 fi if test $ac_cv_header_GL_glut_h = yes; then : else HAVE_OPENGL=no; OPENGL_LIBS=""; fi fi if test $HAVE_OPENGL = yes; then HAVE_OPENGL_TRUE= HAVE_OPENGL_FALSE='#' else HAVE_OPENGL_TRUE='#' HAVE_OPENGL_FALSE= fi echo "$as_me:$LINENO: checking whether OpenGL libraries and headers were detected" >&5 echo $ECHO_N "checking whether OpenGL libraries and headers were detected... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $HAVE_OPENGL" >&5 echo "${ECHO_T}$HAVE_OPENGL" >&6 ############################################################ # Check for other libraries. ############################################################ # Check for the math library. echo "$as_me:$LINENO: checking for main in -lm" >&5 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 echo "${ECHO_T}$ac_cv_lib_m_main" >&6 if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi ############################################################ # Check for header files. ############################################################ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in fcntl.h limits.h unistd.h stdint.h stdbool.h io.h windows.h sys/types.h sys/time.h stdlib.h stddef.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## --------------------------------- ## ## Report this to the jasper lists. ## ## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ############################################################ # Check for typedefs, structures, and compiler characteristics. ############################################################ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking for uchar" >&5 echo $ECHO_N "checking for uchar... $ECHO_C" >&6 if test "${ac_cv_type_uchar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uchar *) 0) return 0; if (sizeof (uchar)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uchar=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uchar=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uchar" >&5 echo "${ECHO_T}$ac_cv_type_uchar" >&6 if test $ac_cv_type_uchar = yes; then : else cat >>confdefs.h <<_ACEOF #define uchar unsigned char _ACEOF fi echo "$as_me:$LINENO: checking for ushort" >&5 echo $ECHO_N "checking for ushort... $ECHO_C" >&6 if test "${ac_cv_type_ushort+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ushort *) 0) return 0; if (sizeof (ushort)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ushort=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ushort=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ushort" >&5 echo "${ECHO_T}$ac_cv_type_ushort" >&6 if test $ac_cv_type_ushort = yes; then : else cat >>confdefs.h <<_ACEOF #define ushort unsigned short _ACEOF fi echo "$as_me:$LINENO: checking for uint" >&5 echo $ECHO_N "checking for uint... $ECHO_C" >&6 if test "${ac_cv_type_uint+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint *) 0) return 0; if (sizeof (uint)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint" >&5 echo "${ECHO_T}$ac_cv_type_uint" >&6 if test $ac_cv_type_uint = yes; then : else cat >>confdefs.h <<_ACEOF #define uint unsigned int _ACEOF fi echo "$as_me:$LINENO: checking for ulong" >&5 echo $ECHO_N "checking for ulong... $ECHO_C" >&6 if test "${ac_cv_type_ulong+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ulong *) 0) return 0; if (sizeof (ulong)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ulong=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ulong=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ulong" >&5 echo "${ECHO_T}$ac_cv_type_ulong" >&6 if test $ac_cv_type_ulong = yes; then : else cat >>confdefs.h <<_ACEOF #define ulong unsigned long _ACEOF fi echo "$as_me:$LINENO: checking for longlong" >&5 echo $ECHO_N "checking for longlong... $ECHO_C" >&6 if test "${ac_cv_type_longlong+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((longlong *) 0) return 0; if (sizeof (longlong)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_longlong=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_longlong=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_longlong" >&5 echo "${ECHO_T}$ac_cv_type_longlong" >&6 if test $ac_cv_type_longlong = yes; then : else cat >>confdefs.h <<_ACEOF #define longlong long long _ACEOF fi echo "$as_me:$LINENO: checking for ulonglong" >&5 echo $ECHO_N "checking for ulonglong... $ECHO_C" >&6 if test "${ac_cv_type_ulonglong+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ulonglong *) 0) return 0; if (sizeof (ulonglong)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ulonglong=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ulonglong=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ulonglong" >&5 echo "${ECHO_T}$ac_cv_type_ulonglong" >&6 if test $ac_cv_type_ulonglong = yes; then : else cat >>confdefs.h <<_ACEOF #define ulonglong unsigned long long _ACEOF fi echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ssize_t *) 0) return 0; if (sizeof (ssize_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi for ac_func in gettimeofday do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getrusage do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ############################################################ # Checks for library functions. ############################################################ for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done ############################################################ # Enable/disable special memory allocator for debugging. ############################################################ # Check whether --enable-dmalloc or --disable-dmalloc was given. if test "${enable_dmalloc+set}" = set; then enableval="$enable_dmalloc" case "${enableval}" in yes) cat >>confdefs.h <<\_ACEOF #define DEBUG_MEMALLOC 1 _ACEOF ;; no) ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-dmalloc" >&5 echo "$as_me: error: bad value ${enableval} for --enable-dmalloc" >&2;} { (exit 1); exit 1; }; } ;; esac fi; ############################################################ # Enable/disable extra code for debugging. ############################################################ # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" case "${enableval}" in yes) debug=yes cat >>confdefs.h <<\_ACEOF #define DEBUG 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define DEBUG_OVERFLOW 1 _ACEOF if test "$GCC" = yes; then CFLAGS="-g -O0" fi ;; no) debug=no ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5 echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;} { (exit 1); exit 1; }; } ;; esac else debug=no fi; if test "$GCC" = yes; then CFLAGS="$CFLAGS" #CFLAGS="$CFLAGS -std=c99" #CFLAGS="$CFLAGS -pedantic" #CFLAGS="$CFLAGS -pedantic-errors" #CFLAGS="$CFLAGS -W -Wall -Wno-long-long -Wformat -Wmissing-prototypes -Wstrict-prototypes" fi ############################################################ # Extra stuff for research purposes. ############################################################ # Check whether --enable-special0 or --disable-special0 was given. if test "${enable_special0+set}" = set; then enableval="$enable_special0" case "${enableval}" in yes) if test "$GCC" = yes; then CFLAGS="-g -O0" fi ;; no) ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-special0" >&5 echo "$as_me: error: bad value ${enableval} for --enable-special0" >&2;} { (exit 1); exit 1; }; } ;; esac fi; if test -n "$EXTRACFLAGS"; then CFLAGS="$CFLAGS $EXTRACFLAGS" fi ############################################################ # Generate the configuration header file. ############################################################ ac_config_headers="$ac_config_headers src/libjasper/include/jasper/jas_config.h" ############################################################ # Generate the makefiles. ############################################################ ac_config_files="$ac_config_files Makefile src/Makefile src/appl/Makefile src/libjasper/Makefile src/libjasper/base/Makefile src/libjasper/bmp/Makefile src/libjasper/include/Makefile src/libjasper/include/jasper/Makefile src/libjasper/jp2/Makefile src/libjasper/jpc/Makefile src/libjasper/jpg/Makefile src/libjasper/mif/Makefile src/libjasper/pgx/Makefile src/libjasper/pnm/Makefile src/libjasper/ras/Makefile src/msvc/Makefile jasper.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_LIBJPEG_TRUE}" && test -z "${HAVE_LIBJPEG_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBJPEG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_LIBJPEG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_OPENGL_TRUE}" && test -z "${HAVE_OPENGL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_OPENGL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_OPENGL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by jasper $as_me 1.900.1, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ jasper config.status 1.900.1 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/appl/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/appl/Makefile" ;; "src/libjasper/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/Makefile" ;; "src/libjasper/base/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/base/Makefile" ;; "src/libjasper/bmp/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/bmp/Makefile" ;; "src/libjasper/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/include/Makefile" ;; "src/libjasper/include/jasper/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/include/jasper/Makefile" ;; "src/libjasper/jp2/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/jp2/Makefile" ;; "src/libjasper/jpc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/jpc/Makefile" ;; "src/libjasper/jpg/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/jpg/Makefile" ;; "src/libjasper/mif/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/mif/Makefile" ;; "src/libjasper/pgx/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/pgx/Makefile" ;; "src/libjasper/pnm/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/pnm/Makefile" ;; "src/libjasper/ras/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/libjasper/ras/Makefile" ;; "src/msvc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/msvc/Makefile" ;; "jasper.spec" ) CONFIG_FILES="$CONFIG_FILES jasper.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "src/libjasper/include/jasper/jas_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/libjasper/include/jasper/jas_config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@JAS_MAJOR_VERSION@,$JAS_MAJOR_VERSION,;t t s,@JAS_MINOR_VERSION@,$JAS_MINOR_VERSION,;t t s,@JAS_MICRO_VERSION@,$JAS_MICRO_VERSION,;t t s,@JAS_VERSION@,$JAS_VERSION,;t t s,@JAS_RPM_RELEASE@,$JAS_RPM_RELEASE,;t t s,@LT_RELEASE@,$LT_RELEASE,;t t s,@LT_CURRENT@,$LT_CURRENT,;t t s,@LT_REVISION@,$LT_REVISION,;t t s,@LT_AGE@,$LT_AGE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@SED@,$SED,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@CPP@,$CPP,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@X_CFLAGS@,$X_CFLAGS,;t t s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t s,@HAVE_LIBJPEG_TRUE@,$HAVE_LIBJPEG_TRUE,;t t s,@HAVE_LIBJPEG_FALSE@,$HAVE_LIBJPEG_FALSE,;t t s,@HAVE_OPENGL_TRUE@,$HAVE_OPENGL_TRUE,;t t s,@HAVE_OPENGL_FALSE@,$HAVE_OPENGL_FALSE,;t t s,@OPENGL_LIBS@,$OPENGL_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi jasper-1.900.1/jasper.spec.in0000644000175000017500000000406610554235562014716 0ustar ernieernie# Note that this is NOT a relocatable package %define package_name jasper %define ver @JAS_VERSION@ %define prefix /usr %define datadir %{prefix}/share %define release @JAS_RPM_RELEASE@ Summary: JasPer Name: %{package_name} Version: %{ver} Release: %{release} Copyright: Modified BSD Group: Development/Libraries # FIXME: Source: http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-@JAS_VERSION@.tar.gz BuildRoot: /var/tmp/%{package_name}-%{version}-root Requires: libjpeg BuildRequires: libjpeg-devel URL: http://www.ece.uvic.ca/~mdadams/jasper/ %description JasPer is a collection of software (i.e., a library and application programs) for the coding and manipulation of images. This software can handle image data in a variety of formats. One such format supported by JasPer is the JPEG-2000 format defined in ISO/IEC 15444-1:2000. %package devel Summary: Include Files and Documentation Group: Development/Libraries Requires: %{package_name} = %{ver} %description devel JasPer is a collection of software (i.e., a library and application programs) for the coding and manipulation of images. This software can handle image data in a variety of formats. One such format supported by JasPer is the JPEG-2000 code stream format defined in ISO/IEC 15444-1:2000. %prep %setup ./configure --prefix=/usr --enable-shared # build %build #if [ "$SMP" != "" ]; then # (make "MAKE=make -k -j $SMP"; exit 0) # make #else make #fi # install %install rm -rf $RPM_BUILD_ROOT make prefix=$RPM_BUILD_ROOT%{prefix} install # clean %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig # files main package %files %defattr(-, root, root) %doc README LICENSE ChangeLog %{prefix}/bin/* %{prefix}/lib/lib*.so.* # files devel package %files devel %defattr(-, root, root) # no API docs yet :( # %doc doc/html/* %{prefix}/include/jasper/* %{prefix}/lib/lib*.so %{prefix}/lib/lib*.a %{prefix}/lib/lib*.la %changelog * Fri Oct 25 2002 Alexander D. Karaivanov - spec file created jasper-1.900.1/data/0000755000175000017500000000000010554237065013054 5ustar ernieerniejasper-1.900.1/data/images/0000755000175000017500000000000010554237065014321 5ustar ernieerniejasper-1.900.1/data/images/small_16x1.pnm0000644000175000017500000000003410554235561016720 0ustar ernieernieP5 16 1 255 ~}{zyxyz{|~jasper-1.900.1/data/images/test.pnm0000644000175000017500000000051410554235561016013 0ustar ernieernieP2 8 8 4095 0000 1024 2048 3072 3072 2048 1024 0000 0000 1024 2048 3072 3072 2048 1024 0000 0000 1024 2048 3072 3072 2048 1024 0000 0000 1024 2048 3072 3072 2048 1024 0000 0000 1024 2048 3072 3072 2048 1024 0000 0000 1024 2048 3072 3072 2048 1024 0000 0000 1024 2048 3072 3072 2048 1024 0000 0000 1024 2048 3072 3072 2048 1024 0000 jasper-1.900.1/data/images/goldenears.jpg0000644000175000017500000000502610554235561017150 0ustar ernieernieJFIFJKC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222`"< !1"AQaq2#BC$Rb%3Dr!AQ1 ?"4+ǽggc-w"KyqJ܅d<)4 aZPv_;\~oM49*IJPyj@ ,qM\O*YuЍg"wH4[9'U&h@qP_Ld.3pۭl!I(8$xȩa$Ь`d#=,2Is^ek^V?Vȗe힓oBi݆v(۷?քBtߏ¤e ~&5fveS۔~3w>gne ӻ#׏* 3t4fٗΆ-oK ke*&p%Yv=MW|_TtHL כ('w O,4 ; څӢ2]Α O'u5{p\4y _',I$gNQik6-6-㾐e}k,M;M,13~jYI=I _fR _L|?_"bOMY98[mjҀM+Zm?֭]'Ze,() ЎG%"j8e zeZ;7*VWy'%OyVGE;ki걺T2MH?] .VIHlݷxJk sIw'V8.$W%Å +inגNDkW?mT`F叙4 ZNYc pYGr(Bzǥ|λ1^<׊ |O$bz!9BJظ+`>}j0p!'Һ#սTgm2╔2*G1t'k*3E7`O1P1)Li&,_h0hu L:b3SKo#y>䚅ijAJ! nN(=IOPH~)5_v$aǕ\K_L#%D'x9շeczYT Znpb+9;ߏSK%^Nǵ=28?˷3V"NysCnHI8VOCC w ~LҢȯbGߜp<Ρ$x{~2GP*A#dĕ>0rr?H-dU~w(j >N?sЙ1]:!Nf-`(<isY+z{g-$W0'FGB~y+ ރH+Mf{Xq<~D1vM#|li8Wk_Ayxalarmc:y a65;Q[y9e^c~W㎢kx/\i4FYw`l`Ե);u:IJp1|VrV%gQ{EfD  #xI+Oq6 Kr =Q\ e@!u{}i2Xh'FV!IAޗ&{ 7XY$WFA (O@{IPt3:?8DAm#g~jsQ@8_h?&'}0("U%1l#nF:懎'w~?hvAL e\3+ųvv*z%`::н2-C-NO#ͅ!Ɲ9CV?ՑE5s}c{nf,n6t*1RY]C2Q*޺ٱxQJni|1ۃCsN) ,V_]^c"R_QӪ o<ÞLQ-݊+2>סte`r׈G&jasper-1.900.1/data/images/goldenears.ras0000644000175000017500000011004010554235561017146 0ustar ernieernieYj`V\aŀ`~gƃcDŽdʄfʇeʈhˉm̊nΉpЍqғyҘ֜٥تث٧פڬڬةب٥؟ؠ؝۠ۡڝۘۘ|ܖyܖ}ٕڗܗwۙݝܙyݗyܖxەyߕݘޜߟߢݤߧߨޮ߮పన߯ާޮ߲ⶮ㷰ᶭ㹱⻳ⶱ亰丰亸⻲弳㼴㾲ⷰඨᵫⲧ߱㲨ᮤ߲ݬߥߤઙএߤߢߜޚߛ~ߛߙݚߜߜݚܙ}ݚݚݘܙݘݙݘۚܝޜܚژٕڗ~ܖ}ڗ|ٔ|ٔzؔz֒|גyבzՒwZ]‚_ÂałcDŽcDŽfɆeˆgʈi͋kΌn΋rЎuӓz՜סئحث٨٪٭ڪک٨ڨ٤٣ڠܟ۟ۛۘۖ{۔}ܖ}ۖ~ږ}ܖ{ۙ}ܙݗ|ݘ}ݖ}ݗޘޛݟߠ॒ݥߩެ߱Შᶮᷯ⵭Ⳬ߲ബ⵭ᵬᴬ⵬ᵪᷯᷮⷯ⸲ⸯ亳仲㸯⵭ⶩ೩஡ިⰥ᭡߫ᯢᮣ⬟ߧߠࡊࠈߜߜߜޚݙߚޚޙݚޙޘݙܛݜݚܘۗۗڗ~ە~ۖ}ڕ}ڕ|ؕ{ה{דzגxגw‚_‚^ą\ƅ_DžcȆdɅgʆeˈh͉h͊iЌmяrӏuԖ~נؤ٫ٰجڮ۲ڭ٨۫ګܫۦڠ۟ܡ۟ܝۛۗܙۘܗ|ݕ{ܗݚޘݚޝߠߠߡߥߧߪઞޭ߰೫ත⺯⺱ỵ⹱⺲ᷯ⸭⹮ᴪ೧಩Შ౦߱೩ᴪ㴪㶮ᵭ⵪⵫ᯠ૛ߩᨔ⯡⮠᪛᭜Ⲧ᫝ࠊࠊ⡋ជច᠋⠈⟅✈ᜆᜅᜃᙂߙᛂߙߛߚߚޙݙ~ݗܘ~ݗ~ܗ~ܘ}ۙݛښڛڛژ~ٕٓxؒxƃ`Ń`ņbDžcɇcɆġf͇h͊i΋jЋkэlҐoӒu՗֟اڬ٬ڮ۰ٰܱݳܱܲۨۦڤۢ۠ݜܜݝݚݚߘ|ݘ~ޚ~ޛߜޚߛߢߣߥߩଝ߮౧൯ත෭ḭḬⷮᷮⸯ⹯⹯ḯᶬ᳨ୟୣᱥದᴩ⵬㷮౪ణ௤ᱧᲨᲦᮢਜ਼⮢ᯣ஢᳦ᰡᯣ᫞⫝᧒᧑ਖ⦔⧑⣌᠊᠈ᢏ⣍ឆᝁែឃᝅᜅᝄߜߚߛߛ~ߚޚޙݙݙݙݛݜݞܚܙڙ٘ژڙؕ}Ɔ`ƇaȆdɈbʊc̉e̊g͋i΋lЋlюnҎsԓv֕z՜ץ٩کڭ۱ܲܳܳڴܱ۪ܳܨܣܞݘݙ~ܜݛݜޝޚޚޞߠޟޝऑަߩଟ૚᭢௢߱߮ᰣಣఢᰤᲦದ೧൧೩೦௢᳥Ყತ᳤᳤ᳩ⳩ⶩᶫ㷯㷯௢ᱥⶪᳩ䵫⵫䵪⭡㴨張㲦௣Ⲥ㮝᧗੘᫝᪘ᦕ⩙⪙ᨗᩗᦏࢌ⡊⡊⢍៊❅ᜃᛁᛁᜀߝߜޜݜݜݝޚ}ݚݚݚݞݡۡ۟ܜۙȇbLjcȊc̉gˋhˌgΌi΍jύkύpҏsՒv֘֞أب٫ڱ۲ܴܴܵ޶ܶܳܰܭݨܡݝޛޚݚޜޞߞࠆߢो॑ߤएߩߪ߭߭ୟ௣ᰢᲦ౥߬᭝߫߫߬ᰝ௡஠ᯠᯢᰣⱢᲢ᳨ⶫ亯ᵧ㸭亱⴪㷪彴伲㵪㳦⴪ᴦ⺮䶩潴滲䷪⵨䳧ᰣ㳧䵩㳣㱣Ⱔ㰥㲦㲥⯞⭝⫚᪘⬖⪕⦎⢉⠊➈ឆ➂➄ᢇᣋ⥏॑ߣߝߝݟߣߨߪݪުݧݤ۟ۙܚ}ȋcɉfˍb̍f͍hύiЏhяlӑrՖy֙לؠ٦٫ڭ۰۴ݹݺܸݺ޻޹޷޷ݳܬݨޥݟޠߣ࣏॓ߧ৏ިުߪ૘ଙ௟ᱤೢ߮ଢ଼௢ఝᰞఝᰟ௛ߪਔ᧒ଗ૚୛୛ᮞᰣⲢⳤ丫㻱㻰乮念澶仳㺰üù弳彴㺯廱弳中㳦ᱣⱡ㳦Ⲧ䳦㳤ⴤ師弯弰䷭⴦㴦㴦䴨⳧ⱡ⮛⪘⩚⫛⪕⦏⧑㩔ᮙᱢᬝ૙৐ࡇ᠃ៅऌ੔ଢ଼ఢౠݯޫޤݢݟܜۙژ{ʌdʋf̌g΍iЏjяmғpҗu՚~סإ٦ب٪ڭܱݷݹݹݸ޺ັݷ޶߹߻߶޲ݬݧިޫ߫૘ଘଚଘ߫ଛ௞ᱡ౟ౠᱡⲡ߰߱ᱥఢଜᯞᮠଢ଼ᮜᬛଛઘ᭛᭟ᴩ⳦㴥⶧ᴧ㸬弱弰㺮伮乪彲⺮彲ü佲弳廳º㸫ⲣ⮟Ⱍ⭘㮜䶧个䶦湫漯庫乬㹫丩㷨㷪㷮个㶫㷩䷦嵩㴦ⱞ䱟Ⲣ᭞⭙㯜⫓⤉⥈᥉ᤉᨑᩎ૗߭߬ߪަߢߞݞݝ~ޛ|ܙܚ|̏ȅgΏgϐiђmҔs֚wם֠ةڭٮ۲ڲڳڱ۲ܴܴܷݹ޸߶ݷ޸߷޵߲ޮ௝ఠ߰ఞ߮߮ଡ଼ᯜ௟௛߯߭ச஗߬୘ᰞⲠᲟⰟᱡᲠᱠᯞᱟⱢⲤᱣ⵨㷪ⵥⷨ⵨㴧乭仯潰彲ⷨ徱·濴徲ļĺ估㹬䶤㳤Ⱡ䳡䳨巪廪丫亭溬㸫漪绬溭湫庭亭澱弮㳥㰡㲟䱝Ⱍ⬕⭖⬔⬒㦎⣉⣄䣄⦊ᨍ᪐ઑ⧊ᤈ࢈ߡ~ߟ~ߝߝߝ~ޝ}ݝ~ݛ~ݛ}͑gϑhѐnҒpԘtԞz֣֝רڬڱڲ۵ܵ۴٭ۮܱۯܱ޴޶޹޶޶ߵޱ޲޲߲߲߳ೡ౟ᯟౠⱠᰠ߯ଢ଼᭜௛⯚⮛ᮛⱟⱠᲤᲣᲡⲡ⳥ⶦⵥ㶪ⶪ㵧丫㹪㶧丫㸩庭庬个漰Ÿ¹ùż忳彰弮潳徲䷩帨漬幫幫个乫庩庪廰彰濴濵帧ⱟ㭙䫒㫓㫐䨌䦆䥈䤉䥆䤄壇変䦇⦅⦆⤃ᤅᣆ⡄⠄ᡂᡂ᠁ߡߠݡ~ޟޞޝޜΒlϒlғmӕtכz֡ףةٮڰڱڲܴڲۯڮܯܲܭްݳ߶ߵߵට߷ߴಣഢ߲ഞಡᲡᲠⱣᲡⰞ⯝ᱚᯝᯝⱝⱞⳟ᳥ⵦ㸧㺫⸫个㸧㹭㹭乪享㺫乩漭弯仰们庬滯丬濳ƽĹ÷ƽù¹彲潳Ļ徱溩漰辱罰濱¶¹¸翳翵濵徯享㷦䳟䯙䮖䯚䮗㭐媌娈姉始䨈姈妉䧇㧆㦇㥇㤅䤂㣄⣈㣅⢃⣁ᣃᣁࢁߠߢߠݠޟޞҒoғnїoԗs֜yףר׬ڱٴڲ۵۴۱ڭܯܯܯݰ޳޵߶޵߷Ṫศ߶ⶩᶥഢಞᱠⲡ᳣᳠Ⲣⲟⱟⲡⶤⶦ⶧⸨乪㼮俲忳濳俳濳潰徴佱亩忳·濳ùƿƽżĹŸƾûĽƿƽµ徱滫辱忱ùżĺľƼķ澲廬帥嶤䳠䰙存氚岜宗䭑媎䪌婊橌媊樊娊樉䨉娇䨇䧆䧇㧇㧆夆奆㤇⦄㤂㣅⣅⣂ᣄࢃޢߢߠޠҗoӗp՛w֠פשٯڴ۶۸۹ܹܷܷܺܺܵ޶޸޹ߺ߹ະ⻲㽴㾴⽲㻱㻭ẪḭṬ仪乬㸨亨㹪㸪㹬仮徰侳¸ýƼǽǾƿƾżĺù¸ú澯彲濱öĹƾĹĸö潬¹¶¹Ĺĺżü÷濱澯廪左嵢峠峟寙孑欑子䫑䫌媊媋檋穌櫉檋橌橋樋婊媇橈橇㩆㩈⨉㧉㧈⧇⦅⧅⥇⤇⤆⤄ᣄࢄޣޢݡ՞v՜x֞{֤קجڳ۷ۺܺݾ߿µ߼޼߽߻߽ἱºĻúûúùøúú·念濳忶¹ŻƽȾƻźĸĹ·¸¸Ĺż翳翱µǺǻż潮ĺƼǾǿȿƾƼ¹漬带䷡嵞岖氓殓䬑欌䬌孊櫋櫊嬊櫌櫋櫌䬌媌竊嫍䬊櫊嫊䫉㬉嫊䪋䫈䪈㩊䩊㩇㧇⩇㨆ᧆ⥇ृޤᦄ㧇婇橆ՠzգ}֥צجڱڳڵ۹ܺݾ¸ùĸ´߾⽳ῳ·ùĹźƽƼƽƼŽƽƺļĹĺùĹĹùĸżƾƼŻƺǿɿƽƼŽǿȾǻõ濮¶ö迯濰濰÷ļĹźźŷĶ´濲翰溩緣淠峝寖寓歐殍宍孍歍箍歎嬎歌笌欎欌筌讌孍孌箌孌毈歍䭌䮊㬌嫋嬋䬊嫉䫈㩌㪊䪊㪋㪊⪊ੋ汌鲎㩇آ|̚tq[գ|֥ש٪ۯٰڱ۴۵۹ܼ߾öķ¶ῲµ·øùĸĹĺŻƺʹ÷÷¶¸¹ķĹùŹĺļźźĻƺƹƻǾȽȼƻȾǽŽĹƺźƽǼ±罪缫Ĺö翯潫缧滨湤淣浟岛泗簕篕气毓毓殓篑殒篐筒筒殒箏篎箍宏箏殎歐殐毋母孏毎殍完孍孌孌䮍䮌䮋䭑㮓䯒䭑⬎᭏갓đstW\GjN@_G;W>7إ|ץب٬ٯڰڰڲܴݷܹ޺޺ຬὫྮ཭໪໮ᾰᾰ㿱´¶ö÷¸¶µ·¶·¶¶÷·øùŸŸźƻƺƻǻɽȿƻ³öĺżĸóŸ³ŷ³转缪约纣淡淡嶡渟湥淢䴛汕籔貕沘氕簓簒谒豐簑篒篓篓汓籑簓氒籑籓汑篒氒氒篑篑寑氏篑篑篑篐毐殒小䰒導䯏㮊᫉汎鰌s\]<2R8/P7.T<4ZC;YC9ףzإ}ڨ٫ڮ۫۫ۮܱܰݱܰޯ߲߮߯೛ߴട⶞㷠⹢⺦⽭㿰²µøĸĸĸĹŸĹúĹĺŻƹƼǽǻɽȼƸ¶õķ羮羬辩³羫羨缥締続級洙糗紗洚浚沗峕泔豔粒沒簓籓籒豒粒籒粒屔貓汗粕鳔籗沖粕籖籕粕沕糒沔泓泒粒粓气籑汐氏屎尐䭏ᫍ對췓ҝ}\EV9-V;2X;/T7+U;0U>5T=4٣u٣vڦ{ڨڨڧ~ܦ}ݧݪܪ߫ߪޫઈᬇ஋⮎⮍⯏Ⱁⱘⵠ⹦们修濱·ùĹĻƼǿȿʾȾȼƹƹƺǼƻö²龬辩缨齧翫迬辩輦绥繢蹢踠趞緛絜絜継継絚糘糖贔贓豔籕糓糖賗賘賙賖純紓洓粖賖糕賕糖嵓紕糖泖洓贓洔崔泔泓糓貔糑岑汒籑岏䯎貓᫋u^fC6T:1Y;1S7.S6*T5,U;0S<3R<4٤z٦x٦yۥ{ڦ|ۧ|ަ~ݨ~ި}ިߪઁૂଆୈ௉⯌㰔ᵝ⻨忰·ŽɾʿɾȽƹķò迬迫缤滣湢繡蹡躡縡鸞蹠鹞鸟鷝跛跙趚渖浚糛紗贕賘紖跜縠継絗趗贗贖絓絓泖贔赔賗贗絔綔赕贕紓浒浒糕賓糓洓純洒泓屓Ⲑ絔ڨbwQ>Y=2Z=5Z>2W=4V:/U9.T:1S;0R;2Q:4٥{ڥ|ۧ{ۦ~ݧ|ݨ~ݨݪݪޫޫ߬ஊᮌ߯Დⵛ伩ŸɽʾɿƻǻƺŸõ迨缦軣軣蹢躞蹟踝鸝踜긜蹛趜鶜緝踛線縝縠緞踘綜淘趙跛跜趛鷖跙緗趕綔赘綖綔鵖贖贘贖鴖緓絕紕渑淔赕綖巖緖涗䵕䴔꺛᱑dnI:\?4\A8[?6W>3W`E;eJ@fJ@cG>Z=3W;1V;3VeH>bF9`E;W=2S7,T;/V;2R:/Q8/P5,P6+M4+N5+L5.L5/M7.M6,K6.۳۳ڴڷڸ۹޹ݼݽ߼߽߽Ύ⿭㿫㼢仞彟弟濣±ŷǷǺǻʾǺǷǷŶijIJ±®êííĴñ§«ë鿞꾠꿝꽞꽚鼚鼚轚黜껜꽜꼚꼙鼚鼜뽜龞齟꾞꾡龣龡꾡뿜齝齝꾝齞꾛龚꽝뼞齝꼞꼜鼝껟꽝꼝辛輝輝齝軛潜ƣᵕ~hqTE`E9cH>gK@fH9`B5`B7`C9X>5S9/U81U;1W=2R8-R7+P6,N4-L4*M3)M4+M5)M6,K4+I5,ٸٸ۶ٸڹ۸ݸ߼޻޹༩⿫¯¬㿥㽢侥徤ðƳįijƶƸǻǻȻǺƺɼɾ˾Ƿijīª¨©¨©îí©¥뿢뿡꾟违龜꽝꽜鿝龜꽝뽞꿜龞꾞뽞꿝뾞뾟꿡뿠뾞쿝쾞뾟齠뾝뿞뾟꿟鿟뽠꽟꾟连꽠龠鿞龟迟漝¤Ü|[G`GbF:_C9^B7_B5Y=4U90T92S91T:0T=6R:3P7.Q7-O7,L6*M6,L6,L6.M7.K60I5/ڶڶ۷ڸ۹ܺܺ޸޹Ʈؽҵ׷ìưƸɽȾ˾ͻĭƱɭɬɲʶԷԲ¦áģɪ¥羠꾣羝辜龞鿝鿠뿢꿟꿟뿟꿞꿞뿟꿢꿠뿟꿠쿟뿠뿡鿢翠徠ǧนo\aC9cE8hL@eI=cF:`D:_C7^B8^C7[@3U;1T9/P3,P4*R<1T=8P:3N7-O7.O70N5-M8/K6/K70K7/I4,G4,ڹڹڻغںۻܼݻí©jmWgSfRx`ÙŮǶ³ɹʶԷŨlnVmVw]kuƣh^I]GlVnTnVm㺛Ǧ缠迟翟辝áá翟æ¤뿠Ÿ¡£¤ãä¦ä¦ģâä¥å¥ääåġĢƨͭtTFaF7Q:0Q6,O7-L8/M7/L7-J4.J4-H3*G3+H3+ܼݺ࿖˜ȞhqM;zTF}WC|XE~YK[J_MaRWDZGqU\DUD]LYF\J[F[G\I\J\JZLZL~XE~WF}WH{YH{YJ[I{XGxTCm¢ǦȦ¡vzhwdnp}ԮƤĥáâģĢäģĢģĤģţţĢ¥ŤţĤƤĥťŦŧĦħŦŦŧĩŨŦèĦĥŤŤŦĦĤģϱȞgF7`F^F=`E:^D:^C9Z@5U;0T:,R7,R71P7.Q7,P8+P:1P91O:1P<4Q82N80N91M:1J7/H3+G2+F1(F2+H4/gsӮظɬ|m~UuUySBzTE|WEZGYF[G^J\L|UGXFZK[JYFXIXHYH[GYF}WD|WE{UE|XGzXEwUCwTDxTExVGzXH|YIxSFhRßںciS{gucnZeQdQeRgQhȦ£ĥŤťƤťǤŧƦƧŦŧƦǤƥǥǥǧũǧǧũũǨƨƨƩǧƦŧƥŦĦŦħĩªŮ˳άwUIbH=hL@bG>bH;aF<^E<_F:^D6\A6ZA6U=3T:0V<2S:.R9/O6.L5/O71P:3P;3O;3M93N:4N;0M81J70I7/G3+K80H5/G5-F3/zS=yS=[AaHvW?mLaG=`G:^D8]B8\C9]B9X@9W@9U<3S7/R7-P6+R:1Q:0P9.Q<0Q;3P;4N;1N82M83K70J6/H5.I60L71J50G5/G4,G4,F3,D0(tRCtS@vUCqRBoRApR@rSBsTCtTBuSBvU@uS@uSAwUAyWF|XJ|WE[M{[I~WDYH|WGzVByVE{UEzUByVJ{VHwUEqRDqQDpQDoREnQDnQAqQArQArPCpQCpQCpQDsREtUFyXJ{WJ^NgPdTfThQfQgRgThUcQv^̴ǭȰɯȭȫȭȬǭƫİŰĮĮůůűȸʽ̾̾ʾʼʺɸȵɵƳȴҽϱvWI\?4eI<_F<]E;]D8\B8]B7Z@2ZB8ZB8W@5V<2T:1P7.R9/P80P8/O91O;2O=5O:2L80M92K71K80I6/J7,K80H60G4.G2+E2,F3,D1+E3-C3-pRBpR@mP>nO@oPAnPCpRAqRBqR@sRDtSDvTBvUDvVDwTEzWGyVG{WHyVEzVC{XGyUExUExUEvTDyUDuUHrTFkSFhPFgNDgNEiOFjQCjPCjOCmQAnRDmSGoRCoSEqTErQAqREsSEuTC_PfQdOgTfReQgNfQhSfRu^ֵжȳDzȰʮɭȬǫíűĴŴƵȹɼ˽ʸȷɴɴʴʵʵɳѼθycG<\A8bF<_E:^E:[E<\C7[@6X@5X@6W=3S<1W?5U;1R90R9.P80O:3P;5P;4O<5N93M8.J5+J5+J8/K6.I4.I6-I6-F3-D1+D0*C/(C1*C0+D2*D2.lN=lPAlQClP?nP>nPAoQBnPApQ?pSArSBrQ@uS@uSBvUDzXGzXHyXFyUCxVCxUFwTFvVBwSAwTEpSCjREgQEfNCgN@eMCfNEgQFjRHhQGgN@fNAiOAlSHmSFmRCoSCnQCmPDpSCqREsTH^LdOcOdPcSfOdOdNhQeNhPŤȭ̷̵ȳɵʵʴʴʴ˵˴˶Ͽ͹ͺ̹˳̵˵˲ȴɱɰDZҼ£y]K[?2`E5T>3Q8-Q7-P91N:3N;3M8.J7-I5-I3,K5,I7/G4,G3+G4.G5/G4,E0(E0)D0)D2,B2-B0-A/,C1+lR?mR>oQ=nQ=pR@oRCpQBqSBpTDpSCqR@oQCqSCsTBtUDvVGwWFzWE}ZJvVGuUGvUDtT@rSCmQDeQEeOBfK@dJ=eL=fM@eK>eK?dNBdNDeLBdMDfOBiOCkTIoWIsVKrTInQEnPApREqSEpSDxXEbOdPfOdPcNdNcLhNgTeQpZhĮϼɲ˵˴˳ʲ˴ɲʰʯʱʳͻϾμɺȸǷɺ˿˾ŸdE5Z?1aF4U91R8.O4(S:0P81N7/O92M:.J4)K60I3,I2*F.(H0'F1'F1(G4,H6.J81F3-E3-G4,G5.C1-B/)C1,C2-D5/B3-@0,)-'(-(+/+./,/0.10.54/;51H?5J>5_L@UI>[I?gRFjSCqXCqTEy\MvXEuUCsRFnREgOAdKbI?aH>dI72:2-;40<<7EA^LAjSJrVKsWKrWJrVF_NdQcKbNbNcMeNfReMiSbNv`ϴʹ׺ѮҩֽĽո׻д˦ÏsigŠnċj‰n‹ggn̜qiI:_F>bF<^C9\B:[A6Z?4Y@8X@8Y>2U=4U<2T:2S;5R;2Q8-O71Q82P9/L6.K4+K4,H0*E-'G1&E/(F2,G3*G4-F2,G5/E3+D0+F70F3,A.(C1+D40B50A3,?1+?1,A4.382.0++)&*,(+**-.**,')'#*,*,-,13201.22-550<61B;7B<7MD=XH@]K@[I@`LBbJ?bMBbL?cMAfNBdJBcI>cH;_G4->73=72=:6@>\KAiSEsXGuXF}^LdLdKaLbHcJcKdLdMgQfRjU{Ҧ͞ОΠΡɖzn‹lÊjčpŎqōoŎrŽqmlkčmx^lN@`F=aE=]@7]E9ZB:Z@7]C8W=4T;3W>5W<3T:2R90R:0Q:0Q:.S?6Q=3M7/K3)J6/H1(G1(G1'K7+J61I74H62D0(D0(C0'C0&C0)I92F71C2*A0*@20?1*?4-C83A3.A73,0,)+&'%$++()'#+)'.,+-)).+).,(.-+1/+21,0/-.-+-/+/.+02.12.210341553@:6EA:B<6KA9C<7?;8:74;63:75;88;98:62=84>:6:61;73=84=64=72=30=5.942<63B94PC;eNBpVH}^NbNcOcObOcIdMeOdNfRfQfSkəyvgegnqnklfgc~c~c~dlT`F:\E9`F<`E;^E>^G=^G;]D:Y>2ZA4ZB8U?4VA8XE>YE9T95@<8=84>70O?9hPGz[QaPcRcNdOdPeQfQeQgQiTiX|bc~cacbdd{`mUkVlZmXr[tYhThJ@_D6bH;`F;`H:]G=^H>^H:[D8_G>`ME]H>[FZGVG>UD9SB8SB:O<2M90L81M;4N=7I7.H4+G3-D0)B.&G2*E1*D0(E4,D7/D81F<4A3.?1(3+<1*8*%*%%)(&*,)..,)((((%*(%(#!(%")%&//.+(%.,*-+)1..1.-21,,)'*'&-,+//0-++,($+&%-)'/+)6412/+.*'3/+41)5-'61-50-73070+82.;616.)6/)8/)90-90-<63;42?94=3,;/)@:6KLGHJGA<8B<7C95gPGx]M}_NcMdQeQdPdRfQgQhRgRjTu]|b~`{\|[z]w\kTgOfTdSdQ`KvVCcI;]B6Z@4X@6ZB7W?2U@5WA5UB8WD;WG(#<(#>*%A1+=.)B2+;*#8&$:($?;D;8mTGsWKz[L]PbPcOeRgSfShPlUiTiVn\r\x_cvZlXmXoUmWmWmV_J}XGvRCsQ>vXEtU@tQ?qO?pN=qN>nN@mN?nN?nN>lI:mJ:lK=kKnN;sQBpN@nM=jL:jL:iL:jK:jL8hJ9#!#(,($&#()($##%#$*+*$ " )(*&*)$##%%%**(*0,(*)# $! .20-33189-.,-.,,)'210578;<;;9:>=95;21A;8B96NHFNJEMC=PFAULCSC;XHB^QJ\LEaQGeTLgTIiUIlVLq[NqZMuaRx`Ql^p`t^u_yb{b}ec~edhhgkkjmhjnlmljklnliiiikgigecea|^y\w\u[sYsUqUoXoSnRmOlQkOiNiMbI~^GeIbGaF]E[E~ZAzX@uU@rR?pQ71>71F=7NB;F8/K;3K<4L>5UH?ZJB\LC`LDhZNmZSoXMoYLwbZv`Uw_P}eZ|bUhWj[n]sbthpbq`m[r_vau_zg|e{h~jinolqqmlpommqooqpqsrqrtrsrttvusutstuvuwvvvtxxxwuqqqpmfdd}^z^v_s[qWoUlQhOfJcK_J]G\E^FzWDiM4R<1P<1uVtUwYwYxXz\{]y]x\w[x`xaxbw`zay]di}ioonki|jn}i}k{j~i|iyi|e}hyeoljkontxurnoqnqsptsxxyyš{Ĝ}ŝ~ƞǡɢɣˤˤʤ̦ͥͦ˦̧̧̢̥ʥˡˠɢɠʡʢʢ˥ʠǞŞxwspjha^{]qWsWmQgPbMaI^G}\IsT?qSBtVCrRAlO:kO5T?1I5.K7,J7,H6*F5-F4-B2)xXvXyWsVyYz[w[xYs\rZsZs\t]y`u\r^hgmihl~h~n}k|o~llmkm}g|en}kl~g}f}glpqtokxb|e|d|dl}akllssvv|Ɵ~ş}ƣǤ˨ϩͩΩЫ̨ΪϫЭϬΩ̧ͦ˨˦̨ͥͦͨʦͧʦȤ›zytpf}ay[mQhKfKeN~_G}]ClP>lR@fK;fK=mQ@gK<]C6bI8\C6\E5_F5S?2O;1L8/P>1T>/Q;4I60G6.C3,B2*B2,A1'F4*C1)<.(>0*>1)pZtWpUrVuVpXu]vYsXnVgRjTdNlTlVs\s^t`}hlgkn|glp~j{ikjnm|j|h~jk{iyfppsmmtlqr|h}d{fkoqsrpxz›|z|ĞĝǤ̩ɣʤ̨̩Ϋ˧˨ͩʤʤ˦˦ɥʦȢȢʤȣʦʦ¢Ġvxqi{`v[uYqWcKaG_H{[FvVDmR?kRBdJ:gK=dI:eK9V@3^G6XA3UA3V@5J90UA4V@5N;4T?5S=3G5/D4-H9-I9/H80I8+C2*A2,=0(<.(:-)tYuWtVw[w[uUrVmSfM}bLkTkQlThSlRs\xbybk~k}fjgin}i{dol|j}k~kmloo~jmmmrsvprsonopoomospu{zzě~ğ~Ğ~şƟĝ~ɥʤȡȣˤ˦ȤʤɤɤȢȡɤȡɢȢơ~ߜ~w|vnjhvZoUsWvVgP`HeLzZGpT@pT=lP=fM;fM;`G7[F7bHoTAlQ?qT@dJ:aG;]G7kO>hK:YA2N:1E4,E5,Q>1P;.J8-N<1S@3P;1C2,K:.M;0K8/C3+A4,vTiM|_JsUrSkToWs\uXz^Hz_K|^MbMdM~]OkYt^{ezaMdQnZr\r^~ip\z_On^jVjSHy\OvdfVj[|eq^jZj[uc|dyeuam}b~lmm|ihzcomj|biqmprwvuÞ|Ş}œzĠÞş}ĝĝ~şÞ~Ý~ƠŠž}şƠßyœ{y~~{vyvqncei~dvYjQhOhNkS}\Fw[EcHtVAz]CxXBpR?mSrU<_F4Q=0`I8ZC6\E5S>1I8-J9,J9/D4-{]JhQoQ~eIfNhQ}aMw]G}`MdNgLu[JrWEeNu]x_nXt_{dv`jWu`jmZp[hXuc~izbSeVwb{cTy_Tl[lYoYGfQFkTHgU|cNkWnr^~knx_wdofihe~cnomuotvotyw|{ŝĝĝƠÞzÛ~ݜ}|xxssvptswtnkfef{\qTuZtWfNeMhNfMfM|]EsV@oT@uWErU>}]GxWC_D8dM;hM;bK9gK;YC5cJ:gM=W@3R=2[F6VB5R?/\E7P<3J8.D6*C4+jOiOoQmM|bJx\HpVkP~_IpTbInVBoWF|_MoXnUiRo\|fhUkYrmm[fVqYIdSgWkYp_savbn]j^{bUw^Pv_RdVyjt`weqlzdlXeTybv`x`w]r\s[jnmvttwvpuxwvvà|á}||~{Þ~}{tvvqxxtuxtvsplhdg|a}`{]y_pWnTqWnWjOeM}_G|^F|^F~]HvZCuYAz[DyZBqT@gL=lS?lQAgMiN>fM:aJ9cK9gN;eK9dL:dM>^G6[E5xWzVxTpTvXtSdJ}cMbNhQ~aLkRkSgPeMaLlXs\xco\se}gzfo_tbwemYiVvbq^s_xc{g|m}lzkqdgVkXo^~lqkdwa|bjnomiyaeuunkpvtw}xwŸ~xv||y{zvw}zqrxt {vmmliji{[xYwYwYrVqVbKgMiSiOkOz[GpSAeN={`FbJqT?oT?nR>jP=z]HnR>gO=mSA]I8`J:bL:ZE6UE5WD4I8.E7,TC5aI:L:2qVqS{cIw]HgNrVnShP~aLkRw_IpWDw]HhSx`KlTG|]Pxdjhm[t`{elkrczg~jqzi{g{kpbr^NpYJxbRpZNt^M`M?hRCubr_o\}ipu`vew`~elizgjjdzadquqovvsyvy{wzy}vx|y}}{kbW`trqlkoi`egt^sWz[uXaLvZG}`GhNgQbJnUBu\HoVDeMXC5cP@vZFU?7N?5YF5gO?iP>^H8[H:YF8H:3H:1K<0E70M?3aK9^I:v_Ez_I}cNy`JhM~fIeMlSgOiPtWmZo[kRkWv`{hqzdg~fw`zg|kp`r\Oqfmyev_nZzeUj\r`xeiXm^n[|eUtcjf~hijxckXjViSx]|do\wat\u_ipnknnlnt{xxz||{{{Š|v{}w{|n_*(4=HUi|xsm}du[lhu\w\uYgRuZqXgRiNgOgJv[DpYGfP}]KmUBnUBjS?v^HuXDfN;]I=^K=lU@hP>WD9TB5Q?5N=3XE7YG:P>3N@4`Ls[Ir\Jt\IlVA_M;fSBfOAI<1TF7^K92B=5>94=94wfK~hPmSsUxXrWoXnV|hTxeQ}hUzjUxhU|l\}jX}esap`ta|i{g}j{it`xh|m}iqxvutg|i{t|imu}kvx{o[o`yfwjorros{w|h{fj|d{dpozfvbzfzhosmr}ju`i\M&%+>@J:BKJP^W^mDKY6>I ()3efwhYT815DU_TgsN`nZj{xdhmva{jUo`Rg]LpcPwgQp[vc}jX|fWjXLbVEn^Jr`KgYIk]LnTkTweQzjRpXq_LcVFRI>ZRAND;973WPCn\LhYJWKA`UDj[HhXGmLvfJucNnTxePraOe[I`XGm^PwfUziSxjSxhXn`q]zg|k|i|fzd{cp^q_yjsd{h{gscweyj{m~s{jq`r{tuiwe~orkkq{ktvrl|fs`nomtcwgxo^tj\{o]}isrptcyo^xfrNE;",,3$%89D7;C /2:KRaʹyxyʮ̪qw_pdUndTq_wcs_kXr\lX~jTmVwdPraNs`O~jT}jV{hQp^KgVJk[Jo]KxfQxeRt`NbSHfWIaQGRI@PJ;WK?SH<`TFPG?D@9TG=vjRsfQsfPufQ~kTrY{]w\whRyhVwjXtfUrdRwhXm`l[veijrpnmsp}hoyozlugsgshyl}s{n^~p]zhrg\te]r`rrotdxhyeovvmnnrbtf~g~gmryzxvqpkryxj   !% -07>BL[cv{߾եƿָopTzgUxchvaoWrYoZmXsWmUsbUm_SvfWvePrcO{nZnU~eQq^Mp\LjYKaRFXLA]RCVPC[SC^SFZNBNE:LD=H@9;91B?6qYpZpYzhSnVu\q\}mY|kX~pZrfVvjZzl^xjWxiV~lZ|dzcubprj{k|oavgjxiprzky{psesducsmylZyl[ygqcrazh|g~ipu}w|mteveqzv}g{emlydsc{n[vbsvnvxti[L     "$,'(03=O~Ȥȡɮtoig`PscOqWzayanX}kV~iXsbSgYN^SHk]Mi[IdXHnbSn]{hVyhWp^OgYGbXHo_K|kRp[zfUo]Nq^Mi[G]PCHA:ZQ>p]KkPkSrYoXpYybs^~nVlV}lTdYHn`PtgVziWr_|k|j|kispovr{j{j|l~pdthvfput~myh~kyjudtepvugwirsuvvgnupott|nuc~nyiravgzm|mprvxwvql~jLF> $),5 &=EPcouDZȡ{|lyiraqdR^VFi]MteRzhSm^L]TD_VGeZNaZNi_PpaTyjW|kYmaSh]R_WH^SF[QD[SEZPFVOGPM?SK?HC;{kO|kRpUrTqWt^tZt[tYvhPtfU}o\xc}hzi{fu`whZyjZvd}mq{kxjzjwdrgqsxk{mvdr`{j|sdsj]wm^rhZxm_whs}op}o}jzjwjswqtsp~houxw~m{sbxhuyzwtq}n~tdvdpq{iaT    ')07)*/"$'/3<6;HGJ\Z^sbfwqu{tzq}nzjunbkdSjbRf\MqgQyfRi[Mn`On_Oh_MndTreV\XOMPE`[Li_OmbUc]P{jW}nVzkT|kV{lU~p\q\tawlZr]wcve}qbratb{m]|p]zo^zoawew}mtdzksuswkscuiugwm]oeWiaT\XM\WFmdUwjsp{kvzzixgveyk~mxj|jj{k{l~nzj~mstvwuvtuwvv{|zwzfSH   &*2!"$)')2,.:"!+&'225>?@KFIZdh{|rwrwy|ɮz{ztuolibWYP`[Qf\N_WIKI?AC6UN@`VIj]NzjW}oZznYvlXvjVwgRmXvbynt|ozn{oxm{qbyo`te{hrvro{nvl|mzkwkqdvjxbweufyl^}pb|ra~qd~oaviugsfrhte{ixh{j|hlziucvhtevf|oyk~o~lklnopsuuvp~nr{kzkwj~xkge=C? #    $#,0<69F?HU@KV27=&$,*,4AALKMXsymsirnr~ǞwzzvwtokivfTwiUpeSsfVyjVxcJxbLo\Mp_R{hZ~payoftetf}qeuesdrfZvh[vm~pwfxm]sk_ynczn`}la~obyj_sgZwk\~ra~qfvkymug~ocl^rc}pa|mapgqarc~nc{nh|oixhvfxeuh~titm`~se{qarl[wmb|pcve}nqpzk|kxmyo}ukaXOxhqVNRdcm|JIO  "-$#  (+,528BAEQ58E,-5;>H.1:34;56@:;C=;BEDJ<AM//7#" '   ((.    #%+*)3&%.&%+..3>>D308,).32:10<45?:;F48G48IW_nOXi[fyPXiIQ`S^q\g|GRdan~bjSXjEL\MUaV_q`hzdm}`hzfm|xmZzo[tkZrj[ym^xp\um\wn\uaud|q^ym^~qcwm^siZzqcxmbud{hvk`[QMG@EJ?ELAGE;C@6=504 $%&2-5'$,3.61,4:/5td]XTF:;@23:<=D;:A24:-,2427>F44=/24>>==>ADADWKGq[P`UK %!'"$!!&&$+(&*$"',(.96=88?JFKFDK05<,8;GIFzqfzr~vxuu~jbW    B>C[XcUVa "&                *+0%&* & $(,5+0:6si\ofWqgVvm\qhZphXri]phYuj\yn_xn_tiug|pdznaqdnfXsfYyi_pdW^UMD@730*963998AB?DIH:ED8AAFGFKJJZTRi`Xl]TvbUgWJ $'*.1*04',0$&(*+222;GFR[\dDKL2>?9ECed\o}q~tst{nr\WN                   "#(#!)!     odXsi[}p]|o`{o_|p^yn\xj\}p`wi[{l_qdWqaS|kbtn{t}t|vqyx|xutp~z{xqpkca[TWTQWUSUVOSVNda\bcZsnk~yr|wpvnqe^LHA6:77AA=CC:C@;DA=FE7@?9@=/74'.+"(%!                                         lf`lgZjeWcbWfc[cbVcaXhe[je\ng]jcWe^QZVJYQH[RFWOC_SIrf^zpj}qj}xsxtrvqn{tnxrmzso{wq{vmvrloli{unwmytkwql}to|uxvkZa\W^[U^[]d`djehnffkcejdage_dc_e^edbpkjwrm~zuyzuzyw~||}}xyyxxvu|urrlk\ZYIHE@=;=50:2./(" *14                                          Z]iUZ\LOKTWU[]X_]Xfb[lh]jh]jf_ie\khapkbuldsnermfrngtqjytlwtkppkrqjvumppjopjvvo|yv{ytx{{qovnvwp~yz{{zzqxvv{wx}zv~wy}w|~xzzwoummqmtsozyrxyrqsltrovtnurjzqxq}tj|pglfZ]VLTKDRHAQG>E=7@94<64622 "*)/3 5BFOgqoepq                                   UXeMRY89;KCF]QTdXYjb`je`oj`pnh~~}kicuoiztjyqkytpzun{s{xq|vw{{t~zv|y}{u{{w}{w|zx{~yz~{~yv{st{ux~yw}{xx{|{}v|umtnhmlqrpqrnzwr}q{um}wowsjojesmftnhtla{ocwh]peXjaTaXOZSINHCTOQ=:: &&(-/"$#"! "$;BIBP[q|snw                  SOX[]ea^Z\UKaVQe]Wlf\pjaSNMPIR{ub^bihfmnjsojzuo{xpyvlzvq{t{v}w}w|zyvwwt~|xzz~x}}y{z|}~~~~}|yy|u}zy~zw{voupntnmplnpoyxr~zr}xowp|ws{p|m|zm{q}n~ui{sn{tmqnhspklg_a\TVRLXXNKPL9A:5=9184.56/68;DD=HG>GF9BA6==275(-.#('"  "!##"               \`a\ch_`]idYicZng\a]S:;;%'*HBK]YZGBLkaduphytq|u|tzuzw|yz~|yzyrz~~|}}y}}zyyv}|{}}}}}{~{mlp~~z~xx|uvwuuvqrsqpsputsuvtntqrunvur{xt}uvt|uxwnwtnvtoyzvyz~~wvyrywr|zuinlWb_P]YM]XM\UKYWI[XP`]KZZJWRDPO>HE=GB325SLRVUVKIL_XXoggzvp}t{v|vzx~||~~wz{u{{~~z{|x}|x~}w}{y{xyvvutqvurvvr:67rrwy}svwakggmjkpnjrmfpjdnjirnrvqyxqrvposowwt}zw}}rw}x~}u}{qxvjvsaok[nh]pnevo`soWnkWnkVkhRecM``KZXGTRDRQCSSETQETQBML;EC2<8)2."('"#!%$'%+*!2/%52+95;E?OPJOPIEF?KM@?>6    263?>=^TLRIEPJFSNLYSQXSQKHGDABLLMWWTfecrnkvplwtkzws}{u|t{~v}{v}{~z{|yv}|{z~y~x~wotne:74ddrut{~szimvxejkipmiqmnvrksmimmosppvnputsxwz|x~|wyxw}}{{~zxfuvizyq}o~g{|g{{eyw`tsXolShhQfcOc`Mb^I[[H]ZI\XFVXCVUGYVFVT@QN?PMHF2=:'10 ('#!  !$!%$'%)(+(!0,"0-,833:75<;HLE[XN_\Rb^W0,+\_TcbZkg`oibnkcljagh`deaghdgidonipqmpqmrtqwupxur{wrssolpnpqnsrqsqmomlspopokOQT>CB85:zU^^dkq~~v||Vb]088GBJPKK!,'.~yOKLPJLF@CB=@JFKQMO^[Zpkjrts}|~}hzzk||zn}~duwfwtjzwm|zYrqQmkYst`yy[vuYqrVrpXsrZwv[xv\vvYtwXqsUlnWpnUmlUmkXnmXnjWlgXliQebM]ZL]YESR?LH9F@7B>)20"! $ '#(%(%)&"/*.43EE>SPG^XOLFASUTX[Ued]dd`hh`ijbijeijcgickljllkmmjppputotqonokoojpomtqpsqpsrmyuqvum{xp\ZV&%';<@?ACQJSy{{X[_ikslls[`\E@@)(*KDMdbfPORDAEGBI[UXmhewsp}}{uvzvqs~l}j{|arq]oo\qqRlkOhjQihYrrYtt\vu\xx]zz^zw\wuXuuWstVsv[vu]zx^}{\zv\vqYsoXpnYmjWliRgdQebOb^Ob^Qa\IXV;;LXRS[Wfd]fe`dd^ddadeebddfgdjjdjjfnkhjjksplzvlvtmyuqwsrtqnsonyvmyuttpoxqjBA8/,1439 659?@FW_eV]`chp{gfiAA@ 4/9JELJFJMKPnlq~{zz}~pneyzbyv]utWnqRjkNfgG__JacTmnVrrZvv_zx]z}[yz_||b}|]xy_zy[vwZtu[wvYusYusZtpYroWpoVmmUjiRhfK^[DTO2@=1<9-82+4-*2-*3,*1,1=6SdXXf_5@>(0/$*& jasper-1.900.1/data/images/goldenears.bmp0000644000175000017500000011006610554235561017147 0ustar ernieernieBM66(`m m MZTJXTSZWZ]ZX\[^a][`\`b\df_edccdeadd^acfegjigmjjrmmxrpxsn{towsqolkpkkwplfbZ385CCKGNV@EJYYe{{bblOLUZY]SXW59;!&&')+XUVjkhy{y~|{yzk}_yu]xuauwWqqTnlRiiOicKcbNeeQkhUnmVolWrq[uv]xx^xyZuwXqqTpnSnlTnkRmlWpmVmmUnlSljRmhTlgQfcLa\@RP;IF4A>2@=1<9-82+4-*2-*3,*1,1=6SdXXf_5@>(0/$*& LXRS[Wfd]fe`dd^ddadeebddfgdjjdjjfnkhjjksplzvlvtmyuqwsrtqnsonyvmyuttpoxqjBA8/,1439 659?@FW_eV]`chp{gfiAA@ 4/9JELJFJMKPnlq~{zz}~pneyzbyv]utWnqRjkNfgG__JacTmnVrrZvv_zx]z}[yz_||b}|]xy_zy[vwZtu[wvYusYusZtpYroWpoVmmUjiRhfK^[DTO;;\_TcbZkg`oibnkcljagh`deaghdgidonipqmpqmrtqwupxur{wrssolpnpqnsrqsqmomlspopokOQT>CB85:zU^^dkq~~v||Vb]088GBJPKK!,'.~yOKLPJLF@CB=@JFKQMO^[Zpkjrts}|~}hzzk||zn}~duwfwtjzwm|zYrqQmkYst`yy[vuYqrVrpXsrZwv[xv\vvYtwXqsUlnWpnUmlUmkXnmXnjWlgXliQebM]ZL]YESR?LH9F@7B>)20"! $ '#(%(%)&"/*.43EE>SPG^XOLFApm^he[a`ZieZjg\ie_if^jf^mgclhbkifilfklilomnrorrowwrwwnvwpsunrurptpsuowtsyuxtrpSOO`XclrpJKKHF2=:'10 ('#!  !$!%$'%)(+(!0,"0-,833:75<;HLE[XN_\Rb^W0,+3..OKF^YSaZShaUeaZkc]f`X_YT]ZTda^gfcmlhrpkpplrqoopllpjywszwutvrptpnqqtvszxw{vv}|~|zw}zytoomhjtnqrnnojgzkcTMC=6AzxswfeqLFNd]c\\alfie`dabefjijljYY]}vv~{|~|~|x~|swzvp~cvx[sr]usYpqSkjRkjZqpZrrXolSliRihOedNbbOdbMb`L`_NbdNbdObaJ]]HZWAOM7EA0;9&/,#!" %$(%-*!/.+75.<9(:71A<;FBBKHUXR^^Wb`Y[ZSPOGQPH1//263?>=^TLRIEPJFSNLYSQXSQKHGDABLLMWWTfecrnkvplwtkzws}{u|t{~v}{v}{~z{|yv}|{z~y~x~wotne:74ddrut{~szimvxejkipmiqmnvrksmimmosppvnputsxwz|x~|wyxw}}{{~zxfuvizyq}o~g{|g{{eyw`tsXolShhQfcOc`Mb^I[[H]ZI\XFVXCVUGYVFVT@QN?PM325SLRVUVKIL_XXoggzvp}t{v|vzx~||~~wz{u{{~~z{|x}|x~}w}{y{xyvvutqvurvvr:67rrwy}svwakggmjkpnjrmfpjdnjirnrvqyxqrvposowwt}zw}}rw}x~}u}{qxvjvsaok[nh]pnevo`soWnkWnkVkhRecM``KZXGTRDRQCSSETQETQBML;EC2<8)2."('"#!%$'%+*!2/%52+95;E?OPJOPIEF?KM@?>6    \`a\ch_`]idYicZng\a]S:;;%'*HBK]YZGBLkaduphytq|u|tzuzw|yz~|yzyrz~~|}}y}}zyyv}|{}}}}}{~{mlp~~z~xx|uvwuuvqrsqpsputsuvtntqrunvur{xt}uvt|uxwnwtnvtoyzvyz~~wvyrywr|zuinlWb_P]YM]XM\UKYWI[XP`]KZZJWRDPO>HE=GBGF9BA6==275(-.#('"  "!##"               UXeMRY89;KCF]QTdXYjb`je`oj`pnh~~}kicuoiztjyqkytpzun{s{xq|vw{{t~zv|y}{u{{w}{w|zx{~yz~{~yv{st{ux~yw}{xx{|{}v|umtnhmlqrpqrnzwr}q{um}wowsjojesmftnhtla{ocwh]peXjaTaXOZSINHCTOQ=:: &&(-/"$#"! "$;BIBP[q|snw                  Z]iUZ\LOKTWU[]X_]Xfb[lh]jh]jf_ie\khapkbuldsnermfrngtqjytlwtkppkrqjvumppjopjvvo|yv{ytx{{qovnvwp~yz{{zzqxvv{wx}zv~wy}w|~xzzwoummqmtsozyrxyrqsltrovtnurjzqxq}tj|pglfZ]VLTKDRHAQG>E=7@94<64622 "*)/3 5BFOgqoepq                                   XXbba\hgZbcZabYcd\fdZff^fe[fd\if]db\je\sj_ph_tl`ph\mcVqe[ia[sjcvngvmi|ulxrlztmsrozwr{zt~ywwrzuq|u|wptqmxupzvovwqdofkqmuwqqvmntlqtstuplsjlrirrmprkikhomhxrm|uk|un|wqzvo~wpupkhcab]\b\VOIHD>;=50:2./(" *14                                          lf`lgZjeWcbWfc[cbVcaXhe[je\ng]jcWe^QZVJYQH[RFWOC_SIrf^zpj}qj}xsxtrvqn{tnxrmzso{wq{vmvrloli{unwmytkwql}to|uxvkZa\W^[U^[]d`djehnffkcejdage_dc_e^edbpkjwrm~zuyzuzyw~||}}xyyxxvu|urrlk\ZYIHE@=/74'.+"(%!                                         odXsi[}p]|o`{o_|p^yn\xj\}p`wi[{l_qdWqaS|kbtn{t}t|vqyx|xutp~z{xqpkca[TWTQWUSUVOSVNda\bcZsnk~yr|wpvnqe^LHA6:77AA=CC:C@;DA=FE7@?9@=?9ECed\o}q~tst{nr\WN                   "#(#!)!     mgXsiYtjVqhVwhZqhYqg[yk]mdUmdWyn_wi}rdsg|qevj_qgZvk]xj\PP@$$"  %#'-'+.%(*0398>=/24>>==>ADADWKGq[P`UK %!'"$!!&&$+(&*$"',(.96=88?JFKFDK05<,8;GIFzqfzr~vxuu~jbW    B>C[XcUVa "&                *+0%&* & $(,5+0:6wmZxnYvlVznZyoZujZ}paxdtcvdvdwn]|o_sbxfykwfvm^uf6:0.'-5,0.'*! %('(.-4&&,)'-p_\_\R @:@MPV11955;54;**0 &+(-C@J?=FD@GB>F44;C=;BEDJ<AM//7#" '   ((.    #%+*)3&%.&%+..3>>D308,).32:10<45?:;F48G48IW_nOXi[fyPXiIQ`S^q\g|GRdan~bjSXjEL\MUaV_q`hzdm}`hzfm|rfTlaQseTviUjcSg`OkaQtiYqeWwgXylZ|o`tbp\}m[xhVyk[~oawk\tgY}oc}pd|sc~rdwi~rgzqfxiwf{lr|lxiugzl]yiZaTNZQTe^bjcifah`W]bYaWT`65A;6?NKSWOSqd^{n^vl\xobsm^{pbsk^sl^xocsl`tn]wn^vl`yssoh`jh]yrkxk{kTMUKLP+-634ATQ]   !"&02=+.4%"#-'%,00846=89C9H.1:34;56@:?@KFIZdh{|rwrwy|ɮz{ztuolibWYP`[Qf\N_WIKI?AC6UN@`VIj]N{kO|kRpUrTqWt^tZt[tYvhPtfU}o\xc}hzi{fu`whZyjZvd}mq{kxjzjwdrgqsxk{mvdr`{j|sdsj]wm^rhZxm_whs}op}o}jzjwjswqtsp~houxw~m{sbxhuyzwtq}n~tdvdpq{iaT    ')07)*/"$'/3<6;HGJ\Z^sbfwqu{tzq}nzjunbkdSjbRf\MqgQyfRi[Mn`On_Oh_MndTreV\XOMPE`[Li_OmbUc]PkPkSrYoXpYybs^~nVlV}lTdYHn`PtgVziWr_|k|j|kispovr{j{j|l~pdthvfput~myh~kyjudtepvugwirsuvvgnupott|nuc~nyiravgzm|mprvxwvql~jLF> $),5 &=EPcouDZȡ{|lyiraqdR^VFi]MteRzhSm^L]TD_VGeZNaZNi_PpaTyjW|kYmaSh]R_WH^SF[QD[SEZPFVOGPM?SK?HC;qYpZpYzhSnVu\q\}mY|kX~pZrfVvjZzl^xjWxiV~lZ|dzcubprj{k|oavgjxiprzky{psesducsmylZyl[ygqcrazh|g~ipu}w|mteveqzv}g{emlydsc{n[vbsvnvxti[L     "$,'(03=O~Ȥȡɮtoig`PscOqWzayanX}kV~iXsbSgYN^SHk]Mi[IdXHnbSn]{hVyhWp^OgYGbXHo_K|kRp[zfUo]Nq^Mi[G]PCHA:ZQ>p]KvjRsfQsfPufQ~kTrY{]w\whRyhVwjXtfUrdRwhXm`l[veijrpnmsp}hoyozlugsgshyl}s{n^~p]zhrg\te]r`rrotdxhyeovvmnnrbtf~g~gmryzxvqpkryxj   !% -07>BL[cv{߾եƿָopTzgUxchvaoWrYoZmXsWmUsbUm_SvfWvePrcO{nZnU~eQq^Mp\LjYKaRFXLA]RCVPC[SC^SFZNBNE:LD=H@9;91B?6mLvfJucNnTxePraOe[I`XGm^PwfUziSxjSxhXn`q]zg|k|i|fzd{cp^q_yjsd{h{gscweyj{m~s{jq`r{tuiwe~orkkq{ktvrl|fs`nomtcwgxo^tj\{o]}isrptcyo^xfrNE;",,3$%89D7;C /2:KRaʹyxyʮ̪qw_pdUndTq_wcs_kXr\lX~jTmVwdPraNs`O~jT}jV{hQp^KgVJk[Jo]KxfQxeRt`NbSHfWIaQGRI@PJ;WK?SH<`TFPG?D@9TG=wfK~hPmSsUxXrWoXnV|hTxeQ}hUzjUxhU|l\}jX}esap`ta|i{g}j{it`xh|m}iqxvutg|i{t|imu}kvx{o[o`yfwjorros{w|h{fj|d{dpozfvbzfzhosmr}ju`i\M&%+>@J:BKJP^W^mDKY6>I ()3efwhYT815DU_TgsN`nZj{xdhmva{jUo`Rg]LpcPwgQp[vc}jX|fWjXLbVEn^Jr`KgYIk]LnTkTweQzjRpXq_LcVFRI>ZRAND;973WPCn\LhYJWKA`UDj[HhXG~jOnQuTmSo`HrbMmZcnWkVpXvdN|hSpZ}mWxanqo}ixcvhTra{gwfwjxh|mquy{hr_sfwe{mXxevpsbugxk~n|hmsq~vrs|dr_yhpkvyvtn~ivutroXKA58ABEPMP]v|}JXj]mY`vU]nटwerw[N "FSbZjyhek}jjz_mT{iQqZr[x`talXwcPnUgSp^L~iSkWHeUH^SEaVFdUJeXFj\IuaLjWJjZIzeO{eOzeRr^RjYJ[MC>92B=5>94=94zeJ|hNv\~_w]u^t^qWsYlWmZpXlXwdTvdUn[zgW|iYq]t`ygwdvewbudscl^yfXnZo^pa}kzfxem}lvhZsgVprt{~|stxk{yuy}zmxsml{ajouxxvuzveEGQBFPPU`wz|Zap~yin{iSC 07BfzoklVs[~cdbfg{b}bx]s\r\jSv]kVxcO|fQv`NzePkS}fSx`P~hSm]KpaPjWHdWEtaJr]KdWHfYGeVFaSD`QA^QAbRGaPE{fN|fMoVz^tUsXx^x\}^yfO}iT}hVzcSs^mWq_nnyis_lydon|ixf~nxjwjxhrbuethUbWHk]Nlx}q]_VMh\Qm^xuxbp_|j~mwgzgo{ftfnml}gxbhsopv{xvv{yx_X^;@OWVbrp|uvym*#%%*5JYlПfnv^|b|]t\|`cwaq[uaJr`LgT}dPlXKxcQ~fPwaKx_Iw_Kr\HybOiPybNgUG^MAYJ=gVCiWCbN?VG9J?6:202.*HB7cSC]M@iYEr^IeMmQsT~iLhPlR|hR}gOlSoUvZmUo]L~hVr]q\mWzduthvc~joorz{oud{luhydWzeWj[QxfV}foZq\xfwhycolv|g}iwdxcjmtslotsuuwuwzvw{xyvt]Wairzvsu{{8-%GRcmklr|dlUhRy`|_t\cM|cMt[vZsXjO{fNv^JaN?cSBtaLkR|`JWC9I=9NCs[Ir\Jt\IlVA_M;fSBfOAI<1TF7^KWD9TB5Q?5N=3XE7YG:P>3N@4`LXC5cP@vZFU?7N?5YF5gO?iP>^H8[H:YF8H:3H:1K<0E70M?3aK9^I:xWzVxTpTvXtSdJ}cMbNhQ~aLkRkSgPeMaLlXs\xco\se}gzfo_tbwemYiVvbq^s_xc{g|m}lzkqdgVkXo^~lqkdwa|bjnomiyaeuunkpvtw}xwŸ~xv||y{zvw}zqrxt {vmmliji{[xYwYwYrVqVbKgMiSiOkOz[GpSAeN={`FbJqT?oT?nR>jP=z]HnR>gO=mSA]I8`J:bL:ZE6UE5WD4I8.E7,TC5aI:L:2jOiOoQmM|bJx\HpVkP~_IpTbInVBoWF|_MoXnUiRo\|fhUkYrmm[fVqYIdSgWkYp_savbn]j^{bUw^Pv_RdVyjt`weqlzdlXeTybv`x`w]r\s[jnmvttwvpuxwvvà|á}||~{Þ~}{tvvqxxtuxtvsplhdg|a}`{]y_pWnTqWnWjOeM}_G|^F|^F~]HvZCuYAz[DyZBqT@gL=lS?lQAgMiN>fM:aJ9cK9gN;eK9dL:dM>^G6[E5{]JhQoQ~eIfNhQ}aMw]G}`MdNgLu[JrWEeNu]x_nXt_{dv`jWu`jmZp[hXuc~izbSeVwb{cTy_Tl[lYoYGfQFkTHgU|cNkWnr^~knx_wdofihe~cnomuotvotyw|{ŝĝĝƠÞzÛ~ݜ}|xxssvptswtnkfef{\qTuZtWfNeMhNfMfM|]EsV@oT@uWErU>}]GxWC_D8dM;hM;bK9gK;YC5cJ:gM=W@3R=2[F6VB5R?/\E7P<3J8.D6*C4+vTiM|_JsUrSkToWs\uXz^Hz_K|^MbMdM~]OkYt^{ezaMdQnZr\r^~ip\z_On^jVjSHy\OvdfVj[|eq^jZj[uc|dyeuam}b~lmm|ihzcomj|biqmprwvuÞ|Ş}œzĠÞş}ĝĝ~şÞ~Ý~ƠŠž}şƠßyœ{y~~{vyvqncei~dvYjQhOhNkS}\Fw[EcHtVAz]CxXBpR?mSrU<_F4Q=0`I8ZC6\E5S>1I8-J9,J9/D4-}YnQkT}\mNoSmPv[G|`Hy]E{_MaNeOfSo]yds\{ej}lxd~fs`n^ubr_r`udtczi{go^rbzdl\nydtgydkl}fqmmnkek~hkmkorrtsrwy›zƠƤğǥŠ{ƟȡɣȣƠǠȣơ}Ü~ƠǣšşȢĞšŠzwwpmkaf|brUnVlPbLiMfLaGrT=lQ>oTAlQ?qT@dJ:aG;]G7kO>hK:YA2N:1E4,E5,Q>1P;.J8-N<1S@3P;1C2,K:.M;0K8/C3+A4,tYuWtVw[w[uUrVmSfM}bLkTkQlThSlRs\xbybk~k}fjgin}i{dol|j}k~kmloo~jmmmrsvprsonopoomospu{zzě~ğ~Ğ~şƟĝ~ɥʤȡȣˤ˦ȤʤɤɤȢȡɤȡɢȢơ~ߜ~w|vnjhvZoUsWvVgP`HeLzZGpT@pT=lP=fM;fM;`G7[F7bHlR@fK;fK=mQ@gK<]C6bI8\C6\E5_F5S?2O;1L8/P>1T>/Q;4I60G6.C3,B2*B2,A1'F4*C1)<.(>0*>1)uVtUwYwYxXz\{]y]x\w[x`xaxbw`zay]di}ioonki|jn}i}k{j~i|iyi|e}hyeoljkontxurnoqnqsptsxxyyš{Ĝ}ŝ~ƞǡɢɣˤˤʤ̦ͥͦ˦̧̧̢̥ʥˡˠɢɠʡʢʢ˥ʠǞŞxwspjha^{]qWsWmQgPbMaI^G}\IsT?qSBtVCrRAlO:kO5T?1I5.K7,J7,H6*F5-F4-B2)iKjNmSoRtStXuYt[vYv]w[vZv]z]zd|c}chlmjnpmnn~kmlkkmnf~emjjloqwuvpokljmrnovtwÚ|Ĝ~ĝ}Ş}Ƞ~ȠȢ˦˥̥̣̥ͤͥͥˣ̤̥ͦͥˤ̢̣ɡɡ̡̤̣ˣʢǟśĚ{ztqlhfb}^y[uYoUkSkRiNbJaF`K[G]H_H~[GxYCyXCtUArS@mQ=lO=fK;kN=gK<`F9aF9[B5W@4]D5YC5T>4R<1P<1=:6<;4=:2?80>71>71F=7NB;F8/K;3K<4L>5UH?ZJB\LC`LDhZNmZSoXMoYLwbZv`Uw_P}eZ|bUhWj[n]sbthpbq`m[r_vau_zg|e{h~jinolqqmlpommqooqpqsrqrtrsrttvusutstuvuwvvvtxxxwuqqqpmfdd}^z^v_s[qWoUlQhOfJcK_J]G\E^FzWDiM=95;21A;8B96NHFNJEMC=PFAULCSC;XHB^QJ\LEaQGeTLgTIiUIlVLq[NqZMuaRx`Ql^p`t^u_yb{b}ec~edhhgkkjmhjnlmljklnliiiikgigecea|^y\w\u[sYsUqUoXoSnRmOlQkOiNiMbI~^GeIbGaF]E[E~ZAzX@uU@rR?pQ?;D;8mTGsWKz[L]PbPcOeRgSfShPlUiTiVn\r\x_cvZlXmXoUmWmWmV_J}XGvRCsQ>vXEtU@tQ?qO?pN=qN>nN@mN?nN?nN>lI:mJ:lK=kKnN;sQBpN@nM=jL:jL:iL:jK:jL8hJ9*%%)(&*,)..,)((((%*(%(#!(%")%&//.+(%.,*-+)1..1.-21,,)'*'&-,+//0-++,($+&%-)'/+)6412/+.*'3/+41)5-'61-50-73070+82.;616.)6/)8/)90-90-<63;42?94=3,;/)@:6KLGHJGA<8B<7C95gPGx]M}_NcMdQeQdPdRfQgQhRgRjTu]|b~`{\|[z]w\kTgOfTdSdQ`KvVCcI;]B6Z@4X@6ZB7W?2U@5WA5UB8WD;WG(#<(#>*%A1+=.)B2+;*#8&$:($95@<8=84>70O?9hPGz[QaPcRcNdOdPeQfQeQgQiTiX|bc~cacbdd{`mUkVlZmXr[tYhThJ@_D6bH;`F;`H:]G=^H>^H:[D8_G>`ME]H>[FZGVG>UD9SB8SB:O<2M90L81M;4N=7I7.H4+G3-D0)B.&G2*E1*D0(E4,D7/D81F<4A3.?1(3+<1*8*%,0,)+&'%$++()'#+)'.,+-)).+).,(.-+1/+21,0/-.-+-/+/.+02.12.210341553@:6EA:B<6KA9C<7?;8:74;63:75;88;98:62=84>:6:61;73=84=64=72=30=5.942<63B94PC;eNBpVH}^NbNcOcObOcIdMeOdNfRfQfSkəyvgegnqnklfgc~c~c~dlT`F:\E9`F<`E;^E>^G=^G;]D:Y>2ZA4ZB8U?4VA8XE>YE9TcH;_G4->73=72=:6@>\KAiSEsXGuXF}^LdLdKaLbHcJcKdLdMgQfRjU{Ҧ͞ОΠΡɖzn‹lÊjčpŎqōoŎrŽqmlkčmx^lN@`F=aE=]@7]E9ZB:Z@7]C8W=4T;3W>5W<3T:2R90R:0Q:0Q:.S?6Q=3M7/K3)J6/H1(G1(G1'K7+J61I74H62D0(D0(C0'C0&C0)I92F71C2*A0*@20?1*?4-C83A3.A73)-'(-(+/+./,/0.10.54/;51H?5J>5_L@UI>[I?gRFjSCqXCqTEy\MvXEuUCsRFnREgOAdKbI?aH>dI72:2-;40<<7EA^LAjSJrVKsWKrWJrVF_NdQcKbNbNcMeNfReMiSbNv`ϴʹ׺ѮҩֽĽո׻д˦ÏsigŠnċj‰n‹ggn̜qiI:_F>bF<^C9\B:[A6Z?4Y@8X@8Y>2U=4U<2T:2S;5R;2Q8-O71Q82P9/L6.K4+K4,H0*E-'G1&E/(F2,G3*G4-F2,G5/E3+D0+F70F3,A.(C1+D40B50A3,?1+?1,A4.@90@:3K@8]J=YG:[H;fM=jO@qUCrTBpSBrUDuXHuWHsVDvXEwWCxXHvXIsSCsTDtRApSBhPAdK?eK@cK@dJ@dJ?dJ=dI4U91R8.O4(S:0P81N7/O92M:.J4)K60I3,I2*F.(H0'F1'F1(G4,H6.J81F3-E3-G4,G5.C1-B/)C1,C2-D5/B3-@0,lR?mR>oQ=nQ=pR@oRCpQBqSBpTDpSCqR@oQCqSCsTBtUDvVGwWFzWE}ZJvVGuUGvUDtT@rSCmQDeQEeOBfK@dJ=eL=fM@eK>eK?dNBdNDeLBdMDfOBiOCkTIoWIsVKrTInQEnPApREqSEpSDxXEbOdPfOdPcNdNcLhNgTeQpZhĮϼɲ˵˴˳ʲ˴ɲʰʯʱʳͻϾμɺȸǷɺ˿˾ŸdE5Z?1aFnPAoQBnPApQ?pSArSBrQ@uS@uSBvUDzXGzXHyXFyUCxVCxUFwTFvVBwSAwTEpSCjREgQEfNCgN@eMCfNEgQFjRHhQGgN@fNAiOAlSHmSFmRCoSCnQCmPDpSCqREsTH^LdOcOdPcSfOdOdNhQeNhPŤȭ̷̵ȳɵʵʴʴʴ˵˴˶Ͽ͹ͺ̹˳̵˵˲ȴɱɰDZҼ£y]K[?2`E5T>3Q8-Q7-P91N:3N;3M8.J7-I5-I3,K5,I7/G4,G3+G4.G5/G4,E0(E0)D0)D2,B2-B0-A/,C1+pRBpR@mP>nO@oPAnPCpRAqRBqR@sRDtSDvTBvUDvVDwTEzWGyVG{WHyVEzVC{XGyUExUExUEvTDyUDuUHrTFkSFhPFgNDgNEiOFjQCjPCjOCmQAnRDmSGoRCoSEqTErQAqREsSEuTC_PfQdOgTfReQgNfQhSfRu^ֵжȳDzȰʮɭȬǫíűĴŴƵȹɼ˽ʸȷɴɴʴʵʵɳѼθycG<\A8bF<_E:^E:[E<\C7[@6X@5X@6W=3S<1W?5U;1R90R9.P80O:3P;5P;4O<5N93M8.J5+J5+J8/K6.I4.I6-I6-F3-D1+D0*C/(C1*C0+D2*D2.tRCtS@vUCqRBoRApR@rSBsTCtTBuSBvU@uS@uSAwUAyWF|XJ|WE[M{[I~WDYH|WGzVByVE{UEzUByVJ{VHwUEqRDqQDpQDoREnQDnQAqQArQArPCpQCpQCpQDsREtUFyXJ{WJ^NgPdTfThQfQgRgThUcQv^̴ǭȰɯȭȫȭȬǭƫİŰĮĮůůűȸʽ̾̾ʾʼʺɸȵɵƳȴҽϱvWI\?4eI<_F<]E;]D8\B8]B7Z@2ZB8ZB8W@5V<2T:1P7.R9/P80P8/O91O;2O=5O:2L80M92K71K80I6/J7,K80H60G4.G2+E2,F3,D1+E3-C3-zVAxUCwTBuR@sQBtUAuTBsRBtS@xTAwTAvTBvVCzVD|XI}XJ}YIcRYJ}VF[J~XK}WF}XFXE{YEzUGzTG|WIyVFuREtSCrREsSEsQArQCqQDrO@sQ@sRCuUEyWFyXM`OhRlUgRhSkUfQjUfQjVcQ~eʭħǩǩȨƪǪǭƫǫȫȫȯǭƯƱǯƫƪƪƪīĪíıñŴƷȼǹμܻ~\MZ<0bG;cI>aG=`G:^D8]B8\C9]B9X@9W@9U<3S7/R7-P6+R:1Q:0P9.Q<0Q;3P;4N;1N82M83K70J6/H5.I60L71J50G5/G4,G4,F3,D0(zS=yS=[AaHvW?mLySBzTE|WEZGYF[G^J\L|UGXFZK[JYFXIXHYH[GYF}WD|WE{UE|XGzXEwUCwTDxTExVGzXH|YIxSFhRßںciS{gucnZeQdQeRgQhȦ£ĥŤťƤťǤŧƦƧŦŧƦǤƥǥǥǧũǧǧũũǨƨƨƩǧƦŧƥŦĦŦħĩªŮ˳άwUIbH=hL@bG>bH;aF<^E<_F:^D6\A6ZA6U=3T:0V<2S:.R9/O6.L5/O71P:3P;3O;3M93N:4N;0M81J70I7/G3+K80H5/G5-F3/ܼݺ࿖˜ȞhqM;zTF}WC|XE~YK[J_MaRWDZGqU\DUD]LYF\J[F[G\I\J\JZLZL~XE~WF}WH{YH{YJ[I{XGxTCm¢ǦȦ¡vzhwdnp}ԮƤĥáâģĢäģĢģĤģţţĢ¥ŤţĤƤĥťŦŧĦħŦŦŧĩŨŦèĦĥŤŤŦĦĤģϱȞgF7`F^F=`E:^D:^C9Z@5U;0T:,R7,R71P7.Q7,P8+P:1P91O:1P<4Q82N80N91M:1J7/H3+G2+F1(F2+H4/غغٽټٺٹܺƬizU=xQ?}WEXJ[F\IYI{h԰Ǩ˳~dcKXAUAXCXFVEVC~UC~WC~VEZKXG}TE{VEzTGwRCaNƜ~ɤ辝Ǫֳ۸ŤɧǨȫǧ¢¡ŸŸŸ¡¡¢£ġ£¢££ãģ¤ãģĢģåĦĥĥĥååĥĥĦťĤŤæåŤĤâȧѪuYiM@cJBiMAdJ=aH;_D<_D;^E=^D;^C:W;1S70S93U<1T:-Q6.O7-R:2S>7Q:0Q6,O7-L8/M7/L7-J4.J4-H3*G3+H3+ڹڹڻغںۻܼݻí©jmWgSfRx`ÙŮǶ³ɹʶԷŨlnVmVw]kuƣh^I]GlVnTnVm㺛Ǧ缠迟翟辝áá翟æ¤뿠Ÿ¡£¤ãä¦ä¦ģâä¥å¥ääåġĢƨͭtTFaFbF:_C9^B7_B5Y=4U90T92S91T:0T=6R:3P7.Q7-O7,L6*M6,L6,L6.M7.K60I5/۳۳ڴڷڸ۹޹ݼݽ߼߽߽Ύ⿭㿫㼢仞彟弟濣±ŷǷǺǻʾǺǷǷŶijIJ±®êííĴñ§«ë鿞꾠꿝꽞꽚鼚鼚轚黜껜꽜꼚꼙鼚鼜뽜龞齟꾞꾡龣龡꾡뿜齝齝꾝齞꾛龚꽝뼞齝꼞꼜鼝껟꽝꼝辛輝輝齝軛潜ƣᵕ~hqTE`E9cH>gK@fH9`B5`B7`C9X>5S9/U81U;1W=2R8-R7+P6,N4-L4*M3)M4+M5)M6,K4+I5,ڰ}ڰ۰۱ܱݰݱܱߴ൑൓ඖᷙᷚḜ㹜亝弟忡¯ķƵŵĵŶǸǸķ´õƺɽʼȹǹŷĵŴĵĵ𱯱®龤齠뼝꼞點麛輙麜麚黗麛깜軘躛蹜껙꺚麛鼛껞龢龤꾧꾣꼞꼜껚鼛鼛齙鼚鼛鼚꼚黜麜꼚鼛鼙黚黛軛軛軚湘꽜£ۯjwZEbF;`E9eJ>eH>bF9`E;W=2S7,T;/V;2R:/Q8/P5,P6+M4+N5+L5.L5/M7.M6,K6.گٰۮܮݬܭܮݮޯ߰ఉ߳᲋Ⳏⵏⶔờ俪³ķƸƸŸķĸȻǹĸð±¯òǺȿʿ˿˾˾ʽʿʿȼƺĴĵƹȻɺƶijĵñ¯龥齢鼟鼞껡轠꼠麜麚蹛蹗蹚踘鹙麘躘鹗麚軝꼡輞꺛軛黙軗蹛麜麙麚麚蹛蹜蹛鹚躙鹙鹚蹜绚鸛蹚纛湚淙鼞¡൒xrZkK>`E;eJ@fJ@cG>Z=3W;1V;3V3WY=2Z=5Z>2W=4V:/U9.T:1S;0R;2Q:4٣u٣vڦ{ڨڨڧ~ܦ}ݧݪܪ߫ߪޫઈᬇ஋⮎⮍⯏Ⱁⱘⵠ⹦们修濱·ùĹĻƼǿȿʾȾȼƹƹƺǼƻö²龬辩缨齧翫迬辩輦绥繢蹢踠趞緛絜絜継継絚糘糖贔贓豔籕糓糖賗賘賙賖純紓洓粖賖糕賕糖嵓紕糖泖洓贓洔崔泔泓糓貔糑岑汒籑岏䯎貓᫋u^fC6T:1Y;1S7.S6*T5,U;0S<3R<4ףzإ}ڨ٫ڮ۫۫ۮܱܰݱܰޯ߲߮߯೛ߴട⶞㷠⹢⺦⽭㿰²µøĸĸĸĹŸĹúĹĺŻƹƼǽǻɽȼƸ¶õķ羮羬辩³羫羨缥締続級洙糗紗洚浚沗峕泔豔粒沒簓籓籒豒粒籒粒屔貓汗粕鳔籗沖粕籖籕粕沕糒沔泓泒粒粓气籑汐氏屎尐䭏ᫍ對췓ҝ}\EV9-V;2X;/T7+U;0U>5T=4إ|ץب٬ٯڰڰڲܴݷܹ޺޺ຬὫྮ཭໪໮ᾰᾰ㿱´¶ö÷¸¶µ·¶·¶¶÷·øùŸŸźƻƺƻǻɽȿƻ³öĺżĸóŸ³ŷ³转缪约纣淡淡嶡渟湥淢䴛汕籔貕沘氕簓簒谒豐簑篒篓篓汓籑簓氒籑籓汑篒氒氒篑篑寑氏篑篑篑篐毐殒小䰒導䯏㮊᫉汎鰌s\]<2R8/P7.T<4ZC;YC9գ|֥ש٪ۯٰڱ۴۵۹ܼ߾öķ¶ῲµ·øùĸĹĺŻƺʹ÷÷¶¸¹ķĹùŹĺļźźĻƺƹƻǾȽȼƻȾǽŽĹƺźƽǼ±罪缫Ĺö翯潫缧滨湤淣浟岛泗簕篕气毓毓殓篑殒篐筒筒殒箏篎箍宏箏殎歐殐毋母孏毎殍完孍孌孌䮍䮌䮋䭑㮓䯒䭑⬎᭏갓đstW\GjN@_G;W>7ՠzգ}֥צجڱڳڵ۹ܺݾ¸ùĸ´߾⽳ῳ·ùĹźƽƼƽƼŽƽƺļĹĺùĹĹùĸżƾƼŻƺǿɿƽƼŽǿȾǻõ濮¶ö迯濰濰÷ļĹźźŷĶ´濲翰溩緣淠峝寖寓歐殍宍孍歍箍歎嬎歌笌欎欌筌讌孍孌箌孌毈歍䭌䮊㬌嫋嬋䬊嫉䫈㩌㪊䪊㪋㪊⪊ੋ汌鲎㩇آ|̚tq[՞v՜x֞{֤קجڳ۷ۺܺݾ߿µ߼޼߽߻߽ἱºĻúûúùøúú·念濳忶¹ŻƽȾƻźĸĹ·¸¸Ĺż翳翱µǺǻż潮ĺƼǾǿȿƾƼ¹漬带䷡嵞岖氓殓䬑欌䬌孊櫋櫊嬊櫌櫋櫌䬌媌竊嫍䬊櫊嫊䫉㬉嫊䪋䫈䪈㩊䩊㩇㧇⩇㨆ᧆ⥇ृޤᦄ㧇婇橆җoӗp՛w֠פשٯڴ۶۸۹ܹܷܷܺܺܵ޶޸޹ߺ߹ະ⻲㽴㾴⽲㻱㻭ẪḭṬ仪乬㸨亨㹪㸪㹬仮徰侳¸ýƼǽǾƿƾżĺù¸ú澯彲濱öĹƾĹĸö潬¹¶¹Ĺĺżü÷濱澯廪左嵢峠峟寙孑欑子䫑䫌媊媋檋穌櫉檋橌橋樋婊媇橈橇㩆㩈⨉㧉㧈⧇⦅⧅⥇⤇⤆⤄ᣄࢄޣޢݡҒoғnїoԗs֜yףר׬ڱٴڲ۵۴۱ڭܯܯܯݰ޳޵߶޵߷Ṫศ߶ⶩᶥഢಞᱠⲡ᳣᳠Ⲣⲟⱟⲡⶤⶦ⶧⸨乪㼮俲忳濳俳濳潰徴佱亩忳·濳ùƿƽżĹŸƾûĽƿƽµ徱滫辱忱ùżĺľƼķ澲廬帥嶤䳠䰙存氚岜宗䭑媎䪌婊橌媊樊娊樉䨉娇䨇䧆䧇㧇㧆夆奆㤇⦄㤂㣅⣅⣂ᣄࢃޢߢߠޠΒlϒlғmӕtכz֡ףةٮڰڱڲܴڲۯڮܯܲܭްݳ߶ߵߵට߷ߴಣഢ߲ഞಡᲡᲠⱣᲡⰞ⯝ᱚᯝᯝⱝⱞⳟ᳥ⵦ㸧㺫⸫个㸧㹭㹭乪享㺫乩漭弯仰们庬滯丬濳ƽĹ÷ƽù¹彲潳Ļ徱溩漰辱罰濱¶¹¸翳翵濵徯享㷦䳟䯙䮖䯚䮗㭐媌娈姉始䨈姈妉䧇㧆㦇㥇㤅䤂㣄⣈㣅⢃⣁ᣃᣁࢁߠߢߠݠޟޞ͑gϑhѐnҒpԘtԞz֣֝רڬڱڲ۵ܵ۴٭ۮܱۯܱ޴޶޹޶޶ߵޱ޲޲߲߲߳ೡ౟ᯟౠⱠᰠ߯ଢ଼᭜௛⯚⮛ᮛⱟⱠᲤᲣᲡⲡ⳥ⶦⵥ㶪ⶪ㵧丫㹪㶧丫㸩庭庬个漰Ÿ¹ùż忳彰弮潳徲䷩帨漬幫幫个乫庩庪廰彰濴濵帧ⱟ㭙䫒㫓㫐䨌䦆䥈䤉䥆䤄壇変䦇⦅⦆⤃ᤅᣆ⡄⠄ᡂᡂ᠁ߡߠݡ~ޟޞޝޜ̏ȅgΏgϐiђmҔs֚wם֠ةڭٮ۲ڲڳڱ۲ܴܴܷݹ޸߶ݷ޸߷޵߲ޮ௝ఠ߰ఞ߮߮ଡ଼ᯜ௟௛߯߭ச஗߬୘ᰞⲠᲟⰟᱡᲠᱠᯞᱟⱢⲤᱣ⵨㷪ⵥⷨ⵨㴧乭仯潰彲ⷨ徱·濴徲ļĺ估㹬䶤㳤Ⱡ䳡䳨巪廪丫亭溬㸫漪绬溭湫庭亭澱弮㳥㰡㲟䱝Ⱍ⬕⭖⬔⬒㦎⣉⣄䣄⦊ᨍ᪐ઑ⧊ᤈ࢈ߡ~ߟ~ߝߝߝ~ޝ}ݝ~ݛ~ݛ}ʌdʋf̌g΍iЏjяmғpҗu՚~סإ٦ب٪ڭܱݷݹݹݸ޺ັݷ޶߹߻߶޲ݬݧިޫ߫૘ଘଚଘ߫ଛ௞ᱡ౟ౠᱡⲡ߰߱ᱥఢଜᯞᮠଢ଼ᮜᬛଛઘ᭛᭟ᴩ⳦㴥⶧ᴧ㸬弱弰㺮伮乪彲⺮彲ü佲弳廳º㸫ⲣ⮟Ⱍ⭘㮜䶧个䶦湫漯庫乬㹫丩㷨㷪㷮个㶫㷩䷦嵩㴦ⱞ䱟Ⲣ᭞⭙㯜⫓⤉⥈᥉ᤉᨑᩎ૗߭߬ߪަߢߞݞݝ~ޛ|ܙܚ|ȋcɉfˍb̍f͍hύiЏhяlӑrՖy֙לؠ٦٫ڭ۰۴ݹݺܸݺ޻޹޷޷ݳܬݨޥݟޠߣ࣏॓ߧ৏ިުߪ૘ଙ௟ᱤೢ߮ଢ଼௢ఝᰞఝᰟ௛ߪਔ᧒ଗ૚୛୛ᮞᰣⲢⳤ丫㻱㻰乮念澶仳㺰üù弳彴㺯廱弳中㳦ᱣⱡ㳦Ⲧ䳦㳤ⴤ師弯弰䷭⴦㴦㴦䴨⳧ⱡ⮛⪘⩚⫛⪕⦏⧑㩔ᮙᱢᬝ૙৐ࡇ᠃ៅऌ੔ଢ଼ఢౠݯޫޤݢݟܜۙژ{ȇbLjcȊc̉gˋhˌgΌi΍jύkύpҏsՒv֘֞أب٫ڱ۲ܴܴܵ޶ܶܳܰܭݨܡݝޛޚݚޜޞߞࠆߢो॑ߤएߩߪ߭߭ୟ௣ᰢᲦ౥߬᭝߫߫߬ᰝ௡஠ᯠᯢᰣⱢᲢ᳨ⶫ亯ᵧ㸭亱⴪㷪彴伲㵪㳦⴪ᴦ⺮䶩潴滲䷪⵨䳧ᰣ㳧䵩㳣㱣Ⱔ㰥㲦㲥⯞⭝⫚᪘⬖⪕⦎⢉⠊➈ឆ➂➄ᢇᣋ⥏॑ߣߝߝݟߣߨߪݪުݧݤ۟ۙܚ}Ɔ`ƇaȆdɈbʊc̉e̊g͋i΋lЋlюnҎsԓv֕z՜ץ٩کڭ۱ܲܳܳڴܱ۪ܳܨܣܞݘݙ~ܜݛݜޝޚޚޞߠޟޝऑަߩଟ૚᭢௢߱߮ᰣಣఢᰤᲦದ೧൧೩೦௢᳥Ყತ᳤᳤ᳩ⳩ⶩᶫ㷯㷯௢ᱥⶪᳩ䵫⵫䵪⭡㴨張㲦௣Ⲥ㮝᧗੘᫝᪘ᦕ⩙⪙ᨗᩗᦏࢌ⡊⡊⢍៊❅ᜃᛁᛁᜀߝߜޜݜݜݝޚ}ݚݚݚݞݡۡ۟ܜۙƃ`Ń`ņbDžcɇcɆġf͇h͊i΋jЋkэlҐoӒu՗֟اڬ٬ڮ۰ٰܱݳܱܲۨۦڤۢ۠ݜܜݝݚݚߘ|ݘ~ޚ~ޛߜޚߛߢߣߥߩଝ߮౧൯ත෭ḭḬⷮᷮⸯ⹯⹯ḯᶬ᳨ୟୣᱥದᴩ⵬㷮౪ణ௤ᱧᲨᲦᮢਜ਼⮢ᯣ஢᳦ᰡᯣ᫞⫝᧒᧑ਖ⦔⧑⣌᠊᠈ᢏ⣍ឆᝁែឃᝅᜅᝄߜߚߛߛ~ߚޚޙݙݙݙݛݜݞܚܙڙ٘ژڙؕ}‚_‚^ą\ƅ_DžcȆdɅgʆeˈh͉h͊iЌmяrӏuԖ~נؤ٫ٰجڮ۲ڭ٨۫ګܫۦڠ۟ܡ۟ܝۛۗܙۘܗ|ݕ{ܗݚޘݚޝߠߠߡߥߧߪઞޭ߰೫ත⺯⺱ỵ⹱⺲ᷯ⸭⹮ᴪ೧಩Შ౦߱೩ᴪ㴪㶮ᵭ⵪⵫ᯠ૛ߩᨔ⯡⮠᪛᭜Ⲧ᫝ࠊࠊ⡋ជច᠋⠈⟅✈ᜆᜅᜃᙂߙᛂߙߛߚߚޙݙ~ݗܘ~ݗ~ܗ~ܘ}ۙݛښڛڛژ~ٕٓxؒxZ]‚_ÂałcDŽcDŽfɆeˆgʈi͋kΌn΋rЎuӓz՜סئحث٨٪٭ڪک٨ڨ٤٣ڠܟ۟ۛۘۖ{۔}ܖ}ۖ~ږ}ܖ{ۙ}ܙݗ|ݘ}ݖ}ݗޘޛݟߠ॒ݥߩެ߱Შᶮᷯ⵭Ⳬ߲ബ⵭ᵬᴬ⵬ᵪᷯᷮⷯ⸲ⸯ亳仲㸯⵭ⶩ೩஡ިⰥ᭡߫ᯢᮣ⬟ߧߠࡊࠈߜߜߜޚݙߚޚޙݚޙޘݙܛݜݚܘۗۗڗ~ە~ۖ}ڕ}ڕ|ؕ{ה{דzגxגwV\aŀ`~gƃcDŽdʄfʇeʈhˉm̊nΉpЍqғyҘ֜٥تث٧פڬڬةب٥؟ؠ؝۠ۡڝۘۘ|ܖyܖ}ٕڗܗwۙݝܙyݗyܖxەyߕݘޜߟߢݤߧߨޮ߮పన߯ާޮ߲ⶮ㷰ᶭ㹱⻳ⶱ亰丰亸⻲弳㼴㾲ⷰඨᵫⲧ߱㲨ᮤ߲ݬߥߤઙএߤߢߜޚߛ~ߛߙݚߜߜݚܙ}ݚݚݘܙݘݙݘۚܝޜܚژٕڗ~ܖ}ڗ|ٔ|ٔzؔz֒|גyבzՒwjasper-1.900.1/data/images/feep.pnm0000644000175000017500000000054410554235561015756 0ustar ernieernieP1 # feep.pbm 24 7 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 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 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 jasper-1.900.1/data/images/example.mif0000644000175000017500000001027410554235561016454 0ustar ernieernieMIF component tlx=0 tly=0 sampperx=4 samppery=2 width=32 height=64 prec=8 sgnd=0 component tlx=0 tly=0 sampperx=2 samppery=4 width=64 height=32 prec=8 sgnd=1 end P5 32 64 255 |||||||||ûûÜûÜûÜÜûÜûܘңˣããˬû˴ˬôûû˴ã|lddsôlls[SSSS[[[|ì|dSSS[SSS[S[KSSS[[[d[[lSS[S[[[[[[[[[sSSSSSS[[[[[SS[[[[[S[[S[SSSSS[SKKSSSSSSS[[[[[S[[[[S[SSSSSSSSSSSSSSKSSSSS[S[d[S[SS[S[SS[SSSSSSSSKSSSSSKSSS[[[[[[SS[[S[SSSSSKSSKKSKSSSSSSSSSSSSSSSSSSSSSSSKKKKSKSKKSKSSSSSSS[SSSSSSSSSSKKKKKKSKKSSSSSSKKSSSSS[[SSSSSSSKKKKKK;;;KDDKKSSSS[SS[S[SSSSSKKKKDKKDK,,,,,444;;KDKSSSS[SSSSKKKKKKKKKD4,$,,,,$,,44,44;;DDKDKKKKKKKKKDD,,$,$,,,,,,,4,,,,44,44;;;;DDD;;;,$$,$,,,,,,,,,4,4,4,,4,,,444,444$,,,,$$$$$,,,,,,,,$,,,,$,,4,,,,,$,,$,,$$,,,,,,,,$$,,,,,$44,,,,$,$,$$,$,,$$,,,$44;,,$44;;;;;;4444;D4;;;DKKKS[[Sd[[dddllssslddllllsssssssss||||||||||llssss|sssssssss||||||||||||ssslssssslsssssl||||||||||||||||llllllsslldddllsss|||||||||||slsssllld[lllddlss|||||||||||||sld|lld[[[[[ddlsss||s|slsssss|slsd[lldlss[[[[d[ls|[dlll|l[ldS[sd[dl[dd[[[dd[Sdssllssls|llds|ddsdddld[[ld[l[SS[lldl|dl|ldSddllssssslsl[[[d[lldd[lssls|slssldslssll[[dlld[l[S[d[S[s||ls|||s|||s|[[d[dddlddslldds||||ss|l[l|ssld[[lslllllld[dssslls|||ss|sd[lddldddslll[llssslsllsssslsslssdllddddddlld[dllls|s|||s|sddlsllsssddddlll|ss|s||s|sssls[dlsssslslllldddddlsssssslldlll|P5 64 32 255 |||||||||ûûûÓûûÓûûÜûÜûÜÜûûÜûûûûûûûûûûûûûûûûûûûûûûôûû˴ûã|lddsôlls[[lllûûSSSS[[[|ì|dSSS[SSS[S[SSSSS[ûôûûKSSS[[[d[[lSS[S[[[[[[[[[S[[[[SSû|sûûûsSSSSSS[[[[[SS[[[[[S[[S[SSSSSSS[SSd|l|sldddd|ûûûjasper-1.900.1/data/images/goldenears_gray.pnm0000644000175000017500000003001610554235561020201 0ustar ernieernieP5 128 96 255 ||||û|||||ûûûû˻ûûûûûûûûûûûûûûûûûûûûûûûûûûûûûsûûûs[KD;ûûûs;;4;DDûûû[;;;;;;;ûûûsD;;44;;;;ûû|S;;;;;;;;;;û|K;DD;;;;;;;4;ûlSDDD;4;;;;;;;;;ûûlKDDKD;;;;;;;4;444ûlKDKKK;;;;;;;44;44;4ûûûûSDDKKDD;;;;;;444444;44ûûûô|SDKKDDDD;;;;;;4444444444ûûûûû[DKKDDDD;;;;;;;;;4444;44;4ôûû˴ûôlDDKKDDDDD;;;44;;;4;;4;4;;44ã|lddsôlls[[lllûûûûûûûû˓SKKKKDDDDD;;;444;D;44;;444444SSSS[[[|ì|dSSS[SSS[S[SSSSS[ûôûûûûûûûûûãsKKKKDDDDDD;;;;;4;;;;444;444444KSSS[[[d[[lSS[S[[[[[[[[[S[[[[SSû|sûûûûûûûûûûû˜DDKKKKDDDDD;;4;4;4;;;;;4;;444444sSSSSSS[[[[[SS[[[[[S[[S[SSSSSSS[SSd|l|sldddd|ûûûûûˣSKKKDDDDDDD;;;;;444;;;;;;;4444444SSS[SKKSSSSSSS[[[[[S[[[[S[SSSSSSSSSSSKSSSS[lsllllllldûûûûûûû|KKKDDDDDDD;;;;;;;;;;;;;;;;444;;444SSSSSSSSKSSSSS[S[d[S[SS[S[SS[SSSSSKSSSSSSS[[dlddldlddd|û˻[;DKDDDDDDD;;;44;;;;;;;4;;444;44444,SSSSSKSSSSSKSSS[[[[[[SS[[S[SSSSSSSSSSKKSSSSS[[dddddddldsҬ[DDDDDDDDDD;;;4;4;;;;;;;4;44444444,44KSSKKSKSSSSSSSSSSSSSSSSSSSSSSSKKKSKKKSSSSSSSSSddddddddddsˋDDDDDDDD;;;;;;;;4;;;;;4444444444,,4444KKSKSKKSKSSSSSSS[SSSSSSSSSSKKKKKSSSKKSSSSSKSSSS[ddddddddddˣ[DDDD;DDD;;;;;;;;4;;;;4444444444,4,44,4,KSKKSSSSSSKKSSSSS[[SSSSSSSKKKKKKKKKKKKSSSSSSKSSSSddddddddddl|ҜD;DDDD;D;;DD;4;;;;;4;444444,44444444,,444;;;KDDKKSSSS[SS[S[SSSSSKKKKDKKDKDKDKKSKKSKKSSSSSS[[d[d[dddddd|˻ôÓDDKDDDDDDDD;;;4;;4;;4444,4,444444444,4444,,,,,,444;;KDKSSSS[SSSSKKKKKKKKKDDKKDDD;444;;DKS[S[S[d[dddddddds˻ûKDDDDD;;D;;;;;;4;;;4444,,,444444444,44444444,$,,,,$,,44,44;;DDKDKKKKKKKKKDDD;;;444444;4;;DDKSSS[dd[[[[dddddsKDDDDDDD;;;;;;;;;;;;4444444;4,4,,4;44,444444,,$,$,,,,,,,4,,,,44,44;;;;DDD;;;44;4;44;44;444444;DKS[[dddddddddd|||||lDDDDDDDD;;D;DDD;;DD;;4444;;4;444,444;;44,4444,$$,$,,,,,,,,,4,4,4,,4,,,444,444444444,4444444,44;;4DK[dddd[dddddl|||||||||llllssdKDKDKKKDDKKKDDDKDDDDDD;;4;;4444,44,44;;44,,4,,$,,,,$$$$$,,,,,,,,$,,,,$,,4,,,,,444,44,,,4,44444;KK;;;S[[[ddddddddls|||sssldddd[SKD;DD;;;DDDD4;;;;;;444,44,,,,,,,,$,,4,4,$,,,,,,$,,$,,$$,,,,,,,,$$,,,,,$44,,,,4,,,,444;;,444;,4;D;;;;S[[[ddddddldllss|sllllll[[SKSSKKKKKKKKKKKKDDKKKKKKKKDKKKKKKKKKSKSKKKKKKDK$,$,$$,$,,$$,,,$44;,,$44;;;;,44;;DKDDKDDSKSSSSS[[[[llssss|||||||||sssssllllldldddd[[[[[[SSSSKKKKKDK;;4444;D4;;;DKKKS[[Sd[[dddllsssllsss||||||||ssslllddd[[[[SKSSKKKDDDDD;DD;;;ddllllsssssssss||||||||||||||||||||sslldd[[[[[[[SSSSKSDKKDDD;DDD;;llssss|sssssssss||||||||||||||s|||||sllldd[[[SSSSKKKDDD;DDD;;4444444ssslssssslsssssl||||||||||||||||||||||||s||||||slddd[[KKKKKKDKDDD;;;;;;44444,44,,4llllllsslldddllsss||||||||||||||||s||||sslld[[SSSSKKDK;D;DD;;D;;;444;44444,,slsssllld[lllddlss|||||||||||||||||||sllsd[dSSSKKKDDK;DDDD;;;4;;44;44,44sld|lld[[[[[ddlsss||s|slsssss|slssl|sss||||||||||lll[dd[SKSSSDDDKKD;44;;4;;;4;;;44sd[lldlss[[[[d[ls|[dlll|l[ldS[sdl|llls||ss||ss|||sdddl[S[SSSSKSDDKKKD;KSD;DDD;4444[dl[dd[[[dd[Sdssllssls|llds|ddsd[llSKSd[ls|ss||||||slslddddd[SSSS[SDKKDKDKKD;DD;D;444ddld[[ld[l[SS[lldl|dl|ldSddllsslld[[d|ss|sddssssls|||||sslllldd[[[[SSSSSKSKKDKKKKDKKKKDDssslsl[[[d[lldd[lssls|slssldslsss|||ldll|||s|||s|ssssllddddd[SK[[SSKK[KKSDKKDDD44DK;ll[[dlld[l[S[d[S[s||ls|||s|||s|s[S[[[KSsll|sss||||s|[||slss[S[dddS[SKSKDK[;;DKKDDD;;;4;KD[[d[dddlddslldds||||ss|l[l|ssldllslllds||||sllds|lsss||l,K|l|sssdsldddd[Sd[SSK[SKKKSKD;;;DD;;K;[[lslllllld[dssslls|||ss|sd[lddddlsl[lldssls||ss|[l;Kd||lssld[|sd[[ddSKS[[SDKSSSSKDDDDDDD,,4ldddslll[llssslsllsssslsslssdl|sdds||lssls|D$|4 S|ssssssllsld[[KKSSKSS[[SKSK;DKDDD;KKDdllddddddlld[dllls|s|||s|sdd[d|llsss||ss|||[s,lds|s[dssld[[KS[d[D;DS[[KDDKKSKD;;,ddlsllsssddddlll|ss|s||s|ssslsdS[|lS[lsl||s|||s||s|[D[|$,[Ëss|l||sl[[ddSdd[[[[dd[SKDSSKD;4,;SKS[[dlsssslslllldddddlsssssslldlll|ss||dd|s||s|sKK[|d||S;||ll|||||s|ssllsddd[ddd[d[[SS[[SSSSKKSKdlld[[l|ldl[dlds|||sdsssss|slssds|sss|||sls|K;DS[sddңs[ Sl||||sldllssl[ld[dSSKSSS[[SSddd[SK;;;4[dllsllldddddld|sls|s||ls|||s||||llss|||||ssssss||s[$DDSdKD,l[4Sldls||sd[[[dlsldSS[[S[ldddl[SKKD4K[SKS[Sdd[l[[SS[ddddlls|s|ssll|ss|sssssl|ss|||||||ssssldl||slsD,$$;; 4SÃ|sddlslllddld[[ddd[S[[d[[SSSKDKDSD;Ddddddlssddddddlls||||||||||ssss|ll|ddl|sss||lss|||  $ 4Dl˴˴|lds|sllllll[[dd[lld[[SKKSKKSKDDD;;llldlllldlddlddlsss|||ls|ss|sss||ldssls||||ls|s|sslsS $,Dl[[lssldd[[S[SS[ldd[SS[dld[[SKDK[ddlllsllldS[ddl||||||||s|lss||s|sss|ss|||||s|sls|||||D $,$Ds|sldS[dd[SS[S[[dld[SSKSSKKDDddlllsllsddls|sssdds|||sssl||ssslsldldls||||ss|||ss|ss|[  $4,$4DKdl||||sld[[ddS[[[ddSKS[[[dlddllllllssllslllls|ss|ssslddSSds|||sss||s|||s|s|S ,$,4$,4DKl||ô|slSS[SDDKS[dlldddls|||||sllss|||s|ssssssslllslsssssss|s|sssssss|||||||||s|s|lD$ $$4;KK4$,DS||ssã|sldd[dd[[[[dlllslssdds|sdlllllldlllssslllllslsllsssssslllllls||s|sssSs|SdK $$ $4;K;4D44;;SS[|||ls|d[ddd[[ddddlslldllldlllssslssssssldSSddd[[S;;KSdllllldllllllsddss|SK,4S  $4,$ $,4;;;K;;K[[lldddddss|l||llsllldlllllllllldllsdd[Sddd|slldllS4;;D;;D;DKDDdsllllls|||SD[$D4$ ,  ,,,,,D4,44;;;;d[l[SdlSss[S[dlslsdlldlldlsslllldslsslSDDD;;4$$4$4,4dK;4D;444;[SKDK[||||d4S;;    ,,$ ,4DSK4DSSKSK;SKKSKlldlldlslssllssssls4 ,,$$,,$,d[ ;S444,$,DDDD4$Kl|d4Ss[   , $$$,;KK;DDKDDddddddddddlslssddddK$ $,,$4;4;DDK[S $$$$,$,4;KD;4Kl|||d ;[[$     ,$$$,4DKD4dddldddddllsslllddldS;,44DKDDDKS[[dS$,4,$,4K[K;Dd|||||||S       $$$  ddllllllldld[ls||s||s|sl[SSSS[[lsssdD;DD;DDD;DDDSS[s||s[$          llldddldd[[[SSS[llls||lsdddlssllldSSSKSS[ddd[dl|||ss[D4,$$           ddd[d[[dddd[SKSKSdll|sssssssslsssss|s[[[dlldlddddll|s||||ssl[K;,$        [dd[[dddddd[dldlddddlllsssss|||s|sssssllsssssslllllsssssssd[[K;44$ 4           [[KS[[[dddddllllllssslsllss||sss||||||||||sls|ssssls|ssdSKDD;;44$4 Ddl         [S;DS[ddll|dlslss|s||||||||||||||s||||||sslsss|sssllllldd[SSDS;$,$$$DS|s        S[[SS[dlKK|[lllssss|||||s|||||||||||sslss|ss||ss||ssslsd[SSK;;444DDDD;4,,$ $$      dddddd[;,D[Ddss|||||||||||||||||l|||ssssssssss|||sss|||||s|ld[[[[[[SSKDDDDD4,$$$,,,,$   l[d[SSD;;4SSK[ls||||||||||||||||ssss;s|sllllllssssss|||||||slllssllld[[SKSSSKD;4$$$$$,,44DKKDK;  4;SKKKSSDDKSdllss||||||||s||||sl4l||llllsslssss||||ss||||sslddd[[[[SSSSKKK;4,$$,4;KS[[4DK;4,, ,K[[[[d[[[ddlssssls|ssss|s|||llslllK;||lKd[lddll[|||||slsldllllddd[d[[d[[[SKD;,$$,,,4;4;DKS[[[KK,ld[ddddddddllllsssssssssssK[sKD;d|d;4sl;4|SSKDS[Sl|||||ssslsssllslllddddddlld[[SD;,$$$$$,,,,4;;KS[[,[[dlllddldlllsss|sllsslssSD4[l|[4DK,|KKD;KK[ls|||sss|lllssllsssssllllllldld[[SKDD4$$$$$,4DK[DS[ddddlddlllssslllssssss[$;DK||[ls[D, DdSDD[ls||||slllddlsss|sssssss|sslllddd[[[SD4$$$$$4D;S[dddddddldlllssssslsssl; ,44Dd[ldD 4DKKl||||sslld[dllss|s||sssssllllllld[SD;4,$$$ $$,SSS[[[[dddddddlllssssllsd; DSK[|dK[S;$,Sl||ssslldddddllssssslllllllllldd[SD;;;44444;[d;4$$jasper-1.900.1/data/images/stawamuschief.pnm0000644000175000017500000025561010554235561017710 0ustar ernieernieP6 199 149 255 omsklittvtvzyz}‡~{~{{傢傤戢儦儤肧脩懧臨芩錨鋫釬茫鋭莬鐪쐫쏮뒯ꏱ덱폲푯퓮푱trttrtyvyz}ဤ~〦℥䃧冧凨利努捫抭狭菮摭珮琯蓮鑰鐱锰镱ꓲꓱꑳꓲꗱ뗱씳엳옳땴픴햳쒵쓴vzz|{}}}~ᄩK⇩䅭⊬䌪叫䋮䌭珮匰可莱葰蒰瓰瑲萳锱蔲蓲蔱ꓲ땲ꕲ퓳쒴땳쓴땴옲떳어픴혳헴vzz|~~|Ⴊ⇫ᄭ↭⇭⇭䉭䊮㉯䉯䋯厭荮猰莰萰鑰葰鏲菲鑲鑲锰铱鑳딱쓲딲핲햲땳쒵혴ponoqruvwvzzw~䀦~優㈩惮刬犬犭凰匮狯振药錱ꌲꎳꏳ鐳鏳꒲앲쓳퓳헳앵쓶픶앶홵홷lljnokrsmkqtqsvvvvz}{|}}~遪遭脫ꇪꉬ釯舮ꊮ썯됭퍰펰쎱쑰썲kjlrpmoolrsvxttvwvvvwz|zzy}}~逩逪邩섪끭遭늫숫뉬쌫퉭lnmmpnrpsrrsstvxyxzxuzzyx~~耩逪適ꁪ뀬ꂫ끭邫놫탭킮솭텯톯퇮mnnnppqtsutvvuxwxyz}||{x|}|逫郪ꀬꃬꁭꂮ녮냮셭턮턯퇮llnrvrpprsvwvu{wyzz||~耪邫郪낫ꂬ뀭냮ꂮ넭냯턯킰탰턱rsqvurqrsuyzvyz}|||}z逬遫ꀭꂭꃭ끯ꅮ녮놯섯툯lonrtsvtwxy{|z灩}z~耫~}逮ꀮ}낯邯뀱녯놮섯텰쇰솱톱psrtuusvw{xx{~耪||}~邮逯낯郰ꁰ냰뇯솯셰텱튱srsvtvwww}yy{|}|耯뀰ꂰ鄰酰ꄱ놱ꄱ섲퉱숱툳rqwuxy||{}|}{瀮|ꁯꅯ遰ꁲꃱ낲넲솲놳쉲셳퇴srsvx||}{~~~瀰灰灰酰ꄰ遲ꃲꇲ녳튱솴턵틳퉵튷vv{{w|{{~遰~鄱脰酲ꁴꃴ녲숳닳뉵튴yyxyx}}~ꃰ胲}鄲ꆳ邵ꄵꈴ뇵톶툶톷wxuy||}~育耳脳炴胵釳鈴膵뇵쇶숷쉷놸툸{zz}怱|恲~炴腳肵腵烷ꅶꆶꆷ놷ꇸ퇸숹뎷닸퍸슻슻㚿}}}}怳炴怷炶職ꆶ脸ꃸ釷뇸녹셺싺댹썹댺썻덺쎼눻獻鋿ߒ͏нͩÎp{Ɨܗܫ{}側恶偶煵僷恸灸腸艷釷ꇹ醺쇺뉹튻싻썺팻팼팼틻틻퍻펿weoso[vfxntvpvƘ՚݈ٛӂtr~ڙ둱ͥȝt}r{fz~rni|czɥު䝴ɝҨڢ䀵僵偷傸其懶烹肺膷膹ꄹꉸ釹ꅺ銹鎹ꋺ쎺쎺쎺덼푿dUq^m_cju_oaj\gZhP_UcVgK[XfR`Sbgspxjybsiv[lZeajswq~p~{ii憩”bsq}]rpwt_sawbvvӛijƫͤ偷僷愸傸燷煸煹腺醸鈷猺썾sjhKnUcXeUgYgbodo`l_mYjRaG[EW|GZXg]hViYlYhS`Xhgw]l\hfpmzbk`nVfKk|v|nYjjyZoYpu_sJdit㻽ɢɹΏ؜퀦t«ӭѶ}怹慹凸熹焺煹剸獺뎾~w|iy~w|ujXE^|N^{\k^gP_TdbrQcP^WfSfN^P_NaH\I[|@V|KZQbR`K^R`TfS`Ye]lVhSeTccnm{bpWcdoL`Qdxh{duerzrp^qLbYnOfxyvͶDZżӸηˮűıu~}ߌ`|cnitdw}ķȸӴ烺懹冸典冽{pYGoSiTiH_}O`MeJfRkQcN_{HWxW_huysZmDWyJYyL\|IYzCRwObO`QY}VhI[}@TvAWzK\~JX|N_N_~O_J^PaUd[mMaHYTa^khtjsdq_qguWj;TYpUkhy{y`mvwFaUiʼnװ¥ªųûɰzaͧbqjxxsctdwwĴľۿ䂺出{cG:_{8Ro9JlFUvDXxDWvMZzHZzCStN]|RaGX|L_~Lb\kZkPa}HXtJWwFRu?PtSbM_=RwCV{G[}ASx>Ux;RwBVzH[}GW|K^PaDXzO_WgYj`l]hWlQfPavtjx]kU^~cnWjH[SdZj^l{bqs}wTh|ҹȲǯɸѬ~otlrxi{l˝쟥vdsfwdvnev^l[koƲɭȎĸކƉŘСpXCi~5Nk9MkANm@QpATtBSpFUuGZx?Sq@QsDTv>Sq@PqGXwFXvEZyBUwCOsO]TbIZ]dZg?RrGTwAStARtBTwFWy@Qu@RuFWyHWz@SxEX~DUwO`hpjvWgXhQ`SeCY|SejwVe_mkst{hpUdQaI[IYJ^Kb\mvwx|\nո͍Ȋ|jzgxbzasp}zkydwexi{m}kpxyyl}}]媽~{pvybv\oevbr^pbphs[natws˼ЫƪΚ˦ŬĶͧĺض퓶ߒ융א~~ЇdQ;l:Tn:LhCQn?Rs?So=Qo>PpPyVbZl@SuCRt>Pu?QvBTw?Ts>QvAQuIY~L_FW|QcK`F\{H_~K^~FZ|CWyLZ~WbS`Ta_i{•v[mWeM\J[Xklt_nTfnwl{vcncpcmzwYknn}aqm{oyx]papsrzisXh[j\hbwp~xr{asFbϷ˴ɖɿжƓj~tsum}_slxr`qcr`p\ocslv_q`o`luwp|gtds·ͦƧŚɞ擽ܔޘ؜إ핶܊σǃˇzŌć~}xv~ulz4Pl8Lj=Ok>Rq=RqBOo=Nn>PoPo@OoN\}VeIYwFXwN]yO`~Tais_nK\|ReQb=QtCVyK_|EWvCVvARs9Ot@Sw@Pt?Su?TvARvCVv=QrM^WgPaO]~BXyJYQ\EUzM_S^jw]mydqM]Sb]jfsivnxbrL[sw{{~jqO\Rg\mfrZldyyviycto|aqVdhx[l^iRcU`SbObKb^rtzogzuQmTr෼ǰȶҩɴϲ͓p_tevfwki|euftctap]pfses^scuju`tapito{qxiyo}mvky}yŮˬɋwÊsxmxdvctg^s\tctdwldnw˜ԏˁĀŅƂŠy~}ywqxpFWtEXt;Po?Ro@Nn;NmOpAOoATsH]yBVu?OoKXyVfHXxK\{L_zM^zO\}GZ|M^DUuAStEUuBSsBPr=QsPm;OmRqAPqQnBSq>TsAUuQePaRd~DZxDYwARtEWx=PsJX|K\}@SuBUwCVwAVy>SsAUuBUuGUwGZ{ObPdQeMWyEVzO_{HYxKW{MbG]{N`coZecnVbI[|M\|`pI\I\~M_G^~M]apiwo^oRcViVe[lO^jtfs}zipYhRbdo|}xr}hs\iTcXiXf[iVf\f_js}bmQeTd`l\fQaKaUnatPdmex[o`stiz^rWl[qhxdxavdzgxdwhwkyizfykves`rbqcr_pbsftesbthvfwo|iugxctcs_qcup~dshy^o`n_qdtfreucxkzerxɨzj{dtgpcp^p`rguapgvtmzpzixv{pyf}p~ypv}}yr}cwESsBSo>SoSrAUtRq=Rm>Qo@RsGZt@VpAQqBRpCSr>RrDVrBSrASsCTqEUrBSqBQrCUuBStGVuATuFXwETsHUuK[yO]}FZzHVwBWwN_L_~SaSdTcXjTdYkVgP`P^L\}GX{P\~J[zFY{I[}J[|FY|H]~K[~K[RbR_L]O`TcM`N`P_M]I]O^I\L\OaN]R`XfUe]e_fp|q{Wj^p|kylzXjPeXhcpbmhscrmvrYgS^~XhhwdrdsftP^GZ~HZKaSiYqWnXnRkWoXn\r\uauk{av^u_ucwewi{sqniwgvgtdt`qguhtkvkulvjvhsgsbrcodrbq]n_m\o^m[kZk]mz~jw]pbtkxfvbrjuipnw|gq]mYm]sgxZoXlZn`ngsŶͩƓiq_j_s{gqXh^pduo|vpvni|vqi|dy?Ur>Vs;Qp:Pp=LoCUrI^zH[xCTrATq@Ts?Vq@SpARqBUrAUpAVpEUqDUpATq?SqASqESrBSrEVvFUsBRqFTuIYxK\yHYxEWwL[|O\xDYtF^xL[xO_}P`~L_|GZ{IYyHWxLY|EVyHY}J\K\}FY{BZ|H[~IZ}M\~SbfrSdOa~]lgsbmQaO]QaOcNaP`RbTfM_R_\i^knzs`pXdTedpksThTgVhZlenktuao_i_iOe}PbQ_}P^{HWvP^ViI[|P`GYN\K_NdXk_qcv`sWmWlWp_vcygycucsftbrewm}o}gvfvcugufshxbwlylwgvetjvj{drdrbnfudm^k[m]o^nbocq_p_ofqdpcsfv`pcniuȜir_k\lVnWkcqbofqv~~m|dvboeo^kl{blaqgtmvoomh{nok_z_v[r@Qr;RpSq@RsN\yL\wDVsCWrDXr?Uq>ToFTrFSrCSrCVsBVqCUrBRo>QpAPqBTq@SoAPnARsOmNoBSr;Ps?NqSc[kI[x=RrBRrDSrCTtCTvDVuDVuIWuAXtDWvLXuLZvKYvJWtG[xL\uIYsHWtFXuHXuJWvN[xO^|IYvJZxL\yR^wP\zO^}Tb{Wd[i]nPaO^PdH]WgcpL_`nZhXgYgeqUgVe[eVeSc|Vd~VfRe}Q`{Pb}]oP_OaScHZ{N^\hYaR^QeUcRdS`~I[~Ja~E[TeSeUfVhUjßas_w^r^q]tbshwf{bwdx_wat`tgt_p\mctaq\raq_o]o]n`ndobn_pbp`q`m]n`o^m]m\ocresjwftqzl{mzex_s]o_oam`qcr`tbpdr[obus~lrjrhudscriraobpambrixq{px`r`r~}p{ewbpn~jsfpXk_wa|mj|bwbx`wg{bu^w@Ro@SpCUqCTnBTo?TnCTm>Rn>Rn@SoASpCTpCSmBTo=Qo=Nk@Ml=Oo>Pn>OoAOm>MmCPp@Pp;JnCRs@QrBQs?PqBTsERqFTw@RsEWrDWsDSqEVpEXsDSrEQpCRqESrDSrFWrEVrDToEVuCVwFVtDVsEWtHVsFWvK\zEWtJYxaoqxVaK[}YgETuJZ}M]~M_K\ZiN^}L_WeYgguaoXeVeSb~Ub|Wa~`lTcQ`{L[yG]zTbPd|J[xDXxHZzN`~XdXgYdan@U}DTxI\{O]}OaL`N`~WeWeQaSeWf]pui{Yo\p^q_yhu`r^paqcr]o]p`rdsftasco`m`m]jYm\n]n_n_mal^l\nZkXnaqcp`q]m^pivkzfykyfvasbpbrfsdqerbsftlvdtZn\n]paqgvivcpbq`n[i^pn{dl_nfy|eq]o`q^niweukydrdpq|t}x~gnaqk{h|f}dwbzc{^u_wCToFSp?TmRk?QlCSmBQl?Rn?SnASm?Rk=Pi>Ql9Ml?Mk;Mj;Kk8Kl=LmDQm@RpBTpDQn?RpAUoEUqBSoDSpCTpESnFToEUnEVmCVoFSoCSmERk@QlRj4PjQiBSjDUnERk?Pj@Ok=Pk@RjBQk?Mi7Hf=Mj=Kh8KlOh=Lf;Ke8Mg>NhBPhCRj?OhERkBRl>QnAQmDUoBUqGWsJWqCSpHRsAPqCSr@Sq@SsJ\wEVsDRu@OuDUvM]yGZuHYwIYxOZyL`~Na}Sa}Sd~Ra}M`|VgVfL]wSb~UfOazhz_sSdE[vH\yN_|RgGYwEStVbTbhu\fO_QbVa[iJ]zJ\|P_~O^}S`~Q`~S`~R_}Rb|Ue]l[lWhQeTcYj\l_m_k[l_ncrdr`qhobn_nbo\nZm^k\lViUiTjTfXhYj[n[k[h]iZlZjWkWl_ldogpgv\n}}lryviv\m`pr|lykuÛqxO`vdl\kgtm{nv[ldpkuq|qyUh~|{ju{wunyesdv^sZt^u_v=MgSi@SiAOhARj>TmFVnDWmIUoGUpGUpBNn>Pp>Sq=SmASpETt?TsMfGQe>KcMe?Le=MfQr6Fo?KrKWvH^xATtFSqCWuHZxETsIWuP`yE\wI[wE\xI[vM^yK]wL\vI[wI]xHXvHXwIXxO\zHZu@UwGUuGVzQc~L]|K\|_jSb~L^}GYzXeS_|L]zO]zTaVeYhZlQb|PcUcVdQa}Mc{VeUeThYgWhYk^kZkXh]kkwbmTfXiTeWi]l\q[iYeRgUhXhUfUgSfRjYgZgXg[mYl_m\m^mcsermzgqp|l~pxhvao[jYjao`nYj]lbn\hjyeq~|{Ñń\f_lai\jan^o]mjv{us|Ņnwiwo}my\o]o_q_vs>PhDShDRh@Qe@Nb>J\AM^=L\=GZ:H\;I]?O_AO`?K`CMbGP`>M_7FZ6CY6BY8C\8E^F`=Jb@KdAMf?Kc=Ld=MfANgERhAMeFRgEPhEMhETkAQiDNiDQjEPj@PjBOiCRlAQjDUlFSlAQlGVmCUlGUuUaYd>Ps4GoARsHZxM^wDYtDStIWwBSqEXxJ]yM]wLYuNZtGYuCXvK\wJYvK]xK[wHZtI[uGUuXgitgqK^zCRsHUxWeL]zJ`|GZxJYyJZyD\{L\zS`zSb|UeRd|S`yPayO`|YfVciqVcUdUdQbzG[wJZzTcYk_nVfWgZhXfVfar[mTdUdUgTdQe\kUjSfWgZiShTdXgShShWhWhVl^n]nZlbl]n\lZkbo]l[mVf[k_nUiWjiup{`l\mszΙ|yzvziugro{}|irkwxu{xq}{_lXkViYjbwK^;I\;DZ8@Y8EZ9F]9G]Ok@OkANjAPmCPj?PkFWoBTmIXtCSsCRtCVrFXvFYtBUtBVu@UrGXwQb~O`yHZtJ[uHWuFZwKZwG[vHYvGZvahlqXa|FXsK^{\lWgRc~Ra~EStSd~KayM_wKZxLWxIVvH^zI_|Q`zPa{L`}Yffqgtr{fs^nP_~^kXbTafsdpSa}TbTaZhQeTfTfVf[k_i^pWeZgThSh[gWgSiPiShXiWiVhZkUh[i^j\k\m]kXh]ldocp_o[h]k_p^n`q]n\merlvcsdrenzcqǟyt~xxʺԑmwcseu}bidvq|aniw^iYk@O_>M_DPaBN^>I\:H[>K_?J]AMaAO_;I\AO`COaS^jBQ^:FY9I[;G\7BX2AX4D[7C\:F^:I^8I`7F^9F_6Ha8Ia6H`NeBLf?MfDQgCOfBPhNg=Lf?Nh=NfCPh?NgMj>JhAOh>Pj;Mj@QkANgETmHYsFVrCSnGWr@TqAUrCYsEUsJ^zIYtJYuI[vL\vIYtGYsJ[uEWsAUtSc~qxP_}BQrBUsK\zXg?SrGZxHZxDWxH]{N]yO]wJ]xI]yJ]xI[ywyiq[h_jYhQb|P_yZhes_lhtp|apbos}juAV|F^~NaRaWeXfUc^ljwvekUcOb[h[kWeRgOhSjRdUhWhWh\j`iZlYlXh^idseqmvgs]i[mao\oZnYldpfoeo\k^p\kReapky^nest}{o}lwo{Ānu_qgx}vnyev]n]lZl[kIObDN_:M[;J[>HZ@I\:J]J]=I_9H_8G`;E]:F];I`9I`8HbJgALeBNeAMe7IdARg;Nf8HeBLeGQfAPfBRk@Oh@OiMiAQj@PkDOhCPkAPlCUlEXlBPj:JiSr@VuIXtGUnL_|WfJWvIZwGZvKYuCTrDYyK]yL^zG[xO^xSbyRe|Rd{M]x\gnzamhqqzRdL]{J_{L^zP_xQe~YgQb{G[yEZvJ^|QdQfIY{CU{RcUdOa]eTcXjYguo{SbQdYhWe[k[kUfVjUfTgWjUi]k`lXkYkVi[kalcocn^n^mXj_o_n_n^pbofr\n]laodrasWgUdUgUlViReSgRf\l`sYkYk[n\kUggstt~jszyuy]mcpdsescmcqq~lv`qsjt]l]jUfViSi@L^Mg@LeIdNgDRfIZIUeRXd;GZOg>GcENiCSi?Ld>Mi>Ql>Pj=Pj>OiEQjDRjETkEXnDVnFTmDSlCWpGWqGWo=VnObvWauHYsXb}EZu@YsBUuIYyFZvKZvM]wK^wN^ySb{N`vM\sQ[tM]xL[uI\xBSrGWwDVuJYwP]xN]wL`xF[wK\yCXx`or{Vb}O]yHYxM]{Ub~J[xYa|[eUfH[wYh]gESw:RyJ\|VeSePebnWhWd}Vc}WeWh_kcpepbk^n^p_j]m^p\o^lam^m`ldqaqZlYihr`nctdtZl\l\p^p`q_n`p[n]n]lXjUj]hWjWiWmVn^n[j\l\l\n`m\lbpjuuǞžÚɭorZi[p[k[k\jWhVhZgR\gTVc\[eieldgp_`k[\hDQ^6FY:GY8F\@K^@I]EM^CN^EO_ERaFR`GSaAP`7CY3@Y5AZ6AY8D\9E\:H]4F^;F^8G[7F];G_8F_8C^5F_9H_9IbPg?Mf:MhLe?Jd;Jd?MhFVm=Ke=KhBQl>Qi?Oh=Mh;Mh@OkFTmDUnBRkFUkCToFVpEVmHWnHVmEWmBUnKXoJ[rD[sHZvEXuFYvFZuHYuN_vQ^tFVtJXuWcz[f^ijr_hZgNXxGZxHZvKYwN[xI]wN]xIZwJ]xFWxXeTiRc~s~dpVc~S`zJYwP_|M_yUddqjrdlNZ4Kw;LuSaZhVf]lVgScQdWdRe\j]jWhSdWf\k_oap]m\l]lbn`o[p^n_qWf[h_mTfVgSgMcWjUkVh]kVgShWk\l`m_nRgOgSgUiZmWl[mandp`p]oerfr^m[k[mds]o`pbpapmϩck\m\k\k^p]oYlXicjuilxoo~gkv^dtYboMWfDM]Lf>Ng:JfNfDPg@PgBNf?MhBQiFOe@Lg@RiFTj>Jf:LhBRl>Ng>Ok?Qj>RiJe=Lf;HcCPhGThEQf>KcDOi?RhBRiDPfFRhEPf>KhI\>K^DPaIRaIO]GQ`EQ`=K];F[:CZ5CY5B[CJ`8BY0>Z5E]9K_8E\3B^4B]5C]:D]7E^6C^>Mf=Me9Fa=Ld:Id:Le8Lf>Mf?Ne8Kf=LfEVlIWl=JcDPgBSj=Ne>OgGUhHUjLTmANh@MfFNiBOgBPgAOhESjERi8Jf=MhDWl@SlFUoESlDTlGTnLXqN\sDWmCVnKVpBRkAPj@SmCTnEToIYrFXoG[sLXtO[yemcmmvdoJYuR^|FUtXcVd|J[wHXvN^|O^{GYwF\vGYwGZxL^zGXwHUvYdvrp{oxmyivpx^lo{DW}:MqXcWf~`lWdK_Ka}YensgpVeN\|L]|K`~Na~MdI[zP\z\hSd~QhSh\j^n_jVd]kWf_kbm]kYkWk[k]l[j\jWhVfPfRhNbVgVkXhbm]pYmYj_nUgWiYi\kanco\lYk`ndqar_kj{lz_jbn_i\k_mgqovfr}nqesnsam]lRVjQ]jGUaFO^HR^BN[AH]\`m_fmKU_=I]AN]COaCRcDQ_CQaERcHSa@L^:F^6AY6AX2CY6E[7CY6F^8F]1BY7C[4D[1AZ2BZ1D\9Ha8@\5D^>Og:Ia3B_BKe;Jc7H`;Id=Oi8Me;Id6F`APkLYnDOf=MeDRiALcMVoW_tP\v[d}?OgDPgEMfCOiCRl:JeGPh@Qk:PjBQiJWnDWmCWm@SmFVmCQlIUoLZqIZp?TlDSlCSkCRl>QmARmDTnKWoFUnCTmHUnKYsK[tJ]r|pzZd[f]jPc|CYtG[wH[uJZvHXwI[zB[wH[wM\xVhI[yDWwQdOfYl}is`jgrdpRaI\yYgepgs^iO[|Pa}\kampx[hH_J_~S`}Ud~LdJ]|amVfYeYeWh\jdmYgYiXlSjZk]gYgRgReTgTgRc]lTgReQePdObTeM]SjZnXmXj_n]o\l]m`o\m`n\o\mbo`n_m\o_r_p`m^kXi]kXk\nboZieqjwlvetYhHM\=HZCQ`DN_IO_IN[EM^T\iW`kNUaAGZHN]AL\9FY@I[CO_BO_BM]>EZ7AX1@W9F[5BY3@Y0>U/HcFPhDShDMdERgESh>McMVp_g^j0B^:Jf:JfDRkFQg?Oi?Ni9Lh8Kg8LfEQjFUkETkCSl?VoAOjKWnESlERmDUoHXpKXoDSkCSnCRnDXoFWmCPiDTnKVnJWoATnDVpI\rP`vR`y`jYczFYtI]xM^wCVtHZwK[uHZwFTuGZxH[xM^y`ngn\jO`~Mb~]muzeset]iWgM^ySd`oM^wSe~M^|P`~N_|J_}N`~Sb}M`~TgTdWeQhTgcnUeUe^n\k_g`iZhblZiQhTjYjYlRdZiVfTdTf]lWdQdQgQeRdRd\i_h\jXlZi[j^m\jWg\k]k[m[m]kdrxnv^iXiSgZi`q`sYjWhTjZl\oarXk^ssmyeshuSf5?P7BS5EW=I]EObERaBN\@FZ^csV_kKP]CK\:EY=DY=EZ=GZ:DX:CY6BW4AW7D[W.:U2E\5F[8C\3?Z1B\9G^N`DTd>K`DOeCOeCPhGSeCQe?Na6G`Wbz-V0AX0=V8?Y7AX,>X3DZ;F^5D[3C[4C\2CZ?H^>E`:F`;Kc:IaAOeGViLVgCQf3B^oxKTmNWj;D]7GaZ1?X6C[;H]6BW4AZ3AZ9C[9D^7D^?Ia4A\@Nc>KaHUiEPf?OihtN[nIWwdp5D\/=[JWiLViBPdyzov5F^2@_1>]BPi=Of@OgEQi?NgBSiCPh>Kf@Ri=Kd=HdBTk@SkBOjBQjDRj@Uk=QiAQkMavCYnGWn=PiFSlFWlM`sN^sIYpHUmEXnDXoFUoL[rKZrL\pR_rKZoM]sJXpBVnHUnG[sJYtIWqBTrHZvGYsEXsH^wJYsM]uTbxL]uEWrE\sCWpFXtIZvSewJ[vHXuRaySaxQayRf}Ue~Ue~J_|L]{Ud{Ra|ObL^zUdbkMa|L`|Kb~RdPa{PbTfQd|ZheoTgTfUd~]kioTa}_qqs|guZg^hbj^i\nYoZkXhYj\k[oXkXi]nkyky\k`lXkano|upwVhktov`lWmXjYh_qZmisineocpixmvYkUhUfUhWk[lBJ\CL[HQaTZiW[lTSeV[iSXcUYfT\jW^kSWgaaqUZgDN\EO_OTaDQ`GP_MQ\@J[6AX2@X4@X1Y=F]NgAOi\gKeFSj?Pi9Ok@Qk@TkHVj>PiKYnHWlFWoEWm?Ni@OlFWmDXoN\pS\qGVoI[sIYoFUmHZrFYqCSlS^yXdxHZpMWqFVpBVpH[rFUnFYrD[uBVrEWqFWrDYsGYwFXsRbyQd{DYuK\vDTpI\vI^yEZtJZvRbzP^wK_xR_wOaySaxP_wKazKbyUe{RaxL`yQcz_kalQd}K]|Oa|Te}SeRbN`}Oc}cqioWc~XfTc~^mpyUfP`~M_{Qgwq{owy|mq`l]jXk]kYiSj\jXmUjUkWgNfUl]l^nbn\k[kaoXgcpepao_n^kXjfrar^pfp]qdpcqm{oxdo[mTjVl^nZlUi>ET?FT>CTKQfSYkRXhNYgP[gOWeOVgR[iS]l[at[aoAK\@I[CHZFPaEO]GMZEO]>IZ8CX;DX9CV4AZ4>T2?W.;U.;V3=W4C[3CZ*>Y4@Z3C\-?Y6B\:F]2B\?KcTkCQiP[pEUjO]qPasCTkDTnL[rIYpIXpU_tL[qM^sS[qHXqH\rGXqK^rM]uJYqGXnCWn@VoFWqARoBWrFYsFZsCVoG[uGXtDVoGVtFUrIYsP_yJ\tK[wEUqG\tQd{K_yK]vK^uJZtEYtLYsJXtN`vNaxJ\wQ`vZf|I[vM_xK[vHVsO]vQ`yN_{Qe~N^z^mRfSe~Se]ocpXfSfPb~K`}O_zUfUgThNc~^liup|ancn_nXh[g\gZh[j[iVfZk\kVjUm^mYl[kco\kTg]j[k]n`p_l_n]k[k`r\o`o]o[kYk\m`q\lVj[lZj^jbmXhEKYKP[TYe]fqX]jT[fX\j]ao]bnX[dV^k]gwT]n[bqPXhLReSReUZiNUeJRbBM^JP`KQb:I\9EY0NeL[pN\pEUl?Mg?OkCSmCOmN]sXftP_sFWnDWnJ]rGYnPasS`rO_tGWq@PjCSpFUoASoGYrEXrDVrBXqEZtHUtEUrK\w>NnGYtO_xI[sM[rEZtDZsOayM`zGWrIZuFUqQ`vT`vN^vR`xI\uEXuCVqK_xFZwJ[xH]xJZvJXuEXuUc{Xh~Ue~\hYhOb}Tb}QbH_zQb|NcQc~K\|Vd~Qc}Pa}WhShVhRc|R`|Ug[i[iaj`l_kSbgpalSdZjWhTiUhUgQhUkYi]j[kYj\lYmYl^m^lepanao\k\l]o]nanbn\mfq^g`m\lXjVgZi_knu@JV@JU@HVNWeR\jX]jdit^aoW[k^fs^aqV^kJTbPXgV[hY_lbet^_obctbftPViV\p[^rLReDJaCJ[,;T2DZ.AY.>W(8S):V1@Z8E]+I`Vb}MZtFPfARh;Kc=HaBMe;Jd@Kd7Ha?Mb5C]AOm^g}BQf:MfFSiJUjHRfAOfDTkFTkCPj?PhDWmJWnKSg:IbAPgAQlARl:HeO^wGThM\tWeERnFQj=Jg?Pk>QjBQlGYoLZmJ[sO_rP]pFYoMZpWarUasOZpNZrFUoCSoBVpBTpFUpBVqEVqK\uBVp>Rr@SqK\vDQsO]uRbxI`yFZtEYsFWqM\uDZtIZxL]wO_vZfyWfyRc{R`wHWsLZIQbKTc>CT?IX=HWHM[OUf\auP[kW]kY\lZcrQ\kORdCLaJQc:DZ6?W.;V2>X'5R,7T*8V5@[7C[4@Y5D^/?\6C]6D\6G`=JbW^ygq;D]LRmFRg/=X>Ga?Jc:I`>H`=Lc9F`?JeOXqR^tDRfAMdLVkLWjHUlJUjBRgFRjDQfAMgGVoKZn@PfBRk?Rm=Qh;LeLXpEPf[f~_kMYxTa|AOj9MjKXoKXnIVn9KjM\qXcsN\qK[qU_s\gwM[qHSoQ_xRaxDYp@Sn@TlDVoKZrBSo=Om;Ki@UrH[vGZuIWsKZtP]vFZvHZuKZuIXrJ\vL\sFYtH[vPczOcxS`vRbyJ`xDUtM[vYg}Wf{N`wM`vN^wI[wK\wFWuF^wJYuQc{OaxRb{\hx~s{rw`lN`|Pa}R`{N`~PeOcScP_{tyhpVhRcMbPc~PeOeiuv}Vb^n\ncpWjThYmZmZkWh[i[ipzy~kqUe\hTaQhWjSb|s~pvmulwy|rxynvt|oyv~ksjv9DQ4AQ4BR:CU;DV5?P7BS6BR5@S9CUIY=GW4@S;CV:CV8CT5AV=K]DKZBJ[FRdBN_FPbEM`CK`BJ^?H[2?X=H[0:T8A[6AY3A[F]MfGQgOVkMVh?LeEOeAMe:Kf8Ke9JdKUhHVj=JeCQhLWlGSkHTkIVlHWnJZnKYnO[lGUiHTjKYnIXpNZvDOhM[q^fyATj@RmW`tU_nESiQZoP[oSVmL\oM\oIUlGVmFXoEWpFWoBTkDWnE[qBUmFUnJZp=QnFSnKZv?SnDWrIWrEXrDWrJ\uCUqL]uQawF[sEXrGWrJ\uK]wK]wHXq]fyLYsH[uBWu;MkOZuK\s[hz\h{S^vM^vG[wM^zR`yHXs=PoKXsS`wSbzJ\uTdyUh}^jR`yTf}UgM`}O_}XhQb|T_yUc|L]{ancqVhQ_|Ua}\kSd~PeSbL\{ZisxRbfrsxZeVfXk[jalZhTgTh\jYjWhTa|tu~ipSi^ofn_k[j`i`l_q{5BR7DS4BR.;O3>N+8K+7L3;M3=N,:N/=P5CT:DV:DU4:Q:AV5BU:EW8BU6DV@K^=K_:CW8?T.9Q/9Q0?VLc;F`?LfJVgCOfQXhOYiJSd?Kb;Mf;Ic:Hd=Ng;Kd;MfS]oAJbAQjIVlKUlKWkGVjIXmIXnGWnDQhVcsQ^qJYoMYpS`xSbrT]oT[mCRhLYnHVmT]qMYmN_oARhNZtN`pK[oGVlDUmFUmDYoIXoHVnGWoGVnFQlFToEYpFWpFToZhLZsDUoK[vFWrJZuKXrF[sO^vJWo@ToFVrIXsJZsM[vFXtDXtQaxI]vLawE]wJYsG]tMey_kzbkySauGZuJZuHVuCVuBRoFUrR^uUawI]uK_vSaxJZuWby_j[h[kI\zWiUfL_}Sc}Rc|Rb~XhXiXf~Rb}[h\f~Xg~SgReVd}WjcsUe~ZdZiUhYkYjTmXjWeWhUhVhZkety{rxrztvuwdpaiemcoqxkr~mter:DR7DS-?M+:K.;M.Y.=Y(:W5C^3A\APfCQd6E^5C]2A^OYjAL`=Nc2C]@RgIUe=Kb;Ha?Kc>Ne5Ha7HcGUiGQfCQhDTjBRhEQiIVkLWkMXmNVoLUnMYoJ[oN^oJYqXatS^qQ_qQ\nS\oZ_nY_oWbsIZnIYnIUlFSpO]pGSjEQkFVmJWoGVoFXoCXnFVoEWpCTpBVnGVqBSoDWpGYrMZtJYqHYuDVrFZuIZtP]tHZuDUoL^wK`xI^wP]uHYsEYsL\wUcyRczS`wN]uCSqFXt@Qp[j|ks~XewS_uT`tU]t_g|sqoo~flzZdxQavZgzXcyO\uUax]j_jeoN^{BXwL[{Sc~Rb}TfQgLb|TfQdObRd~Vf[hXiMcNc~SeQbWhZn\nZi[jSjVlVjVhUf~Ue~\mjwqx}wquYg}Qdcqw{x~ouwnuftdj\k=GVR4=Q8BT4@R2IeP\o;Ha:Ia5D^EViFSdBOc>Jb@Qg?Ke;Kd;MfEQgDRj?MhITkAOgCPiAQiJXlKXpMYmN^qSZoQ^qR`qSarUbrR_oSctSarM\nYfuYaqS_pLZoM\pHVkDSlBPiGUmDVlIZoEWnLYmKXnCWmCVoBRmCRmAXn@SnEVpBUl=LjFUqN]sFWpEXqFVsEXrGYrLWsHYsM[tM\vIZvHYrFXrH^xQ_wSdxM\tL[sFUpS]wYewUaxclz]gxQau`izihzxnupxrxvtbg~`gydkyaf{Y_uSbyJ\vP^zdp^lBUvBTvUi\jVgUgRh[mOeQeXkXfO`Q`~Q`M`Nb~^kaq[lYj[k[jZi_iRc~Q^~aogut{}}uypzqy\iw|y~w|hrmwpxrw|ko^jnvrz/>P6BQ2:M/9L3?O.:M,:L+:P+:O*9M1;O.=O1?R5@S3=R4=S5>P:CR6DT.;P3?UU-9R5?U>FZ>K]Jc?Kb>J`?H`K[k>Nd;FaKYjANd@Qd=NdFTfISdHTg;NeKe>OfPr?PuVc}RbM`~Oa~Vg^nRd~OgReUfSeUdTc~OaVh]m_i`j[lWmTgYd~Sa|Yhjo~~~rt\jz~uumuixnxnx`nru{ks]i\k]i1>M+8J3>P/=M0P9BT7@Q2La7F]ANbGOd:F]7C\7E`?LdBJ`9GaNg5FaJRhQXj=KdARfAOgBNg:IeFPkCSkESj@PgIWkM^sUbqSapQ[lOVmDRjBTkBSjGTjGShFTmGWoCOjESnBQi@OgBNhCSlBQk?PjAQl;Li?Nk@PlEUo>MkGUpZcxJXqFSlLTmEUn7Ii?PmR]sQ_uO]tGYrK\rGVqN\ucgz[`ufn{`jyikzvqnm|bezcf{lnqntt{vzv~u|uzuzttfg|ikrm{zspov`jmuZdK\O\PcGYyZi]g]hWhPdQcWdWh~Tc~QeRdWhWgWf~[l[mRgSdkw}{wxnwsxvuszy{otq{uv|v~q{gs`mZl[lepdn^lWeUfXhYhQbYiPe3>O/:L):M(9N.=Q*6J/;P2?Q1?O)6N+9P7AS7?R4I]=LbCPf>G^9C^>Lc6F]6F^9H_FUjOZkEPeS3>S9FX9BU0=Q+:Q0;RADWLeBSk?PiIYoLYoESkN\qUauT]oQ^qK\oT_mV^mPXkSXmX^vdh|ji~oi}sj~xsyxw~xxqvsrpopoozsopgi~sqtsunxpvntkiluu{vtuuvsxtvty}rwsyw}uqus~t~{uuvz~w{v{|}xoqnssrnk~yrwp}pzqtpdk}Zdy]jSdwSbwSbyO^wH[xMb{Wc|Rd}TiYj`lVhTePcSaVf_kbk[idubsYi_p]jq|~{zs|evivdqXjTjWfTlSiVgTdUhZh[mcpancqbpfv8BN=ET2?P/;P7?Q0>O0=N4?Q2AS3=R,9P6BU7AU5@U4CV/AU8@T7@V9DX@HZ;HWKa:AX8C[;F[5BX>J^EQa?M`;I^8E\0?X2C\5AY0;W4B\1>Y6A`NiLXmAPg;Ng?Lg?QiJYn=Gd9Gb@TnN[oW`qP\pVevnwbeyoi}nmikqp{toj}pmzsyu{xmmlh~qh~lh{lh|kl}gllnilppuoxmxjzoyouopnssvvtxrtuvxu|y~v|szu~~tlpty|x~yv}r{tytzuaiz[fzTbxJ^wJ\tL`wQcxWdxXcz_i}Zg{Qcw\hzTdyN`xO]tL]vN`xM]xM^y\fzOayZfzWc{Qd~XdzVk\mUfZl_lmw^jThVjYgYl\mgpuziukvx{jpWhTfWiQg~TeUdYhXkRfUgOj_nbnZk`pbn]l`oXil{n{}2AQ6CQ8FR3@Q6@R4@Q/8N5>P/FX?K^>I[6DX5CZ5D[4@Y0D[2=X*]RZkPWgIThS[njgqbclYauuypkwohsgepe^riash`n_\q`_s`br^_uijaet_g}X_rceteh{dfx]^u_bxV\rX[q[awbezeexbbuih}gg{qr}xt{rnplq{mkwhdwjhyg`rkdxtltnnj|sivh~uh|rfxkhvekw^hxmpqnrl~pltoslrk}rh|mg{wrxvsrtrzuv{rytxw~xrggxak}rv{wyvdjzWbvajzai|WeyG]tJ\tQ`vVbuP`vK[sP_wT`xZeyZgyVbuRcyVf{SdzH\vK\vH\uK`vH\vN`wWbyXcy[i|Re}Te|N_yMb{Wf|Xf~\lcq\l\j\lYiUfWh]mbqr{jthr\jViepam_m`oXkVhRhReVgSfXiTiPbPe`n_l]n_ranYgNc}Kg_i(=N/=O7DQ7AQ4>P2Q2AR/=P3=Q5DV8FY9EW9FX;IZ=I]CH\CH];EY,K^3@Z@McS0>O3?Q+?Q*;R2>R2>S4AU6DX;HYH[BJ\CI]6D[7G]5F\8B[:F]6D[7F]9H^6A[7G_AQeKc=J_6D]4Ga.D]-A]7D_DPgESh=LdPVkKWj@PjOYmNZjFViMYmK[mOZkXcw]euX]oZ_qL]nJXmYatZ_sbdw^ex[_znnor`exhe{gfzchz[_qdl_g{Z^q^ezgiy^dtecuxnwl{cduaawlh~vqml{ko}mn{djxagy_fyWbtT]r`dydiymlycfuJYmJZnL\qJ]sL_tQ`thh|rlih}kj{dgyaeybevdezWaxkh~ji|mgzso~vrst\cvR`tUdsdkzTcw]gxajy`ly`gw_ew^hycjzdi|YcwScuPbwN^v\ewbhy^dxaj|VewYgzZfyYcvJ[uM[tZbxZbz_lhnimUbxJ[tWf}`k\d{TczQbzTcyS`wM^v@VtUbyS`vSavTd|Yd{Vb|Sc}XcZh~Yj|Yh}UeYfWe_j[hUdUi]mgrdsgr\kVgVfSd^kZlSfXjYj\kXhVkWnWh`o{js1Q5@Q09N+7K2=O4@R*:O-Oh=NfLUjK^pK[pX_sS_pT]o\_uV\rW^s]`rfj~X^sUYn_ev\aqX^q\asccunfw\duT_uXavcldfwaexcjyP]qGWqARl>Rn=SlARlFUogl}XauV`tP`uFUpEUp@NmAUq>NkHUoDVnKXoL[q?TlBVnGUnCTkJXnU_qaetejv\dtXcwH]rM`tfnzel{Yezdk|ekyVfxXfwajzaixdjwbk{ck|^gwbj{Wdz_gzck{al|SdwTbuWbxN]sFWqBWuL_{SbxW_uw~{{Ye{SazVc{z}nqSav^i}kuXgDTrJXukt`iVgy^ezTby`kQ`yP`zitms^lJ]yUbVhUj_jZh\lbtgsfo[oXiVgRc~ZlSd~Rh~Uj[k^hZkZkYiYjYhTd}dsnucq0>O6AR;FT9FU2AQ,9M+8K7AS5?R2>P1@R+6M*8N2;S8AT;FX:GY9CX>K\9GY9F\=E]4B\>K`@I\8C[7G_P7DS/>P.=O5AR5?Q4?P8?R3@Q,>Q.;O3=Q-G]DOa>Na8D]6F^Mf8I`;LfGYlLVl=Kd9JeKSiKTpP\rNZoH[oGXnP\pQ]pFTjKYlLZpNYpKWoUctR]pR[oU_r]asS^pP_tIVnJWmYhxUdwchtacr^gv`kx`l{lm~soyzwwqm~nufooqkk{`esepci|^fw]hwdguafxmozuru|{znnynnxvrxwwmp{msylucn}gmykr{am}fn}ejz_j|gm~nn~hn|Zj}`l~ho~fn|dm~em|hm}yclzYdxQ`wM^wEXsEXuP^udl}{uxkpaf`g}z{lsrxqtSc{Ve~mqprvz`hHXz?RuTgnuvtpvs[k;OuM_|_k`k\kXfPfUlTj\pbq]kVl[l\jcwszmucp}y{xmuao^kYibo5AR9@S8DT.:L2;M=ET;HW;JY9BW6?R4?S6AT0;O.>S1?S5AU9HY=K\I^8E\7B]7E]6H^2B\3B^>Me4E^6B_2C`1Dc2B`1AZ8FeBOhGRgFTgDViJVkS_qR]pO\nAPgFPj_dsNZjASfGTkNZlBNhBOiBSiHRfR]rOZkEMc@HeKVmT]nOWmOWlRZmP^qO[pR[pP^pLZoQarZapT[n[asW^nQ[nO[oU\p\bq^euXaqV`sR]rUatbixonzpkvnm{osswru~tpkniqrv|~wwwu|swsunp}nrnm|xs}|uy{ryjlynt{pt}^cuVaqhr}mttt\czWdveo|gn}gm|di|ingm[fzPbwUgxalinZg{Tdv|{np~do{`j{cnJ\wJ^wVh~Zg~bkfslqcjdmhot{hqqvtxajUd~pvxytzxPa5FoP`z^lvxquvdmSb}Yh]nenttor`p\l`nfr`mhpfrmrjwdvbs_ogwtly`o\m`n^lerevfsSZfVYdPYgJS_BKW7DS6DT8CV8BT>GZ8EV8EU7?Q5BS2@S@I[?HY2@U:H\3CX*:S/:U2A[2>X0>X2@W0=Y.?[0A\3C]0A]2D_0@\3@_;IfAPj4Ca=KdKRkQ[nFUfKXjHXhGXlQZm[_o[`lJViALfNVkDQhFQfKUkIUl;MgJTkOZnNWjKTjEQh@NeJVmQ^oQ]mNXjV_qZdqMZpO]oO\oM^nK^oUcsflw_gqbfsjjtmo{afvfhthjuno|alybk{agv\fwpq}pqykmxgjxchx]ixSbuQbvUbvcnmudo`i|bj{fn~svqvsxx}|}{z]fs`iy\ivbixffxtozciw]hwdduVasq{ksU]tdn~gm}gi{agyal}bj}Yfxgo~ipem~cl~_j|cj|yxancnovVh{Vg|Vf{Ug~Vb{dh~qvjp_lirpzipmxitVeamy{u|YcJZz\l]i}lukunzitXh~[o_lcjgor|fnXhcmUfZiYmltqvtvuwmsdrgvmzlvdqeqgt`oWieu|SXhPWdQXeGS^FMYIN[DLYDP\JQ]MUb=IW7EU7EV/?R1@S@F[KQc=K[8H^@Qf9J\4@Z:H_;H`1>X3?X5>Z0?[2?[1B`,B]4D`ENgBPeFRiS[nLSjQYnM\mHViGUgNViS\oQ]mWbnlnreen[crBPfJTkO^oYfsV]lGSiFTkLYmV^oZ`pV]m]cr[brT`nbhrcjuahr`htcisWbsZfu[iq\ir]htdoyhmxcitbjwejwTaq[cu[bsP]qUauK^rDWpJXrOawSawWfx\hwYhvSauXcxYexWhzQ`v^g}_jzdl|dp~cn{am|al~blz_kybj}bl}ho|nw{muM^rYcuYfxciv]dwYatahyYauz}rwosdm{co|bh|fj|_j|ag}ck{rynrnq~cl}^k~rw`l~\h|anXf|Pb|XhPa}Zfmvmufn_kquvzhqv}r|]jfrnzgqnuirkqamZi`l\kZg}\g}`i_mZgblksivfpjv_pYrat_miunuorkpnufqbriqpshohuiv_pevjufsMQbMU`NW^LU]IS`HP\GN[BNZDN[ANZ9ET4;O:EW9DV5EX4CV?J]LTeFN_DOcGPe:IaFQa@Oa;E\9D]4D_2D[1@_6E_6IaKVhR\mJXlAOeLWjHTf?Pe=NeBMeMVhEPgT\r]cqWdoZgtXapWdr^hsV]mVds_ju^er[etWcuT`p]gsdkt\do_fsafr[cqZdq]eq]as[`r\fv\et\_q]duVbrYet`guafv[fwU`uZeuUctP_qJYmR\rR]rG[qKXpNZqOauT`wVauUdyYf{TdyScxUdyYcySbwUe{Xg}Vb}Xfx`nzSdzZh|XhyYj|conujwgoiqjsYexWfx]l~gp|jp|dl{^iwVfvfsitrzgm`keq~[hyVe{aj{bm}hrio~lnyzsuqtgrhr{~||swuymtZg|SczO^xTe\l_mah~hp^lgqdnfqisiplqjqcqhs^n`odnkphpclirktpwr{v{{zy{x}qwvzvzgurxxznwqyoxpuovrxswrvotvuptuxjpfpgunvgsnyw}u}=FVFNX=FR?HXMYiDP\8?P=FY6EU8CSAIY9DT:EWJ\7C[8FZ3CY1A[7F_LbKbY4AZ8L`7F]9GaAReLXgIYiALc=MeIViFWjEUgOYmHVjLXlPXmV_rXaoU\oX^nPVkM[pOZoWbrQ[nRZmKSiIUoLXpU_qVarT]nP\pM^oO]pJ[pM]qVcuRatO^sOavVbuL\pHWnJYpKXqQcvP^qM]sHYrP^rVbuP`sJ\sKZsXeyWeval|isv{~zy{jl{il|}trYcv]k|^gzYbyhscm[hz\g{funxqyes]j{cj|sy~|yxhqz`mzhkybky`o{fn{en|el}ip}gn{fq]k}Xfzepryel^f{an^l\k}fpdpfnbrs{txxxtyn{pyhuburyp{kykxnymwnzp|owl|o|xr}z~~vzs|u{owrzuzszqxs{r}qwq|fopxq|r~szy~pzavdxlvjvXkSeVWkcjwOWf@I\IYBL[GQ`?IX8DV8AWFL^BI\7DZ4BX-Mc?Od;Jb8Ib>MdEThATg;Nd=Of?LgKXo[et\csT[mKWlIUjQ^qJWlUbrTcwVatL^qARlCPlN\qJ\nN\oO]oL\pLZnKWmLWnK[oO]qO^qM`sTbpT`rP`sUcx^iw^kxlqzjutzyy~my~tpv|~s{iugn~gq\j~aleqnxeqitkslsjp^e}iucq\jbnbshq^ncoctfvhrgtnvoulvswnuoxyyntjxiuovv~r|v{|z|yzrzw|x~o{vnxgseqpzszo{ftfsmwjq\mUgG`|Oi_ng|sGZ6DW2EY0@U/>V2BWCM]BN]6BV1=X4C\3E[9L`@Nb;F]7G_IOdFRb?Ja=Mb6Ib=Mf:K`Mg8GcDSkU^oNYlM[oL\oT`oWaqX`qQ]oMZo@Mf>LfT]pfhxhlxekyjnzcivdk}op|tr}uwtt}{{{~~}|qxvq[l|j}zr]o|t|y~wuuwpxktlurxrwjvtyqtrxrwoxjvivlshvnwnyr|n|nznzlzlzkuszrznwszqyjrcqcpfo]iZies_lYjn~pwknrwGSeBQbHPbOVeSWf?K\CO\ELX>IZAJY9BT8BUAHVIRcJRaGSeBPaEQc:J[1BW9FZQS`CO`7DZ2@V5@X1D[2F]8G_6G\AJa?OeAPd=Ob9Kc;Jc:Ib6F_1A]0>\+@^5F`BLd_^qqpxpryss{pmtrpwwr{moyfhvnn{wq~}wy~jn{||w{nz~~}oqornunq}im|kq}fp}hjwhlzafx`fuekx_dw^hvZ^p]dryyywkpxks{ktnxr~utv|}r|rxtwovpwnwlwjxjxhvgvl{iwt}lykzqm}gzlvwvt|~wzp|izizq}LYfHR_CHYHQ^FM[DLYFMYFMY7CS7DSOVg`gpBN[MYlKWg9GX?KYV/K\2>V.=X0=W0>X6AZ8H^1B[.?Y1A[7GbHOh\`qoq|}y{ruz|z}|uwz{p|syns|nr|uy{z{{{{~|lowmq{sznwz|rs~tv~vt|uw|nu}psrs|rwmq{jn{ko}nq{otqzoxlvjtounzmymvlriymn}zvv}xsw}~}s{r|szmuiwxqws}tzxuy~u~emszess|qslsmokojsininmnelgmdkfo^k@Q]JVbLYb=GTHO]U[hSWfRZfLXhMZe>GUX.>W2?X.=W1@ZEPe`bu||}}uyz{zxvwv~}xzw}px`jxbo|ou~svwľĸ~~}}vzy|z{~xyyrxirqurzepjo}rxsurvak}em{v{vxrv}twktkrtyzltovdkXg}aqz|grjwu~v~v{w{tyszpxgnfuiwkriskusxoswxwyjtuzLXdKYeAMZCO]MUeIRcOXj[dtOWfVcsNZhHR`GO^BM^CM\FPa@O`BPd?LaSZoHVe>FY4@W-=V2@X/@Y/?X->X@Mfhhyx}wtydkspou||{{ssvy~}}~~suhp{uxu{nnyƼȾùʾļû¼ƽĻúúy}x{{}~|}rx~~etgscscupviqjwmvsvowqxBN^AJ[BPaNYiPYkHUeT\rao}M[kFQbPYg9EVIRdCN^CK\@JZ8DV7G\IZ?K\BN_DQb>K`>Ne1AYPZpqs~~{}{~z|}}~zyzyww|¼Ž~~~y~~z~}ovlwgvavjvqxuys~v|vys|w~w}znxw~y|rxrzq{q|s|y~|{ywclcrjuiwkvmxlwqthoxypotz{lsBTeLYiYaqQ[kR\kKYdRXiVasOXhSZlJ[jJW`5BT;H[DSbFO`>IZJSgGPcAL^FM[;HZN]nWpybvyxw}zzu|~z{zx~}{|s{jvjqqw|||}luyxzmp{blwimyegufm}mqwyltgvgweuiwlxw{~ns{q{vxnumzkxmwmxiwl{lsgrnxmufpcmpxarbk~cjzqzbj}]f|Yi{^j|O`jJXeZ_p^ivK+26*KRcHWhDReHQeGSeDSgEThHUiDXhGWkFVjHVjIVjGWlHWnJWlIYmIYpKYoFZmG[oL\qM_pN_rOauRdwXk{Tj}Ti{Vi{Xj|Uk|Ui~Xk|Yk~Yi{XgySj{Tg{WfyShySi}Xf{Vi{Xj|Xh}Xh~Xg|Yh|YhzUhyTk}Wj}Sh}Qh}Wi}\l[k~Ym]n\p]paocrzx|zw||||x|zq{r}}|vx~x{szs{q{lzgxgxdxcybzdzg|l{n}v~hzexkxnuruxyjlv`bnU\i`dqbbjijlnmnntrorr{ytrtunns|w}ïñz`iwfny~vwrucjyoymubl{iq}bkz^l|dl}bhyaix]lzijkkmtyznzflx`gpPYiM[jGUeKRdBQdCS^HQ7?E?=EVGRcO[aQWdGTgEVgEVgGVjJViLVjKXkFYnGXoIXmHZnH[oH\pK\pOatel|jo~qp}ts~nvvvrx_kx_izYj|[kXkZj~XoYoVl]mtqppzv}~{yw|{tw|~|po~ionrtxlqWgz]h~Wh~Vh}TjYj}\j~Yj\i[l~Xm\l]m\obqhuktgrgshugtisgrdreshrgteufveyfzfzgyezfzhyeyeyfyh|pyr{~~~tvhoydhsZanchsllpzwtwtu~~zu{įlnzdmxahvuv~wz{owov~iohq|dmzfnzcm{Zjx]hx`hwbp~YqUmxRco[fq_frbmz`jvYbpR\kPUfIQ`DOaDNaBPaDTcCTcDTcHUdKWfO]TCM&:@7FJIO[[EN,,0)=E6%+>EPJ]nEYmHZpJ\pK]rM_rIauIbsQ`sS`tMdtOatSd|_r\uuvquR`tXczUdyWdzUg|Wg{\f{Zj}\k}`j~^jZk\l_l]l_m\q`rcretctetduetduds_uesduevdwdykzq|y}wvztsw~pqv~y}~~~yy|{{}|zyxyxz|x|xwyptyzvznpw|{zyv|||~|zx~xyywzxkshr~gs|mqyiozenyCZfDXeJSdCUeDUfFTcITaDTcBSfAUdGVgHV`:D;:C2KT6DN4DO.L*#*!'26'+."+,((/'0796A7DJ9KXjK\tJ]qK^rI]sM^rM]sM^tL^rIaqL`sQ_rO^sM`wLbtL`uLcuRawScxQfyOhzSg}QiRi}Ri|Ui}Vi~Tj|Wh{Wk[k_l[mXq\q_o\p`o]o]r`pbpaq^q_s_q_r]s`q\sfuqxt|w{~~yio^lks|vsw}z}{~}|}~{mouhmq}}}~~}zsy}w|t{yx|}vy|v~z|x|rxts{wt|lmymqzgmydmx\nw]ksgrwep{jtju~nw~nt}fs~sylufu~ju~is|nsynpwltxx|~ouyBXhBZhC[hC[fEVhFXiGZkG[lI\jIZQEM6=D7JR5UU9CM.LX49I*>E'7@'$)  !%#*/8"61:$,&*#')-"$//--6*&-EK,CG:JW+QMJßţ£åßp>I_|}vwnwvyywyy~{xywxxw~{}{yx}y|x{~~xtykry{|}opwjoxknumnyzu~zvvklradk`hqR\h]bkahrnq{fgqafpmjoztzvouvutpss|xxtvywwwrsupruorwptvqyyqxzkprfosktyhlumrwety]lt]nstu|suxXiJ->+1(+05!&,48%061.8!2827#;F&IN8{z ¦ĥãߢħ£ġâĩŧë{5CVhhp|yrvvx|r{yxyxs{xxz}{{}vw{}zy|ux}~~|{}|}}|{~wztsvywxsqvkqykmr]erou}imvbksfqt`luafs_fpXdoUamrpw~iounmtllrkptrrwttuwwznoyils{~qtvouvjrvtvwrsunuz`htjwzΪyyxz{{~~y}}|{nxh@M#9D"5;#7?'(1)3",4? 28!:A'=F(HP+GN-LNFrrugogFP:`gY?H*QFD}5GYimxzyyux|u|xszxy}}}{xy{~yz{|y{kpo|{{{}pprxyclpelmknpprs~uyilwwtussvxajrfhoontlmqgotkotqnumptgosiorlppkppnoninoainQ[jpuwxyyqwysvytrxggplu|koyhr|ioxmr~gqzjlump{fpw>M2.=.67=%?L'8D .71:!1?(*!/54:!@C+Y`RR[S+3&0:$dfZUa=X\JĽ²]dimp{q}yvsss{l}skw|~zyv{vuv{}|}{z{}~{}~gkqhnr~|~~|ko}}wrp]bmjipmpqelncjodknegmcjncjllmpnsqilsjnrfkoYbo]gmhns`jsutuywwqwvqwtrsx~go|jt~or{mpzls|or{qsuQ_Czq`ujwqLY^0sqO{bm}xzxust{}{~z{|}}~|vxll{xxzv{uwvu|ut}{ypxpr|~{{opu_bndkqqxumrtlstoorgkmimnhin]ek`gmgknbei`fojkr_dpafn_dm^eojnt{ywwruhjpafqnwms|mr|lr}hmwqxsz[el?L21;5@!&.,0!59'06" ",0!*/$(HFPWZ\FJA,5 ,4%/9.7>@7@C>@GP0)/38!8@$6@%1; :@-;G).5"&%,.7,23;$5>/VVX@AFom{smnptw|ycQZ7>E'6<:F#39[`;]b:GP'@H#2<#=H'T\,NV+Y_,OV'-7JJ8xv{~~s}npĨ~wzzzx|{zx|~}|{zvqo|pqxoouimsgjslq~oulsswqyw{xz~}eojp}~}}}npnstroqpwwo~trqnw{qwwmglk[dg\df_gkY`cagi_dgtyu~~uuyYae_caosiY`fHQ^Sdhzhfq^dggikdjedto[fgXceYac_ghegj`dhZ^b]agbfj\dm[cli}gR_Kitipzqs|tlvlafa~}N`G',,0!)/%),!-6"8B(4<$.5!&+8?+=B229+JOHwxx}CM)AJ)*/HN/:B#6B%8E"DQ&GL)MH(5;!.7IV+4<77#.6@@/XJDMAAOF@|ob|~~yv{xyzzzzz|~wpvifotoslilutp}yrx~nv_p~yyvwtsucfjckklnngjm^gimokxvpy|sfwut{~bknq{pqyphkfzzwvrvvxqrl~Z^`syW`ef}x|y}|z|ou{|v8D>#%$(0$-'/*09$>I/BO;B'GR->J('1IQ.MQ+HP)GU*4B!25!KW0/7  >=>{np{}{xxxtstpuuoskloekm`dfifgphiwqo}xru{z~yvustruernv}sqxsr]afNYeS[`nsojjlY^eJU_]iiouqRZ_æ|yejiV`bS[\Y`fywƬƷǗw|wfmsOT\C@PGLU";A@DNAFQ?>G7R]JQ]NUcRVbSoxnfqYYgGRZ7JU,6?#79)9=##'18!BL*59"MU/5A!,436;B'?B0**% #pvwu|v}ko{{xy~}~~|{knquvy~wuwafkdgjippfkn^fmnrou{uhlm_hr}|{radew|{Ŀƶٯi`jklwlis~{ltx^ghO^Y49:.389>ITY]edp|fkcSXGLSBRSBRV3#( &'0(.BB.30,/..)('%'%!skx~vz}}\akV`ju{tyimrcflcjnjmqglrzvs~zsahlmu~֦ѯǶ̺ӤĬÊ\fcÿǺƼͬꬉzk]cghnomy~w|}nxzO[]QV]|nui_kWR[CS\EHP=jr^_hU #$&&)2-+--({vtttwzxz~y||yzy{xwwuvxx}}}}hpzz|{}|z~|z\bhSW`_dkbhfutmcefS^aQZ`adgbehW_f_da[^b[^_w}taknʭɜŸ©­|mml}ypy|xv}~x}~tz}v|{wz}z?FU-4<*,+!!""&&)>@C397.03[[jlo~hoynryrryppxvs{~w{v{yz|tztp|z~}~~zzv~z~~~|z{w|t}wu}qsrqlpjphngk`k\j[f|Ue|Uf~]j~Zk{Zey[du_g{^i~_lbnbm\l[j\n{z||qqq`ghaeh|zwghecficfjchlkkn_dgbkflnh`kmʟz¿ɦ{nrǶùðïȿnt{rvz|||vzx|y|{~w}s|~w||}vt|w7:G6:M33H('<-!,Z`k\ejefjV]YEFETRTLLL()&(-.T[aW\cU\f[_f^djW\dMXeP[hU]kT^oWas\bqV`nWco`hxkr|mt}pu}fmy[cwVaxS_{PaNc~Pc}Oc{Pc{Nb~Od~Yh~SbzTczOc}Ra|Ne}Te~Wggp{XajQUbgjmemq\gndjpkpw]j~XlTl}TdViUg]jlrwy|wadhfhl||ufhg`hidkihmnksmiji[ddgf`ĸvtztz~[X`|r}ƴĬju}x{|oz~uzy}}{~~|~|}xyrx}os|]alss{nnxmk~nqtPMUtp{~~z|CGC06>HPR*13@FIMQSdemilvplt{{}svtsusnqkovluzwyzw|{trxus{zy|y||vutrspiklt}visw_gs^drXamVbpX^lP^nUeuiiuwy|nvqu_gx^ftepnTkg]ignsspvq^if_dffekZ]bwlvbnXdyTc{Nc~Sd}Vh_mjpnvvy~yvtmdkf`dc~xxsosgnlaggeim[cg{ͷ¯Ŕkktabn|||}ξҼŶyt}r}sy~y~y}y~tv~x}v|x{||}}{qmw}~|~wy}~ou{jpySX]GFPpo\_ctq}uv~igpyOM[NK[vxutuwsy|ycbb;?GPRdmq|_hmjmvsuzxw~~z|ѳ}ぅ|´p{`nVf}QdyN_wO^yS`{Zf}bkjnnp~|{}suqpsyttzvwutglmؼĮϪzo|ưvu~w~wprzss}xnrywxz{z{wy~y{||enrNN^ON\>BGHHPX^aT[^TY\RSYbekbfikmrkmsckqirt^dgbemcgmWZdRR[PLUCALBBI=8B32>-.4)+. !%/06SPT[YZnnkacbjfjlimb^dolqjmnfdf\\aa`eqqzxxzhjjYX\ddfa__a^fjflkeikdlztyvrulfr|qjstq|||wsovqqzskr]Y^gdfrpm}vw}w{pqu|uwyvvxvyGSXNV\V^eY]cNQXJOTHEOVX_TXZUWZihmx|~bklQSZeehNPUAEL**0)'.336458244FGG_dc\d__^cmjohgmunwhkohfhhiimorcejifkY\aikollofdjidjlookjjpnlqnpxtw^Y\d`awmmzxyb`_ppo}u{{{|wvhhsa_egcgXY`_^d}~~xxx~uxy~y~vw}||~~~}UY^OW\FNRKKP^cjeqtcnodstkz|kx~pu{aenV[e?EI+'1;7>/36!''KDGb^]TUU[[]\]eZXbopufgmZZ]WX^cdjgfpvszjilfcg^`dfhlbcghhmabeootjkngcgxkr~~yxvbZ]xru~}x{zz{xswvquwny||zw}milpopdcdacf}}}|}{zvx|yz|urypkqqnrnmppottrx|Uc`Sa\Zb`fqlvww|q}CQ[$)5'$&*//.BCDNPSTTVTRVYW\TVZVW\Z]bPX\W[aghobhj_ciehn^ahZ\ea_hiilgikikn\acdejlourmwkjonmnfdcqntttq|vw|~vy}|y~pottr|jiwxr{d]cZY^hdi{{~yuvvuu}uyyv}|{{{knsmlpwntnlmruv|}¢Q\Z310MIB[\`QU\BEK'%,%'/"&'IIIZZ]]\`TXYWSXbioYbe\_dZ`bjpthpqilpcio`em^cgcemnswdjontrw}pqvgjtvvou{mt{qzz|y|z}}yzy}{wuz}vxur}nmxmlrqlp[]a[]`hcefdhurv~~ww~uyxz}z}ttytq{zzwztsw}~~~~{}srx}}zx{QCPWSZAHH=F@DLHBMKS[\_lmQa_N`_LVT^fiiqsdnqRX^PRZcillopdntjst}}orzpu}ryzeei_glopznlrru~wnvmu}lpuajr^`kor|sx|ptyuuuwtuzqv~v~z{x}xwy~lllvw}ljqqtt}tz}z{}jlo[W[xswtsv{yuu~|zx|~}~jasper-1.900.1/data/images/goldenears_gray.ras0000644000175000017500000003144010554235561020176 0ustar ernieernieYj`0  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~||||û|||||ûûûû˻ûûûûûûûûûûûûûûûûûûûûûûûûûûûûûsûûûs[KD;ûûûs;;4;DDûûû[;;;;;;;ûûûsD;;44;;;;ûû|S;;;;;;;;;;û|K;DD;;;;;;;4;ûlSDDD;4;;;;;;;;;ûûlKDDKD;;;;;;;4;444ûlKDKKK;;;;;;;44;44;4ûûûûSDDKKDD;;;;;;444444;44ûûûô|SDKKDDDD;;;;;;4444444444ûûûûû[DKKDDDD;;;;;;;;;4444;44;4ôûû˴ûôlDDKKDDDDD;;;44;;;4;;4;4;;44ã|lddsôlls[[lllûûûûûûûû˓SKKKKDDDDD;;;444;D;44;;444444SSSS[[[|ì|dSSS[SSS[S[SSSSS[ûôûûûûûûûûûãsKKKKDDDDDD;;;;;4;;;;444;444444KSSS[[[d[[lSS[S[[[[[[[[[S[[[[SSû|sûûûûûûûûûûû˜DDKKKKDDDDD;;4;4;4;;;;;4;;444444sSSSSSS[[[[[SS[[[[[S[[S[SSSSSSS[SSd|l|sldddd|ûûûûûˣSKKKDDDDDDD;;;;;444;;;;;;;4444444SSS[SKKSSSSSSS[[[[[S[[[[S[SSSSSSSSSSSKSSSS[lsllllllldûûûûûûû|KKKDDDDDDD;;;;;;;;;;;;;;;;444;;444SSSSSSSSKSSSSS[S[d[S[SS[S[SS[SSSSSKSSSSSSS[[dlddldlddd|û˻[;DKDDDDDDD;;;44;;;;;;;4;;444;44444,SSSSSKSSSSSKSSS[[[[[[SS[[S[SSSSSSSSSSKKSSSSS[[dddddddldsҬ[DDDDDDDDDD;;;4;4;;;;;;;4;44444444,44KSSKKSKSSSSSSSSSSSSSSSSSSSSSSSKKKSKKKSSSSSSSSSddddddddddsˋDDDDDDDD;;;;;;;;4;;;;;4444444444,,4444KKSKSKKSKSSSSSSS[SSSSSSSSSSKKKKKSSSKKSSSSSKSSSS[ddddddddddˣ[DDDD;DDD;;;;;;;;4;;;;4444444444,4,44,4,KSKKSSSSSSKKSSSSS[[SSSSSSSKKKKKKKKKKKKSSSSSSKSSSSddddddddddl|ҜD;DDDD;D;;DD;4;;;;;4;444444,44444444,,444;;;KDDKKSSSS[SS[S[SSSSSKKKKDKKDKDKDKKSKKSKKSSSSSS[[d[d[dddddd|˻ôÓDDKDDDDDDDD;;;4;;4;;4444,4,444444444,4444,,,,,,444;;KDKSSSS[SSSSKKKKKKKKKDDKKDDD;444;;DKS[S[S[d[dddddddds˻ûKDDDDD;;D;;;;;;4;;;4444,,,444444444,44444444,$,,,,$,,44,44;;DDKDKKKKKKKKKDDD;;;444444;4;;DDKSSS[dd[[[[dddddsKDDDDDDD;;;;;;;;;;;;4444444;4,4,,4;44,444444,,$,$,,,,,,,4,,,,44,44;;;;DDD;;;44;4;44;44;444444;DKS[[dddddddddd|||||lDDDDDDDD;;D;DDD;;DD;;4444;;4;444,444;;44,4444,$$,$,,,,,,,,,4,4,4,,4,,,444,444444444,4444444,44;;4DK[dddd[dddddl|||||||||llllssdKDKDKKKDDKKKDDDKDDDDDD;;4;;4444,44,44;;44,,4,,$,,,,$$$$$,,,,,,,,$,,,,$,,4,,,,,444,44,,,4,44444;KK;;;S[[[ddddddddls|||sssldddd[SKD;DD;;;DDDD4;;;;;;444,44,,,,,,,,$,,4,4,$,,,,,,$,,$,,$$,,,,,,,,$$,,,,,$44,,,,4,,,,444;;,444;,4;D;;;;S[[[ddddddldllss|sllllll[[SKSSKKKKKKKKKKKKDDKKKKKKKKDKKKKKKKKKSKSKKKKKKDK$,$,$$,$,,$$,,,$44;,,$44;;;;,44;;DKDDKDDSKSSSSS[[[[llssss|||||||||sssssllllldldddd[[[[[[SSSSKKKKKDK;;4444;D4;;;DKKKS[[Sd[[dddllsssllsss||||||||ssslllddd[[[[SKSSKKKDDDDD;DD;;;ddllllsssssssss||||||||||||||||||||sslldd[[[[[[[SSSSKSDKKDDD;DDD;;llssss|sssssssss||||||||||||||s|||||sllldd[[[SSSSKKKDDD;DDD;;4444444ssslssssslsssssl||||||||||||||||||||||||s||||||slddd[[KKKKKKDKDDD;;;;;;44444,44,,4llllllsslldddllsss||||||||||||||||s||||sslld[[SSSSKKDK;D;DD;;D;;;444;44444,,slsssllld[lllddlss|||||||||||||||||||sllsd[dSSSKKKDDK;DDDD;;;4;;44;44,44sld|lld[[[[[ddlsss||s|slsssss|slssl|sss||||||||||lll[dd[SKSSSDDDKKD;44;;4;;;4;;;44sd[lldlss[[[[d[ls|[dlll|l[ldS[sdl|llls||ss||ss|||sdddl[S[SSSSKSDDKKKD;KSD;DDD;4444[dl[dd[[[dd[Sdssllssls|llds|ddsd[llSKSd[ls|ss||||||slslddddd[SSSS[SDKKDKDKKD;DD;D;444ddld[[ld[l[SS[lldl|dl|ldSddllsslld[[d|ss|sddssssls|||||sslllldd[[[[SSSSSKSKKDKKKKDKKKKDDssslsl[[[d[lldd[lssls|slssldslsss|||ldll|||s|||s|ssssllddddd[SK[[SSKK[KKSDKKDDD44DK;ll[[dlld[l[S[d[S[s||ls|||s|||s|s[S[[[KSsll|sss||||s|[||slss[S[dddS[SKSKDK[;;DKKDDD;;;4;KD[[d[dddlddslldds||||ss|l[l|ssldllslllds||||sllds|lsss||l,K|l|sssdsldddd[Sd[SSK[SKKKSKD;;;DD;;K;[[lslllllld[dssslls|||ss|sd[lddddlsl[lldssls||ss|[l;Kd||lssld[|sd[[ddSKS[[SDKSSSSKDDDDDDD,,4ldddslll[llssslsllsssslsslssdl|sdds||lssls|D$|4 S|ssssssllsld[[KKSSKSS[[SKSK;DKDDD;KKDdllddddddlld[dllls|s|||s|sdd[d|llsss||ss|||[s,lds|s[dssld[[KS[d[D;DS[[KDDKKSKD;;,ddlsllsssddddlll|ss|s||s|ssslsdS[|lS[lsl||s|||s||s|[D[|$,[Ëss|l||sl[[ddSdd[[[[dd[SKDSSKD;4,;SKS[[dlsssslslllldddddlsssssslldlll|ss||dd|s||s|sKK[|d||S;||ll|||||s|ssllsddd[ddd[d[[SS[[SSSSKKSKdlld[[l|ldl[dlds|||sdsssss|slssds|sss|||sls|K;DS[sddңs[ Sl||||sldllssl[ld[dSSKSSS[[SSddd[SK;;;4[dllsllldddddld|sls|s||ls|||s||||llss|||||ssssss||s[$DDSdKD,l[4Sldls||sd[[[dlsldSS[[S[ldddl[SKKD4K[SKS[Sdd[l[[SS[ddddlls|s|ssll|ss|sssssl|ss|||||||ssssldl||slsD,$$;; 4SÃ|sddlslllddld[[ddd[S[[d[[SSSKDKDSD;Ddddddlssddddddlls||||||||||ssss|ll|ddl|sss||lss|||  $ 4Dl˴˴|lds|sllllll[[dd[lld[[SKKSKKSKDDD;;llldlllldlddlddlsss|||ls|ss|sss||ldssls||||ls|s|sslsS $,Dl[[lssldd[[S[SS[ldd[SS[dld[[SKDK[ddlllsllldS[ddl||||||||s|lss||s|sss|ss|||||s|sls|||||D $,$Ds|sldS[dd[SS[S[[dld[SSKSSKKDDddlllsllsddls|sssdds|||sssl||ssslsldldls||||ss|||ss|ss|[  $4,$4DKdl||||sld[[ddS[[[ddSKS[[[dlddllllllssllslllls|ss|ssslddSSds|||sss||s|||s|s|S ,$,4$,4DKl||ô|slSS[SDDKS[dlldddls|||||sllss|||s|ssssssslllslsssssss|s|sssssss|||||||||s|s|lD$ $$4;KK4$,DS||ssã|sldd[dd[[[[dlllslssdds|sdlllllldlllssslllllslsllsssssslllllls||s|sssSs|SdK $$ $4;K;4D44;;SS[|||ls|d[ddd[[ddddlslldllldlllssslssssssldSSddd[[S;;KSdllllldllllllsddss|SK,4S  $4,$ $,4;;;K;;K[[lldddddss|l||llsllldlllllllllldllsdd[Sddd|slldllS4;;D;;D;DKDDdsllllls|||SD[$D4$ ,  ,,,,,D4,44;;;;d[l[SdlSss[S[dlslsdlldlldlsslllldslsslSDDD;;4$$4$4,4dK;4D;444;[SKDK[||||d4S;;    ,,$ ,4DSK4DSSKSK;SKKSKlldlldlslssllssssls4 ,,$$,,$,d[ ;S444,$,DDDD4$Kl|d4Ss[   , $$$,;KK;DDKDDddddddddddlslssddddK$ $,,$4;4;DDK[S $$$$,$,4;KD;4Kl|||d ;[[$     ,$$$,4DKD4dddldddddllsslllddldS;,44DKDDDKS[[dS$,4,$,4K[K;Dd|||||||S       $$$  ddllllllldld[ls||s||s|sl[SSSS[[lsssdD;DD;DDD;DDDSS[s||s[$          llldddldd[[[SSS[llls||lsdddlssllldSSSKSS[ddd[dl|||ss[D4,$$           ddd[d[[dddd[SKSKSdll|sssssssslsssss|s[[[dlldlddddll|s||||ssl[K;,$        [dd[[dddddd[dldlddddlllsssss|||s|sssssllsssssslllllsssssssd[[K;44$ 4           [[KS[[[dddddllllllssslsllss||sss||||||||||sls|ssssls|ssdSKDD;;44$4 Ddl         [S;DS[ddll|dlslss|s||||||||||||||s||||||sslsss|sssllllldd[SSDS;$,$$$DS|s        S[[SS[dlKK|[lllssss|||||s|||||||||||sslss|ss||ss||ssslsd[SSK;;444DDDD;4,,$ $$      dddddd[;,D[Ddss|||||||||||||||||l|||ssssssssss|||sss|||||s|ld[[[[[[SSKDDDDD4,$$$,,,,$   l[d[SSD;;4SSK[ls||||||||||||||||ssss;s|sllllllssssss|||||||slllssllld[[SKSSSKD;4$$$$$,,44DKKDK;  4;SKKKSSDDKSdllss||||||||s||||sl4l||llllsslssss||||ss||||sslddd[[[[SSSSKKK;4,$$,4;KS[[4DK;4,, ,K[[[[d[[[ddlssssls|ssss|s|||llslllK;||lKd[lddll[|||||slsldllllddd[d[[d[[[SKD;,$$,,,4;4;DKS[[[KK,ld[ddddddddllllsssssssssssK[sKD;d|d;4sl;4|SSKDS[Sl|||||ssslsssllslllddddddlld[[SD;,$$$$$,,,,4;;KS[[,[[dlllddldlllsss|sllsslssSD4[l|[4DK,|KKD;KK[ls|||sss|lllssllsssssllllllldld[[SKDD4$$$$$,4DK[DS[ddddlddlllssslllssssss[$;DK||[ls[D, DdSDD[ls||||slllddlsss|sssssss|sslllddd[[[SD4$$$$$4D;S[dddddddldlllssssslsssl; ,44Dd[ldD 4DKKl||||sslld[dllss|s||sssssllllllld[SD;4,$$$ $$,SSS[[[[dddddddlllssssllsd; DSK[|dK[S;$,Sl||ssslldddddllssssslllllllllldd[SD;;;44444;[d;4$$jasper-1.900.1/data/images/README0000644000175000017500000000047310554235561015204 0ustar ernieernieThis directory contains numerous test images, stored in various formats. goldenears goldenears_gray A picture taken at Golden Ears Provincial Park, located near Maple Ridge, BC, Canada. stawamuschief stawamuschief_gray A picture taken at Stawamus Chief Provincial Park, located close to Squamish, BC, Canada. jasper-1.900.1/data/images/stawamuschief_gray.pnm0000644000175000017500000007174210554235561020734 0ustar ernieernieP5 199 149 255 ûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûûãûûûûûûûûûûûûãûûûûûûûûûûûûûãûûûûûûûûûìûûûûûôûûì{ssì{s{{{ûìkkdskkddddd[ddds{ssskdk{{{sssssʣìddddkkskkkd[T[kkdkddkskks{kkdd{k{kksd{ۻʻìs[[kkddsd[dd[[d[[T[dd[dd[dkdddk{kds[d{ss{sdkdûûûsss{ʬddd[[dddd[TdskTT[TTd[[d[TT[[[[[[ddkdTdkssskskTkkssdkʴ{ôs{s{ʬs[LLT[T[TT[dT[dkk[TTTLd[TT[TTLT[T[[Tddkkkkd[{k[kd[dkks{kûʬ{{{{ûìsss{skk{ʴʴ[LLLLTTT[LTTTL[TTTT[d[ddLTTTTTLTTTT[T[s{dk[dTdsdss{sdd[[[dksӻ{{ss{{ss{{{ӻsssssssksôûӻ{dLLLTLTLTTTTT[T[[Tdd[kddLdkTTLTTLLL[[Td[[[[[T[dddkkd[[kskd{{kskk{{s{{ks{{sddkssdûû{{s{{sssks{skk{ssʻôʴô{LLLTLTLLLLLLL[dTT[[dsk[ddLT[TTTLTLTTTTT[d[[T[[T[[sks[dkss{s[{s[dksks{s{kdskkdddd[k{kkӻôss{{{sssskssssssss{{{{{{{ss{{ssssTTLTLLTLLLLLT[TLTdT[[[[[[TTTTTLLTLTTTdd[T[[[s{T[ddT[{s{d[dddddsd{s[dk[ddd{skkddksdddddkdddks{ssksk{{ssssssksssksssssss{{{{ksssssskss{sssss{{TTLLLLLTTLTTTLTTTdddTTTTL[[LTTTTTTT[[dd[T[T[d[[sdkd[[s[[[[[s{{kdddk[sssddk{skdddkdkk{kddkdddksd{{ks{sks{ss{{ss{{{{sssskssssss{s{ssks{s{skkssss{s{ssssssks{{s{{{{sTLTLLLTTTTTLTTTTLL[[TTTTL[[TTTT[T[[d[[[[[[[[TTkdkk[[[[[[[[dddkd[[[[[[[dddk{{kdksdks{{ddkksdd[[ksksksdks{s{ssss{{s{{{{ssssssssssss{ssssskkkk{s{{{{ss{{sksssksk{ss{ss{{{[[TLTLLTTLLTLTLTTTLTTTTTTTT[[[TT[[dddkdkd[[[T[[T[[T[[[d[[[d[[[[[d[[[[ddddk{{dk{skddsksssd[dssss[[T[dkkkkkksss{sssss{{s{sskss{s{sssssskkkkkkkksks{sssssskks{kkkkssksskks{{{TTLLLT[[TTTTLLTTTTTTLLTTTTTT[[TT[[T[[[d[[[TTTT[[[T[[[dsd[kskd[ddd[dd[dkk{{kddssdddkkskkkdd[[T[d[[[[[dkssskkkss{sssss{{{ssss{s{{sss{sskskkkkkkssssssssksskkkksks{sssk{ksss{{{{ssLLLTL[[TTTTLTTTTTTTLLTTLTL[d[T[[TLTT[TTT[T[[[[[[[[[[[[d[ddksskdddddddkkkkkdddddkkddskd[[d[[[[kddd[d[Tdkdskksk{ssss{sss{sss{s{sssssssss{kskskksssssssss{sskkkks{{{ks{sk{kkkksskss{{{s{ssTLLTTTTTTTLTTLTTLLLTTLLTLLdkTLLTTTTTTTTT[TT[[TTTT[[[[[[[[[[ddk[[d[dk[kkddsdddddddd[dk[[d[[kd[dddd[[[dddkkssssss{{sssssssksskskkksskksskkkkkkssss{{{sskkksssssksssssssksks{{{ss{ss{sskss{sss{ssLTTTTLTLLLTTTTLLLLLLLLTLLTTLLTTTLTTTTTTTTTTTTTTTTTTTT[TTk{d[dT[[[[k[[ddssddd[dkd[[[dd[T[[dddkTT[[d[[dddddk{kksssskkskkssssskkkkkkkkkkkkkksskks{s{ssksssssssskkkssssskkk{kk{skskss{sk{ss{{{{{{ssTTTLLLTLLTTLLLLLLLLLTLTLLTTLTTTTTTTLTTLLTTTLTTTTTTTTT[TL[sdT[[[[[[dddddd[dd[dsdkdTd[d[T[[[skTddT[d[[ddddkdddsksssssskssssssskkkkkkkkssskkkkkkkss{{ssskkkkk{sss{{{k{{d{kkkkskks{{s{{{ssssTLLLLTTTLLLTLLDLLDLLLLDDDLLLLLLLLLLLLDLLLLLTLLLTTTTTTLTTT[TTTT[TTT[[d[dd[dd[dd[ssdT[[dTTddsd[[dk[[[[dd[[[dkkdddkkkkkksskskkkkkkkddkdkkkkkkkkkkksssks{ks{{s{dkks{{ks{{{ds{ssssssLLLLLLLTLLLTLLLLLLLDDDDDDDDDDDDDLDDLLLLLLLLLTLTTTTTTTLLTLTTTLLT[[TTTT[dd[Tdd[[[TT[[[[T[Tdksd[d[[d[[[ddkd[dddkkddddddkdk{kkkkkkkkddkddddkkskkskkksk{sksskskkssssksk{{{{ksss{LLTLTLLLLDDLLLLLLDDDW|؁׉ٖؑٗڙڜڢܣݦܧީެ૽ᮾ୽઻஻ా᰾᱿謽窼禺磺硷桷桶埸楹梷更䕱攱畲蘲数擰環環萱葰璯瓯瓯瓱摱瓰環摱瓱瑱撯環撰摯瑯瑯台摯瑯瑯琯琯撮揰咰䎰可䊮㉫Ꮁ挰\s2<]/8R.7P4U4=Tuv{ڀ~}܅݆݇܅߆߈ވዮ⍮⏯⑰☱⠵⦹⬻䮿䱿鬾驾証秽髿笿穾覼襻碹碹蠸螶蛷眵眵癶癶皵瘳疳甴蓴蔱蕱瓳疳痳蘳虳薳蔴瓴瓴斲疳蕳畳薳瓵啴疳疳擴擴蔴攴唳擳擳甲葳瑲咱摱珲厯䓲蕺^u6Cf1:T1;Y.7S*6S,5T0;U3Qw2=Y5=Z2>Z4=W/:V.9U1:T0;S2;R4:Q{|{~|~݁݁އފߊᑯߓᛵ⩼訿覼磻裻袹螺蟹蝸蝸霸蜸꛹蜶蜶靷相蚷睸砸瞷瘸蜶瘷晶蛷蜷蛶薷陷藷當蔶瘵薶甶疵閴蘴薴薴铷畵畴瑸攷敵薶疷喷痶敵䔴䛺꛾푱d:In4?\8A\6?[3>W/Kk;E`@Je@Jf>Gc3=Z1;W3;V/Je>He9Fb;E`2=W,7S/;T2;V/:R/8Q,5P+6P+4M+5N.5L/5L.7M,6M.6Kیۑڕڝڤۣޤݦݧߧߪ߫᭿⫿㢼㞻䟽埼壿ꞿ頾ꝿꞽꚽꚼ隼隽蜻霻ꜽꚼ꙼ꚼ霼霽랾韽鞾꡾ꣾ顾顾ꜿ락靽靾ꞽ雾ꚾ靽Ꞽ락鞼Ꜽꝼ韻Ᵹꝼ꛾蝼蝼蝽電蜽h~ETq9E`>Hc@Kg9Hf5B`7B`9C`5>X/9S18U1;U2=W-8R+7R,6P-4N*4L)3M+4M)5M,6M+4K,5Iٖٚۜٝڠ۞ݠߠޠީ૿奿㢽㥾䤾颿롿ꟾꝿ蜾靽ꜽꝿ霾靽ꞽ뜿Ꞿ鞾ꞽ띿Ꞿ럾롿꠿Ꞿ띿랾쟾렽靾랿럾럿ꟿ頽럽ꟾꞿ蠽꠾鞿韾響蝼쀜G[|Hd:Fb9C_7B^5B_4=Y09U29T19S0:T6=T3:R.7P-7Q,7O*6L,6M,6L.6L.7M06K/5Iڍړۙڞۡܠܠޝާ堽ؠҡ׬ꝷԖԦ렾磾靾眾螾靿頿ꢿ럿ꟿꟿꞿꞿꟿꢿ꠿ꟿ렿럿젿顿ꢿ꠿砾\o9Ca8Ec@Lh=Ie:Fc:D`7C_8B^7C^3@[1;U/9T,3P*4P1S0:Q,6Q-7O/8L/7M-7L.4J-4J*3H+3G+3Hܑݖh;MqFTzCW}EX|KY~J[M_RaDWGZUqD\DUL]FYJ\F[G[I\J\J\LZLZEX~FW~HW}HY{JY{I[GX{CTxmvhzdwnp}Ԥ7FgHc=F^:E`:D^9C^5@Z0;U,:T,7R17R.7P,7Q+8P1:P19P1:O4TwBSyETzEW|GZFYG[J^L\GU|FXKZJ[FYIXHXHYG[FYDW}EW|EU{GX|EXzCUwDTwETxGVxHXzIY|FSxRhÑcSig{cuZnQeQdReQgh퓬IUw=Hb@Lh>Gb;HbIc=Ga:G`8D^8B]9C\9B]9@X9@W3Pm@OnAPoCPnARpBRq@RqDRsDStBTvDUvDVvETwGWzGVyHW{EVyCVzGX{EUyEUxEUxDTvDUyHUuFTrFSkFPhDNgENgFOiCQjCPjCOjAQmDRnGSmCRoESoETqAQrERqESsCTuP_QfOdTgRfQeNgQfShRf^uֶyPnAPnBQoAPn?QpASpBSr@Qr@SuBSuDUvGXzHXzFXyCUyCVxFUxFTwBVvASwETwCSpERjEQgCNf@NgCMeENfFQgHRjGQh@NgANfAOiHSlFSmCRmCSoCQnDPmCSpERqHTsL^OdOcPdScOfOdNdQhNePhŭ퐣K]y2?[U3>T-8Q-7Q19P3:N3;N.8M-7J-5I,3I,5K/7I,4G+3G.4G/5G,4G(0E)0E)0D,2D-2B-0B,/A+1C?Rl>Rm=Qo=Qn@RpCRoBQpBSqDTpCSp@RqCQoCSqBTsDUtGVvFWwEWzJZ}GVvGUuDUv@TtCSrDQmEQeBOe@Kf=Jd=Le@Mf>Ke?KeBNdDNdBLeDMdBOfCOiITkIWoKVsITrEQnAPnERpESqDSpEXxObPdOfPdNcNdLcNhTgQeZphߺ뉙5Ed1?ZX19U.8R(4O0:S18P/7N29O.:M)4J06K,3I*2I(.F'0H'1F(1F,4G.6H18J-3F-3E,4G.5G-1C)/B,1C-2C/5D-3B,0@'-)(-(+/+,/..0/.01/4515;5?H5>J@L_>IU?I[FRgCSjCXqETqM\yEXvCUuFRsERnAOgJc?Ib>Ha-2:04;7<<EMAL^JSjKVrKWsJWrFVrN_QdKcNbNbMcNeRfMeSiNb`vϹ䬺ךѓҴֽתհתВsignjnggnq:Ii>F_Y4=U2Ic;Hc37>27=6:=<>@;@E>GQAK\ESiGXsFXuL^}LdKdLaHbJcKcLdMdQgRfUj{҉͂Ѓ΋znljpqorqmlkm^x@Nl=F`=Ea7@]9E]:BZ7@Z8C]4=W3;T5>W3I716:37;48=46=27=03=.5=24936<49B;CPBNeHVpN^}NbOcOcObIcMdOeNdRfQfSfkyvgegnqnklfgcc~c~d~Tl:F`9E\E^=G^;G^:D]2>Y4AZ8BZ4?U8AV>EX9EY/8<@48=07>9?OGPhQ[zPaRcNcOdPdQeQfQeQgTiXib|cc~acbdd`{UmVkZlXm[rYtTh@Jh6D_;Hb;F`:H`=G]>H^:H^8D[>G_EM`>H]JYFW>GV9DU8BS:BS2*1<%*8%%*&()),*,..(()%((%(*!#("%(&%).//%(+*,.)+-..1-.1,12'),&'*+,-0//++-$(,%&+')-)+/146+/2'*.+/3)14'-5-16-05037+07.2816;).6)/6)/8-09-0936<24;49?,3=)/;6:@GLKGJH88;DGTmKWsL[zP]PbOcReSgSfPhUlTiVi\n\r_xcZvXlXmUoWmWmVmJ_GX}CRv>QsEXv@Ut?Qt?Oq=Np>Nq@Nn?Nm?Nn>Nn:Il:Jm=KlQp;NnBQs@Np=Mn:Lj:Lj:Li:Kj8Lj9Jh#!#(,(#&$()(##$$#%*+*" $ *())*&##$%%%(**,0*)*( # !$02.33-981,.-,.-'),012875;<;:9;<=>6;?+/959>12;8;A69BFHNEJN=CMAFPCLU;CSBHXJQ^EL\GQaLTeITgIUiLVlN[qMZqRauQ`x^l`p^t_ubyb{e}ce~dhhgkkjmhjnlmljklnliiiikgigecea^|\y\w[uYsUsUqXoSoRnOmQlOkNiMiIbG^~IeGbFaE]E[AZ~@Xz@Uu?Rr17>7=F;BN/8F3;K4L?HUBJZCL\DL`NZhSZmMXoLYoZbwU`vP_wZe}Ub|Wh[j]nbshtbp`q[m_rav_ugze|h{j~inolqqmlpommqooqpqsrqrtrsrttvusutstuvuwvvvtxxxwuqqqpmfdd^}^z_v[sWqUoQlOhJfKcJ_G]E\F^DWzT1T1?T.5I,7K,7J*6H-5F-4F)2BXxXvWyVsYy[z[wYx\sZrZs\s]t`y\u^rhgmihlh~n~k}o|l~lmkmg}e|nk}lg~f}g}lpqtokbxe|d|d|la}kllssvv|~}ŀƄljˈϋ͊ΉІ̉ΐϏЋόΉ͇̇ˉˇ͇͉͇̋ʊ͆ʅȂzytpfa}[yQmKhKfNeG_~C]}>Pl@Rl;Kf=Kf@QmP/>T4;Q06I.6G,3C*2B,2B'1A*4F)1C(.<*0>)1>ZpWtUpVrVuXp]uYvXsVnRgTjNdTlVl\s^s`th}lgkng|lpj~i{kjnmj|h|j~ki{fyppsmmtlqrh|d}f{koqsrpxz|z|ĄLj̅Ɇʇ̆̊Ήˍˊ͆ʃʆˋˉɈʅȄȆʁȇʇʄ‚vxqi`{[vYuWqKcGaH_F[{DVv?RmBRk:Jd=Kg:Id9Ke3@V6G^3AX3AU5@V09J4AU5@V4;N5?T3=S/5G-4D-9H/9I08H+8I*2C,2A(0=(.<)-:YtWuVt[w[wUuVrSmMfLb}TkQkTlShRl\sbxbykk~f}jgini}d{olj|k}k~mlooj~mmmrsvprsonopoomospu{zz~~~Āł~ĀɂʁȄȆˈ˅ȆʄɇɄȃȆɄȄɄ~À~w|vnjhZvUoWsVvPgH`LeGZz@Tp=Tp=Pl;Mf;Mf7G`7F[QlATo?Ql@Tq:Jd;Ga7G]>Ok:Kh2AY1:N,4E,5E1>Q.;P-8J1PiS-8I,9J/9J-4DJ]{QhQoIe~NfQhMa}G]wM`}NdLgJ[uEWrNe]u_xXn_td{`vWj`ujZm[pXhcui~SbzVebwTc{T_y[lYlGYoFQfHTkUgNc|Wkn^rk~n_xdwofihec~nomuotvotyw|{ŁĀƀÀz~Â}|xxssvptswtnkfef\{TqZuWtNfMeNhMfMfE]|@Vs@ToEWu>UrG]}CWx8D_;Md;Mh9Kb;Kg5CY:Jc=Mg3@W2=R6F[5BV/?R7E\3Of>Ni:Mf9Ja9Kc;Ng9Ke:Ld>Md6G^5E[WxVzTxTpXvStJdMc}NbQhLa~RkSkPgMeLaXl\scx\oesg}fz_obtewYmVibv^q_scxg{m|l}kzdqVgXk^ol~qkdawb|jnomiayeuunkpvtw}xw~xv||y{zvw}zqrxt€{vmmliji[{YxYwYwVrVqKbMgSiOiOkG[zASp=NeF`{Jb?Tq?To>Rn=PjH]z>Rn=OgASm8I]:J`:Lb6EZ5EU4DW.8I,7E5CT:Ia2:LVqSqIc{H]wNgVrSnPhLa~RkI_wDWpH]wShK`xGTlP]|dxjh[m`te{lkcrgzj~qizg{k{bpN^rJYpRbxNZpM^t?M`CRhbu_r\oi}p`uev`we~ligzjjdazdquqovvsyvy{wzy}vx|y}}{k`Wbtrqlkoi`eg^tWs[zXuLaGZvG`}NhQgJbBUnH\uDVoPk5CX@PcFZv7?U5?N5FY?Og>Pi8H^:H[8FY3:H1:H0Ph9DW5BT5?Q3=N7EX:GY3>P4@NVjI[sJ\rI\tAVl;M_BSfAOf15=B49>49=KfwPh~SmUsXxWrXoVnTh|QexUh}UjzUhx\l|Xj}e}as`pati|g{j}i{`thxm|i}qxvugti|{ti|muk}vx[o{`ofyjworros{wh|f{jd|d{pofzbvfzhzosmrj}`uM\i+%&J@>KB:^PJm^WYKDI>6 3)(wfeTYh518_UDsgTn`N{jZdxhmavUj{R`oL]gPcpQgw[pcvXj}Wf|LXjEVbJ^nK`rIYgL]kTnTkQewRjzXpL_qFVc>IRARZ;DN379CPWL\nJYhAKWDU`H[jGXhLmJfvNcuTnPexOarI[eGX`P^mUfwSizSjxXhx`n]qgzk|i|f|dzc{^p_qjydsh{g{csewjym{~sj{`qr{tiuewo~rkkqk{tvrlf|`snomctgw^ox\jt]o{i}srpct^oyfxr;EN"3,,$%D98C;7 :2/aRKʹλyxyʻ̹q_wUdpTdn_qcw_sXk\rXlTj~VmPdwNarO`sTj~Vj}Qh{K^pJVgJ[kK]oQfxRexN`tHSbIWfGQa@IR;JP?KWvc[{þƶȿoTpUgzcxhavWoYrZoXmWsUmUbsS_mWfvPevOcrZn{UnQe~M^qL\pKYjFRaALXCR]CPVCS[FS^BNZ:EN=DL9@H19;6?BYqZpYpShzVn\u\qYm}Xk|Zp~VfrZjv^lzWjxVixZl~d|czbuprjk{ao|gvjixprkzy{pesdscusmZly[lygycqarhzg|i~pu}wm|etevqzvg}e{mldycs[n{bvsvnvxtL[i    ,$"0('O=3~ȲȰɸ´iotP`gOcsWqazayXnVk}Xi~SbsNYgHS^M]kI[iHXdSbn]nVh{WhyO^pGYgHXbK_oRk|[pUfzN]oM^qG[iCP]:AH>QZK]pPkSkYrXoYpby^sVn~VlTl}HYdP`nVgtWiz_rk|j|k|ispovrj{j{l|dp~htfvputm~hyk~jyduetpvguiwrsuvvgnupottn|cun~iyargvmzm|prvxwvqlj~>FL $5,)& PE=ocuǴȺ{l|iyarRdqFV^M]iRetShzL^mDT]GV_NZeNZaP_iTapWjyYk|SamR]hHW_FS^DQ[ES[FPZGOV?MP?KS;CHOk{Rk|UpTrWq^tZt[tYtPhvUft\o}cxh}izf{`uZhwZjydvm}qk{jxjzdwgrqskxm{dv`rj{ds|]js^mwZhr_mxhwso}po}j}jzjwswqtsph~ouxwm~bs{hxuyzwtqn}dt~dvpq{Tai  ' 70)/*)'$"<3/H;6\JGs^Zwfbuqt{qzn}jzbnuSdkRbjM\fQgqRfyM[iO`nO_nM_hTdnVerOX\EPML[`O_iUbmP]cWj{Vn}TkzVk|Ul{\p~\qatZlw]rcwevbq}arbt]m{]p|^ozaozewwm}dtkzsuswkcsiugu]mwWeoTaiMX\FW\Udmjwspk{vzizgxevkym~jxj|jk{l{n~jzm~stvwuvtuwvv{|zwzHSf   2*&!)$"2)':.,+!"2'&>52K@?ZIF{hd|wrwry|ɽz{zoutbilPYWQ[`N\fIW_?IK6CA@NUIV`N]jWjzZo}YnzXlvVjvRgwXmbvnyto|nzo{mxbq{`oyeth{rvron{lvm|kzkwdqjvbxewfu^lybp}ar|dq~ao~ivgufshreti{hxj{h|lizcuhvetfvo|kyo~l~klnopsuuvpn~rk{kzjwx~egk?C=#      $#<0,F96UH?VK@=72,$&4,*LAAXMKyssmri~rnzzwtwvikoTfvUiwSepVfsVjyJcxLbxM\oR_pZh{ap~foyetfteq}eudsZfr[hvmvp~fw]mx_kscny`nzal}bo~_jyZgs\kwar~fq~kvmyguco~^lcrap}am|gpaqcrcn~hn{io|hxfvexhuit~`mtes~aq{[lrbmwcp|evn}qpkzk|mxoyku}OXahxqRNVmcd|OIJ  -"$#   (5,+B82QEAE855-,H>;:1.;43@65D<:]RP\QNc[Z~voypvqwhbwoz}z}qywsy|zTfrQalTesUivScjO`gQakYitWeqXgwZly`o|bt\p[m}Vhx[kyao~\kwYgtco}dp}cs|dr~iwgr~fqzixfwl{rl|ixgu]lzZiyNTaTQZb^eicjhaf]W`aYb`TWA56?6;SKNSOW^dq^n{\lvbox^msbp{^ks^lscox`ls]nt^nw`lvssy`ho]hjkrykxk{UMTPLK6-+A43]QT   &"!=204.+%-#",%'800=64C98I<9QFDD99C<8NIEbYWcURth`yibn^Vm`Xo^Wq\Sl]Rnaoduj~r{t{rqxf]vxxlzrxn^s{_tbx\ox\lt\mxXkt[lu`q}cr_ozbr~aq}]lyar~]ny]oYjx_lyftewYenYbnUZcRU_ccoefpcbpwwqq|jjxehw`dt[gz`nIT^:25C;>B;=JDEG<<@57J@BC;=GAAQKIC:9MAGccnfv~`mtdnu`nu_mvfofwon~kz[XYJ7//#' "   .((    +%#3)*.%&+%&3..D>>803.),:23<01?54F;:G84I84n_WiXOyf[iXP`QIq^S|g\dRG~najbjXS\LEaUMq_Vzh`}mdzh`|mfZmx[ozZkt[jr^my\px\mu\nwaudu^q|^mycq~^mwZiscqzbmxduh{`kvMQ[E@GE?JGALC;E=6@405$ &%5-2,$'6.34,15/:]dtFTX@;::32D=cWZ_USQIIJB@RHKXYfs~svusupuagp=32VMD|B64A74               ($&1+-'$"!.(&80/I<9]PITHD=2.QC=\MEcSLYJE\NFTFBG=9[NEWIBZKF\LG[KDZmwYnxVlvZnzZoyZjuap}dxctdvdv]nw_o|bsfxkyfw^mvfu0:6-'.0,5*'.% !('(4-.,&&-')\_pR\_ @:@VPM911;55;450**& -(+J@CF=?G@DF>B<44*!!MLWfp|p{{~~zv_fh:31YQP~zvl``ZP#                     .''"  )"!(! ( 4*)A83SIESECD72K<5N@8TF=J?9MA:XgmYisVjtVhqZhwYhq[gq]kyUdmWdm_nyiwdr}gseq|_jvZgq]kv\jx@PP"$$ % -'#.+'*(%930=>842/=>>A>=DADGKWP[qKU` '!%$"&!!+$&*&('"$.(,=69?88KFJKDF<50;8,FIGfqzrzv~xuu~Wbj    C>BcX[aVU&"                 0+**&%& $ 5,(:0+G<6XJBH=9>31\isWfoVgq\mvZhqXhp]irYhp\ju_ny_nxitgudp|anzdqXfnYfs_iyWdpMU^7@D*03369899?BAHIDDE:AA8FGFJJKRTZX`iT]lUbvJWg'$ 1.*40*0,'(&$2+*;22RFGd\[LKD?>2CE9\deoq}t~stn{rNW\                   (#"#)!!    Xdo[is]p}`o|_o{^p|\ny\jx`p}[iw_l{WdqSaqbk|ntt{t}qv|xyx|ptuz~qx{ckpT[aQTWSUWOVUNVS\adZcbknsry~pw|nv^eqAHL7:6AA7CC=@C:AD;EF=?@7=@9CE<@A:FFAOSJQVK]a^msyx}x}{lzeuRZb#$                                     ]r|^r}\lwXgrZiu^iq\kv[jt[hqVaiO_hNYfIYgMVeQVeW\giippoonpptuv|~{zynpokqqafj\ch`gogmtiq|gr~dlvfmzemv[aePTOSUOPTLNQERVMTYRX]X\d_ad`^dbY_Y`b`koox}v{yyxmwmtU`h>A<47/+.'%(" !                                          `flZglWejWbc[cfVbcXac[eh\ej]gnWcjQ^eJVZHQYFR[COWIS_^frjpzjq}sx}rtxnqvnt{mrxoszqw{mv{lrvilonu{mwktylqwot}u|kvx\aZ[^W[^U`d]ejdfnhckfdjeegacd_^e_bdejkpmrwuz~uzywyz||~x}}xyyuvxru|klrYZ\EHI<=@*./!$%                                    bXX\abZghZcbYba\dcZdf^ff[ef\df]fi\bd\ej_js_hp`lt\hpVcm[eq[aicjsgnvimvlu|lrxmtzorsrwztz{y~rwwquzu|pw|mqtpuxovzqwvfodmqkqwumvqltnstqputjslirlmrrkrphkihmomrxku|nu|qw|ovzpw~kpuach\]bV\bHIO;>D05=.2:"(/ 41*                                        i]Z\ZUKOLUWTX][X]_[bf]hl]hj_fj\eiahkbkpdluensfmrgnrjqtltyktwkppjqrmuvjppjpoovvvy|ty{xq{{nvopwvy~z{{zzvxqw{vz}xw~vw}yx~|wzzmuomqmostryzryxlsqortntvjruqzqxjt}gp|ZflLV]DKTAHR>GQ7=E49@46<226*" 3/) FB5qgOoqpe                                  eXUYRM;98FCKTQ]YXd`bj`ej`johnp}~~cikioujtzkqyptynuzs{qx{v|wt{{vz~y|u{}w{{w{}xz|{y~z{~y~s{vu{ty~x{}wxx|{}{u|vntmlmhprqnrqrwzq}mu{ow}jswejofmshntaltco{]hwXepTajOXaISZCHNQOT::=&& /-(#$" !"$"IB;[PB|qwns                   XOSe][Z^aKU\QVaW]e\flajpMNSRIPu{b^bfhijnmjosouzpx{lvyqvzt{v{w}w}|vyztwwx|~zzx~y}}{z|}~~~}~y||yz}uz~yv{wpuontnlpmopnrxyrz~ox}pwsw|p{m|mz|q{n}iu~ns{mt{hnqkps_glT\aLRVNXXLPK:A99=548165.86/DD;GH=FG>AB9==6572.-('(#"  !"## "             a`\hc\]`_YdiZci\gnS]a;;:*'%KBHZY]LBGdakhpuqtyu|t|uzwzy|zy|~ryzz|~~y}}z}}vyy{|}}}}}}{~{plm~~x~zu|xuwvqvuqsrpspstutvuqtnnurruvtx{u}vtu|nwxntwotvvzyyzw~~ryvrwyuz|lni_bWY]PX]MU\MWYKX[I]`PZZKRWJOPDEH>BG=CE=;523RLSVUVLIKXX_ggopvzt}v{v|zx|~|w~~u{z{{z~~x|{x|}w}~{}x{yvvyqturuvrvv76:rr}ywwvsgkajmgnpkmrjjpfjndnriqvrqxypvrosotwwwz}r}}wx}u}~{}vxqsvjkoahn[np]oveos`knWknWhkVceR``MXZKRTGQRDSSCQTEQTELMBCE;8<2.2)'(""!#$%%'*+/2!25%59+?E;JPOIPO?FE@MK6>?    362=>?LT^EIRFJPLNSQSYQSXGHKBADMLLTWWcefknrlpvktwswzu{}t|{v~v{}}{~z{vy|{|}zy~x~ow~ent47:rddu{t~zsvmixkjempimqirvnmskmmipsonvptupwxsx|zw|~wxy{}}{~zxvufyzi}q~o|{g{{gwyest`loXhhScfQ`cO^bM[[IZ]HX\IXVFUVCVYGTVFNQ@MP?KJ<9<113(**# ! $&'),!/0(:;3HKGNUTW]`X^_021@HBELJ;A@399,//%+*    ..3FKOSY^SZaUahZae]ckX`fTY_TZ]^adcfghlmkprlppoqrlpojplswyuwzrvtptpqqnsvtwxzvv{|}~wz|yz}ootjhmqntnnrgjockzCMTA6=xzwsqefNFLc]da\\ifld`eebaijfjlj]YYvv}{~~||~|x~|swzv~pxvcrs[su]qpYjkSjkRpqZrrZloXilShiRdeObbNbdO`bM_`LdbNdbNabO]]JWZHMOAAE79;0,/&!# "$%%(*-./!57+9<.7:(:=201''( !#  !!$$%%'()(+,0!-0"38,7:3;<5ELHNX[R\_W^b+,0T_\Zbc`gkbiocknajl`hgaeddhgdiginomqpmqpqtrpuwruxrw{ossnplnqpqrsmqslmoopskopTQOBC>:58z^^Uqkd~~||v]bV880JBGKKP!.',y~LKOLJPC@F@=BKFJOMQZ[^jkpstr}|~}zzh||kz~}nwudtwfwzjz|mqrYkmQtsYyy`uv[rqYprVrsXvwZvx[vv\wtYsqXnlUnpWlmUkmUmnXjnXglWilXbeQZ]MY]LRSEHL?@F9>B702)!"  $#'%(%(&)*/"34.>EEGPSOX^AFLTUSU[X]de`dd`hhbjiejicjicigjlkklljmmpppotuoqtkonjoomoppqtpqsmrsquymuvpx{VZ\'%&@<;CA?SJQy{{_[Xskisll\`[@@E*()MDKfbdROPEADIBGXU[ehmpsw}}{uvzvq~s}l|{jqraoo]qq\klRjhOhiQrrYttYuv\xx\zz]wz^uw\uuXtsWvsVuv[xz]{}^vz\qv\osYnpXjmYilWdgRbeQ^bO^bO\aQVXICF<22+!#!#!$!"$%15/AEI;;>RXLW[S]df`ef^ddaddeedddbdgfdjjfjjhknkjjlpslvzmtvquyrswnqtnosmvytuyoptjqx8AB1,/934 956F@?e_W`]Vphc{ifg@AA 9/4LEJJFJPKMqlnz{~z}~pnzyevybtu]qnWkjRgfN__GcaJnmTrrVvvZxz_}z]zy[||_|}byx]yz_wv[utZvw[suYsuYptZorYopWmmVijUfhR[^KOTDFG<9:113,),' %"% ##  !%&"-.+TZMTXJWZSZ]Z[\X]a^\`[\b`_fdcdeedcddaca^gefgijjjmmmrprxnsxot{qswklokkplpwZbf583KCCVNGJE@eYY{{lbbULO]YZWXS;95&&!+)'VUXhkjy{y~|{yz}kuy_ux]wuaqqWlnTiiRciObcKeeNhkQmnUloVqrWvu[xx]yx^wuZqqXnpTlnSknTlmRmpWmmVlnUjlShmRglTcfQ\aLPR@FI;>A4=@29<128--4+-2*,3*,1*6=1XdS_fX>@5/0(&*$ jasper-1.900.1/data/images/small_1x1.pnm0000644000175000017500000000001410554235561016630 0ustar ernieernieP5 1 1 255 jasper-1.900.1/data/images/goldenears_gray.jpg0000644000175000017500000000432310554235561020171 0ustar ernieernieJFIFJKC    $.' ",#(7),01444'9=82<.342 `8!1AQq"2aBbr3R#%4?*Dr@Z;:b%21-u)R;FK"NEH[U|u|5ƈzϜ`\bj8eZKo:\[""KyǑrF9oj6۸nFG-\&R t9td*' ^*fNVoՏs\r@&c$}+_?qDMԈ4Vi@i:'00ˠuqQTsU ]UV^ETSqrZړ|Q`ԛV̖H>PIAx3iI4I;~iF2|=wi솄֠dd3E .YO'P[`3ءo Ў*a~.e!CA~TbZdMp0kƝzކ銍}݉`v~)NHw,Rb?ZMS@8cP+Ug\gY;\0> . gk0p'~*\UaDFv|lx Il֑$ŋ?MHGj+KgSn-n%AFŸ=:;OI4KHljt-w-{z!ۇSS^ eكzNJ\;88!B1^ƏgVO );jڝrA7 敌Ǽ S9sI?_+0H@7ahZ,兝Ąf6!t?~kukvMtk*t+|EfD`*Y|+Imj%0JC=YѮv&{$A}A 2XL@<)=x -#g|o8yMf&i6 :>/x/\i4FnCd7A؏r:6xW GA1ϩhmu*leTL.r &ߗp}ޟ;9J0bE=|e* Ub[jnDOm,\N~  C t < n  8 k  8 l  < q EzQ+b@x!Y>x&aN>{2p+j'g(i.p9|I^1y  Q !-!w!" "X""#<##$%$t$%%c%&&V&&'O''(M(()P)**Y*+ +i+,!,,-<--._./%//0U01%112e23@34!455{56i67^78Y89[9:f:;y<<='=>T>?@-@AzB'BCDGEEFGjHDI&JKLMN3OaPRS~U$WY0[_9beikmmoo.pr*sztuvwxyz{|{}J~~JV?ۅt .H҉Yߊbb\֍OƎ<#sM"Z%NpΗ,APXZWOB0~̠fK+uP'nBͦVާ"e-o4t5u2q+i ]ծMî9s![α@x!YȲ6mڴF|S&Zö*^ŷ+^ø(Z!RGxټ 9iȼ'WAp;)W;iJv(T€¬/[Æò3^ĉĴ 3^ňŲ0ZƄƮ*T}Ǧ!Jsț=eɍɶ-U}ʤBiˑ˸-Sz̡;a͇ͭ EkΑη'MrϘϽ,QvЛ .Rwћѿ,PtҘҼ(KoӓӶ DgԊԭ9\բ ,Oqֶ֔?a׃ץ ,Npؑس9Z{ٝپ!Bcڄڥ(Iiۊ۪ ,Ll܍ܭ -Mmݍݬ +Kjފީ'Ff߅ߤ ?^}5Tr )Gf9Wu 'Ec2Ol9Vs!=Zw#?\x#?[w m,\N~  C t < n  8 k  8 l  < q EzQ+b@x!Y>x&aN>{2p+j'g(i.p9|I^1y  Q !-!w!" "X""#<##$%$t$%%c%&&V&&'O''(M(()P)**Y*+ +i+,!,,-<--._./%//0U01%112e23@34!455{56i67^78Y89[9:f:;y<<='=>T>?@-@AzB'BCDGEEFGjHDI&JKLMN3OaPRS~U$WY0[_9beikmmoo.pr*sztuvwxyz{|{}J~~JV?ۅt .H҉Yߊbb\֍OƎ<#sM"Z%NpΗ,APXZWOB0~̠fK+uP'nBͦVާ"e-o4t5u2q+i ]ծMî9s![α@x!YȲ6mڴF|S&Zö*^ŷ+^ø(Z!RGxټ 9iȼ'WAp;)W;iJv(T€¬/[Æò3^ĉĴ 3^ňŲ0ZƄƮ*T}Ǧ!Jsț=eɍɶ-U}ʤBiˑ˸-Sz̡;a͇ͭ EkΑη'MrϘϽ,QvЛ .Rwћѿ,PtҘҼ(KoӓӶ DgԊԭ9\բ ,Oqֶ֔?a׃ץ ,Npؑس9Z{ٝپ!Bcڄڥ(Iiۊ۪ ,Ll܍ܭ -Mmݍݬ +Kjފީ'Ff߅ߤ ?^}5Tr )Gf9Wu 'Ec2Ol9Vs!=Zw#?\x#?[w m,\N~  C t < n  8 k  8 l  < q EzQ+b@x!Y>x&aN>{2p+j'g(i.p9|I^1y  Q !-!w!" "X""#<##$%$t$%%c%&&V&&'O''(M(()P)**Y*+ +i+,!,,-<--._./%//0U01%112e23@34!455{56i67^78Y89[9:f:;y<<='=>T>?@-@AzB'BCDGEEFGjHDI&JKLMN3OaPRS~U$WY0[_9beikmmoo.pr*sztuvwxyz{|{}J~~JV?ۅt .H҉Yߊbb\֍OƎ<#sM"Z%NpΗ,APXZWOB0~̠fK+uP'nBͦVާ"e-o4t5u2q+i ]ծMî9s![α@x!YȲ6mڴF|S&Zö*^ŷ+^ø(Z!RGxټ 9iȼ'WAp;)W;iJv(T€¬/[Æò3^ĉĴ 3^ňŲ0ZƄƮ*T}Ǧ!Jsț=eɍɶ-U}ʤBiˑ˸-Sz̡;a͇ͭ EkΑη'MrϘϽ,QvЛ .Rwћѿ,PtҘҼ(KoӓӶ DgԊԭ9\բ ,Oqֶ֔?a׃ץ ,Npؑس9Z{ٝپ!Bcڄڥ(Iiۊ۪ ,Ll܍ܭ -Mmݍݬ +Kjފީ'Ff߅ߤ ?^}5Tr )Gf9Wu 'Ec2Ol9Vs!=Zw#?\x#?[w ocurv) Y Jz :"j$&(++-[/1368L:|<>A Chojlnq/s_uwy| ~PAqђ1aœ"RCsӵ3cĿ$TƄȴEuӥ5eޖ&VGw7gcurv) Y Jz :"j$&(++-[/1368L:|<>A Chojlnq/s_uwy| ~PAqђ1aœ"RCsӵ3cĿ$TƄȴEuӥ5eޖ&VGw7gmAB  Pcurvcurvcurvob$8m±kˊcurvzBm(Kk  , @ Q _ iquvsneZK9$ ~aAd9 t A ! !q!"7""#[#$$x$%3%%&E&&'Q'((W())V))*O**+A++,-,{,--_--.<..//Z//0*0n00151v11262u223-3i3344R444525h5566;6n667757e7778 8M8y8889&9O9x999::=:c::::;;9;[;|;;;;<<8>&>:>M>`>r>>>>>>>>????*?6?B?N?Z?d?o?y????????????????@@ @@@#@+@3@;@C@K@R@Z@b@j@r@z@@@@@@@@@@@@AAAA-A;AJAZAjAzAAAAAAABB"B7BMBcByBBBBBC C$C?CZCuCCCCDD%DDDcDDDDE E-EPEtEEEF F0FXFFFFG%GPG|GGHH/H]HHHIINIIIJJNJJJK&K^KKLLCL}LLM1MoMMN*NjNNO.OqOOP^~curvzBm(Kk  , @ Q _ iquvsneZK9$ ~aAd9 t A ! !q!"7""#[#$$x$%3%%&E&&'Q'((W())V))*O**+A++,-,{,--_--.<..//Z//0*0n00151v11262u223-3i3344R444525h5566;6n667757e7778 8M8y8889&9O9x999::=:c::::;;9;[;|;;;;<<8>&>:>M>`>r>>>>>>>>????*?6?B?N?Z?d?o?y????????????????@@ @@@#@+@3@;@C@K@R@Z@b@j@r@z@@@@@@@@@@@@AAAA-A;AJAZAjAzAAAAAAABB"B7BMBcByBBBBBC C$C?CZCuCCCCDD%DDDcDDDDE E-EPEtEEEF F0FXFFFFG%GPG|GGHH/H]HHHIINIIIJJNJJJK&K^KKLLCL}LLM1MoMMN*NjNNO.OqOOP^~curvzBm(Kk  , @ Q _ iquvsneZK9$ ~aAd9 t A ! !q!"7""#[#$$x$%3%%&E&&'Q'((W())V))*O**+A++,-,{,--_--.<..//Z//0*0n00151v11262u223-3i3344R444525h5566;6n667757e7778 8M8y8889&9O9x999::=:c::::;;9;[;|;;;;<<8>&>:>M>`>r>>>>>>>>????*?6?B?N?Z?d?o?y????????????????@@ @@@#@+@3@;@C@K@R@Z@b@j@r@z@@@@@@@@@@@@AAAA-A;AJAZAjAzAAAAAAABB"B7BMBcByBBBBBC C$C?CZCuCCCCDD%DDDcDDDDE E-EPEtEEEF F0FXFFFFG%GPG|GGHH/H]HHHIINIIIJJNJJJK&K^KKLLCL}LLM1MoMMN*NjNNO.OqOOP^~{xB%`dx&JahYjYh Vjw\>b>acurvc?kIv+X<k$S>m,\N~  C t < n  8 k  8 l  < q EzQ+b@x!Y>x&aN>{2p+j'g(i.p9|I^1y  Q !-!w!" "X""#<##$%$t$%%c%&&V&&'O''(M(()P)**Y*+ +i+,!,,-<--._./%//0U01%112e23@34!455{56i67^78Y89[9:f:;y<<='=>T>?@-@AzB'BCDGEEFGjHDI&JKLMN3OaPRS~U$WY0[_9beikmmoo.pr*sztuvwxyz{|{}J~~JV?ۅt .H҉Yߊbb\֍OƎ<#sM"Z%NpΗ,APXZWOB0~̠fK+uP'nBͦVާ"e-o4t5u2q+i ]ծMî9s![α@x!YȲ6mڴF|S&Zö*^ŷ+^ø(Z!RGxټ 9iȼ'WAp;)W;iJv(T€¬/[Æò3^ĉĴ 3^ňŲ0ZƄƮ*T}Ǧ!Jsț=eɍɶ-U}ʤBiˑ˸-Sz̡;a͇ͭ EkΑη'MrϘϽ,QvЛ .Rwћѿ,PtҘҼ(KoӓӶ DgԊԭ9\բ ,Oqֶ֔?a׃ץ ,Npؑس9Z{ٝپ!Bcڄڥ(Iiۊ۪ ,Ll܍ܭ -Mmݍݬ +Kjފީ'Ff߅ߤ ?^}5Tr )Gf9Wu 'Ec2Ol9Vs!=Zw#?\x#?[w m,\N~  C t < n  8 k  8 l  < q EzQ+b@x!Y>x&aN>{2p+j'g(i.p9|I^1y  Q !-!w!" "X""#<##$%$t$%%c%&&V&&'O''(M(()P)**Y*+ +i+,!,,-<--._./%//0U01%112e23@34!455{56i67^78Y89[9:f:;y<<='=>T>?@-@AzB'BCDGEEFGjHDI&JKLMN3OaPRS~U$WY0[_9beikmmoo.pr*sztuvwxyz{|{}J~~JV?ۅt .H҉Yߊbb\֍OƎ<#sM"Z%NpΗ,APXZWOB0~̠fK+uP'nBͦVާ"e-o4t5u2q+i ]ծMî9s![α@x!YȲ6mڴF|S&Zö*^ŷ+^ø(Z!RGxټ 9iȼ'WAp;)W;iJv(T€¬/[Æò3^ĉĴ 3^ňŲ0ZƄƮ*T}Ǧ!Jsț=eɍɶ-U}ʤBiˑ˸-Sz̡;a͇ͭ EkΑη'MrϘϽ,QvЛ .Rwћѿ,PtҘҼ(KoӓӶ DgԊԭ9\բ ,Oqֶ֔?a׃ץ ,Npؑس9Z{ٝپ!Bcڄڥ(Iiۊ۪ ,Ll܍ܭ -Mmݍݬ +Kjފީ'Ff߅ߤ ?^}5Tr )Gf9Wu 'Ec2Ol9Vs!=Zw#?\x#?[w m,\N~  C t < n  8 k  8 l  < q EzQ+b@x!Y>x&aN>{2p+j'g(i.p9|I^1y  Q !-!w!" "X""#<##$%$t$%%c%&&V&&'O''(M(()P)**Y*+ +i+,!,,-<--._./%//0U01%112e23@34!455{56i67^78Y89[9:f:;y<<='=>T>?@-@AzB'BCDGEEFGjHDI&JKLMN3OaPRS~U$WY0[_9beikmmoo.pr*sztuvwxyz{|{}J~~JV?ۅt .H҉Yߊbb\֍OƎ<#sM"Z%NpΗ,APXZWOB0~̠fK+uP'nBͦVާ"e-o4t5u2q+i ]ծMî9s![α@x!YȲ6mڴF|S&Zö*^ŷ+^ø(Z!RGxټ 9iȼ'WAp;)W;iJv(T€¬/[Æò3^ĉĴ 3^ňŲ0ZƄƮ*T}Ǧ!Jsț=eɍɶ-U}ʤBiˑ˸-Sz̡;a͇ͭ EkΑη'MrϘϽ,QvЛ .Rwћѿ,PtҘҼ(KoӓӶ DgԊԭ9\բ ,Oqֶ֔?a׃ץ ,Npؑس9Z{ٝپ!Bcڄڥ(Iiۊ۪ ,Ll܍ܭ -Mmݍݬ +Kjފީ'Ff߅ߤ ?^}5Tr )Gf9Wu 'Ec2Ol9Vs!=Zw#?\x#?[w ocurv) Y Jz :"j$&(++-[/1368L:|<>A Chojlnq/s_uwy| ~PAqђ1aœ"RCsӵ3cĿ$TƄȴEuӥ5eޖ&VGw7gcurv) Y Jz :"j$&(++-[/1368L:|<>A Chojlnq/s_uwy| ~PAqђ1aœ"RCsӵ3cĿ$TƄȴEuӥ5eޖ&VGw7gmAB  Pcurvcurvcurvna$F8i^_'curvzBm(Kk  , @ Q _ iquvsneZK9$ ~aAd9 t A ! !q!"7""#[#$$x$%3%%&E&&'Q'((W())V))*O**+A++,-,{,--_--.<..//Z//0*0n00151v11262u223-3i3344R444525h5566;6n667757e7778 8M8y8889&9O9x999::=:c::::;;9;[;|;;;;<<8>&>:>M>`>r>>>>>>>>????*?6?B?N?Z?d?o?y????????????????@@ @@@#@+@3@;@C@K@R@Z@b@j@r@z@@@@@@@@@@@@AAAA-A;AJAZAjAzAAAAAAABB"B7BMBcByBBBBBC C$C?CZCuCCCCDD%DDDcDDDDE E-EPEtEEEF F0FXFFFFG%GPG|GGHH/H]HHHIINIIIJJNJJJK&K^KKLLCL}LLM1MoMMN*NjNNO.OqOOP^~curvzBm(Kk  , @ Q _ iquvsneZK9$ ~aAd9 t A ! !q!"7""#[#$$x$%3%%&E&&'Q'((W())V))*O**+A++,-,{,--_--.<..//Z//0*0n00151v11262u223-3i3344R444525h5566;6n667757e7778 8M8y8889&9O9x999::=:c::::;;9;[;|;;;;<<8>&>:>M>`>r>>>>>>>>????*?6?B?N?Z?d?o?y????????????????@@ @@@#@+@3@;@C@K@R@Z@b@j@r@z@@@@@@@@@@@@AAAA-A;AJAZAjAzAAAAAAABB"B7BMBcByBBBBBC C$C?CZCuCCCCDD%DDDcDDDDE E-EPEtEEEF F0FXFFFFG%GPG|GGHH/H]HHHIINIIIJJNJJJK&K^KKLLCL}LLM1MoMMN*NjNNO.OqOOP^~curvzBm(Kk  , @ Q _ iquvsneZK9$ ~aAd9 t A ! !q!"7""#[#$$x$%3%%&E&&'Q'((W())V))*O**+A++,-,{,--_--.<..//Z//0*0n00151v11262u223-3i3344R444525h5566;6n667757e7778 8M8y8889&9O9x999::=:c::::;;9;[;|;;;;<<8>&>:>M>`>r>>>>>>>>????*?6?B?N?Z?d?o?y????????????????@@ @@@#@+@3@;@C@K@R@Z@b@j@r@z@@@@@@@@@@@@AAAA-A;AJAZAjAzAAAAAAABB"B7BMBcByBBBBBC C$C?CZCuCCCCDD%DDDcDDDDE E-EPEtEEEF F0FXFFFFG%GPG|GGHH/H]HHHIINIIIJJNJJJK&K^KKLLCL}LLM1MoMMN*NjNNO.OqOOP^~{xB%`dx&JahYjYh VjwCGLQV[`ejoty~ "(/5<BIPV]dkry #,5>HQZdnw*5@LXco{+9FSao| )8GWfu&6GXiz*=Oat  4G[o  ' < Q f |  * @ W m  & = U m  / H a z  - G a { 6Ql.Jf0Mk<Zx2Qq0Pq6Wx#Eg7[~ 0Ty 0Uz5[Ah,S{Cl8a2\2] 5 a !!=!j!!!""J"w""##.#\###$$D$s$$%%/%_%%%&&N&&&''B's''((8(j(())2)d)))*0*c***+2+f++,,7,k,,- -?-t--..K.../#/Z///060m0011K1112,2e2233H3334.4h4455Q5566=6x667*7f7788W889 9K99::A:~::;8;w;;<3.>n>>?/?p??@3@t@@A9A{AABBBBC CLCCDDZDDE&EjEEF7F|FGGKGGHHbHHI4I{IJJRJJK'KoKKLGLLM MhMMNCNNO OiOOPHPPQ'QrQRRTRRS7SSTTgTUUNUUV5VVWWmWX XXXXYDYYZ2ZZ[![q[\\c\]]U]]^L^^_A__`9``a1aab+bbc&c{cd#dxde"ewef!fwfg#gygh%h|hi*iij/jjk7kkl?llmImmnUnooboppqpq&qqr7rrsJsttatuuvuv0vvwHwxxbxyy}yz:zz{X{||w|}8}}~Y~|ހ?eǂ*R|C pԇ9h͉3dʋ1e̍3mՏ=vߑHW+k֖A[Ǚ3 yS- wSŸ1~]̢<oQ¦4nSʪ=$ hܮQƯ;&taشOƵ=- xk^ؼR̽G<2)!–Ï ĉńƀ|y{zyyz{~Ёф҉ ӎԔ՛֢&ת.س8ٽBLXdq$4FWj}1Kby7Ql2On<]3Vjasper-1.900.1/data/colorprofiles/erimm.icm0000644000175000017500000000404210554235560017537 0ustar ernieernie" scnrRGB XYZ  2#acspKODAERIM-JPEG desccprtx*wtptrXYZgXYZbXYZrTRCgTRCbTRCdesc,Restricted ICC profile describing ERIMM-RGBtextCopyright 2001 EKC-RICC ReferenceXYZ -XYZ 6IXYZ "?XYZ -curv !!''.4;;BHU\bov ;Uo-[@t28 Q  ![L (!|#&),037_;x?DHMIQV[`fEkqw}Q82EcM ΃ӼئH0wofs04H|curv !!''.4;;BHU\bov ;Uo-[@t28 Q  ![L (!|#&),037_;x?DHMIQV[`fEkqw}Q82EcM ΃ӼئH0wofs04H|curv !!''.4;;BHU\bov ;Uo-[@t28 Q  ![L (!|#&),037_;x?DHMIQV[`fEkqw}Q82EcM ΃ӼئH0wofs04H|jasper-1.900.1/data/colorprofiles/esrgb.icm0000644000175000017500000003202410554235560017531 0ustar ernieernie4APPLscnrRGB XYZ  :7acspMSFTHP eRGB,HP cprt4descHwtpt4bkptHrXYZ\gXYZpbXYZrTRC gTRC bTRC" dmnd2dmdd3HtextCopyright (c) 2001 Hewlett-Packard Company desc/16-bit e-sRGB JP2 restricted (to sRGB) profile016-bit e-sRGB JP2 restricted (to sRGB) profile/16-bit e-sRGB JP2 restricted (to sRGB) profileXYZ ,XYZ XYZ o8XYZ bXYZ $curv  %*/49>CGLQV[`ejoty~ "(/5<BIPV]dkry #,5>HQZdnw*5@LXco{+9FSao| )8GWfu&6GXiz*=Oat  4G[o  ' < Q f |  * @ W m  & = U m  / H a z  - G a { 6Ql.Jf0Mk<Zx2Qq0Pq6Wx#Eg7[~ 0Ty 0Uz5[Ah,S{Cl8a2\2] 5 a !!=!j!!!""J"w""##.#\###$$D$s$$%%/%_%%%&&N&&&''B's''((8(j(())2)d)))*0*c***+2+f++,,7,k,,- -?-t--..K.../#/Z///060m0011K1112,2e2233H3334.4h4455Q5566=6x667*7f7788W889 9K99::A:~::;8;w;;<3.>n>>?/?p??@3@t@@A9A{AABBBBC CLCCDDZDDE&EjEEF7F|FGGKGGHHbHHI4I{IJJRJJK'KoKKLGLLM MhMMNCNNO OiOOPHPPQ'QrQRRTRRS7SSTTgTUUNUUV5VVWWmWX XXXXYDYYZ2ZZ[![q[\\c\]]U]]^L^^_A__`9``a1aab+bbc&c{cd#dxde"ewef!fwfg#gygh%h|hi*iij/jjk7kkl?llmImmnUnooboppqpq&qqr7rrsJsttatuuvuv0vvwHwxxbxyy}yz:zz{X{||w|}8}}~Y~|ހ?eǂ*R|C pԇ9h͉3dʋ1e̍3mՏ=vߑHW+k֖A[Ǚ3 yS- wSŸ1~]̢<oQ¦4nSʪ=$ hܮQƯ;&taشOƵ=- xk^ؼR̽G<2)!–Ï ĉńƀ|y{zyyz{~Ёф҉ ӎԔ՛֢&ת.س8ٽBLXdq$4FWj}1Kby7Ql2On<]3Vcurv  %*/49>CGLQV[`ejoty~ "(/5<BIPV]dkry #,5>HQZdnw*5@LXco{+9FSao| )8GWfu&6GXiz*=Oat  4G[o  ' < Q f |  * @ W m  & = U m  / H a z  - G a { 6Ql.Jf0Mk<Zx2Qq0Pq6Wx#Eg7[~ 0Ty 0Uz5[Ah,S{Cl8a2\2] 5 a !!=!j!!!""J"w""##.#\###$$D$s$$%%/%_%%%&&N&&&''B's''((8(j(())2)d)))*0*c***+2+f++,,7,k,,- -?-t--..K.../#/Z///060m0011K1112,2e2233H3334.4h4455Q5566=6x667*7f7788W889 9K99::A:~::;8;w;;<3.>n>>?/?p??@3@t@@A9A{AABBBBC CLCCDDZDDE&EjEEF7F|FGGKGGHHbHHI4I{IJJRJJK'KoKKLGLLM MhMMNCNNO OiOOPHPPQ'QrQRRTRRS7SSTTgTUUNUUV5VVWWmWX XXXXYDYYZ2ZZ[![q[\\c\]]U]]^L^^_A__`9``a1aab+bbc&c{cd#dxde"ewef!fwfg#gygh%h|hi*iij/jjk7kkl?llmImmnUnooboppqpq&qqr7rrsJsttatuuvuv0vvwHwxxbxyy}yz:zz{X{||w|}8}}~Y~|ހ?eǂ*R|C pԇ9h͉3dʋ1e̍3mՏ=vߑHW+k֖A[Ǚ3 yS- wSŸ1~]̢<oQ¦4nSʪ=$ hܮQƯ;&taشOƵ=- xk^ؼR̽G<2)!–Ï ĉńƀ|y{zyyz{~Ёф҉ ӎԔ՛֢&ת.س8ٽBLXdq$4FWj}1Kby7Ql2On<]3Vcurv  %*/49>CGLQV[`ejoty~ "(/5<BIPV]dkry #,5>HQZdnw*5@LXco{+9FSao| )8GWfu&6GXiz*=Oat  4G[o  ' < Q f |  * @ W m  & = U m  / H a z  - G a { 6Ql.Jf0Mk<Zx2Qq0Pq6Wx#Eg7[~ 0Ty 0Uz5[Ah,S{Cl8a2\2] 5 a !!=!j!!!""J"w""##.#\###$$D$s$$%%/%_%%%&&N&&&''B's''((8(j(())2)d)))*0*c***+2+f++,,7,k,,- -?-t--..K.../#/Z///060m0011K1112,2e2233H3334.4h4455Q5566=6x667*7f7788W889 9K99::A:~::;8;w;;<3.>n>>?/?p??@3@t@@A9A{AABBBBC CLCCDDZDDE&EjEEF7F|FGGKGGHHbHHI4I{IJJRJJK'KoKKLGLLM MhMMNCNNO OiOOPHPPQ'QrQRRTRRS7SSTTgTUUNUUV5VVWWmWX XXXXYDYYZ2ZZ[![q[\\c\]]U]]^L^^_A__`9``a1aab+bbc&c{cd#dxde"ewef!fwfg#gygh%h|hi*iij/jjk7kkl?llmImmnUnooboppqpq&qqr7rrsJsttatuuvuv0vvwHwxxbxyy}yz:zz{X{||w|}8}}~Y~|ހ?eǂ*R|C pԇ9h͉3dʋ1e̍3mՏ=vߑHW+k֖A[Ǚ3 yS- wSŸ1~]̢<oQ¦4nSʪ=$ hܮQƯ;&taشOƵ=- xk^ؼR̽G<2)!–Ï ĉńƀ|y{zyyz{~Ёф҉ ӎԔ՛֢&ת.س8ٽBLXdq$4FWj}1Kby7Ql2On<]3VdescHewlett-PackardHewlett-PackardHewlett-Packarddesc%16-bit e-sRGB JP2 restricted to sRGB&16-bit e-sRGB JP2 restricted to sRGB%16-bit e-sRGB JP2 restricted to sRGBjasper-1.900.1/Makefile.am0000644000175000017500000000743410554235562014207 0ustar ernieernie# Copyright (c) 2001-2003 Michael David Adams. # All rights reserved. # __START_OF_JASPER_LICENSE__ # # JasPer License Version 2.0 # # Copyright (c) 2001-2006 Michael David Adams # Copyright (c) 1999-2000 Image Power, Inc. # Copyright (c) 1999-2000 The University of British Columbia # # All rights reserved. # # Permission is hereby granted, free of charge, to any person (the # "User") 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, 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: # # 1. The above copyright notices and this permission notice (which # includes the disclaimer below) shall be included in all copies or # substantial portions of the Software. # # 2. The name of a copyright holder shall not be used to endorse or # promote products derived from the Software without specific prior # written permission. # # THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS # LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER # THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS # "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 OF THIRD PARTY RIGHTS. IN NO # EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR 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. NO ASSURANCES ARE # PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE # THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. # EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS # BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL # PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS # GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE # ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE # IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL # SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, # AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL # SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH # THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, # PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH # RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY # EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. # # __END_OF_JASPER_LICENSE__ AUTOMAKE_OPTIONS = foreign dist-zip dist-tarZ EXTRA_DIST = README INSTALL COPYRIGHT LICENSE NEWS ChangeLog data doc \ jasper.spec.in jasper.spec acaux # Note: We need to put the derived file "jasper.spec" in the distribution # in order to facilitate RPM building. SUBDIRS = src rpm: dist for i in BUILD RPMS SRPMS SOURCES SPECS; do \ j=$$PWD/RPMTOP/$$i; \ if ! -d $$j; then \ mkdir -p $$j || exit 1; \ fi \ done rpmbuild --rmsource --define "_topdir $$PWD/RPMTOP" \ -ta $(PACKAGE)-$(JAS_VERSION).tar.gz rm -rf $$PWD/RPMTOP/BUILD/$(PACKAGE)-$(JAS_VERSION) # We need to ensure that any Subversion directories in the extra directories # are removed before the distribution archive is made. dist-hook: for i in $(EXTRA_DIST); do \ if test -d $$i; then \ j=`find $(distdir)/$$i -name .svn`; \ if test -n "$$j"; then \ rm -rf $$j; \ fi; \ fi; \ done