updated autotools files to improve build and install procedures (credit to Vincent Torri)
This commit is contained in:
parent
89456eed51
commit
86edc0a40e
3
CHANGES
3
CHANGES
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
|||
! : changed
|
||||
+ : added
|
||||
|
||||
March 4, 2011
|
||||
! [antonin] updated autotools files to improve build and install procedures (credit to Vincent Torri).
|
||||
|
||||
February 17, 2011
|
||||
* [antonin] replaced 'long' by 'size_t' in dwt.c to be sure to cast to a pointer size.
|
||||
* [antonin] now allows 16-bit precision for mj2 encoding and decoding (solves Issue 49 and Issue 63). Credit to Winfried.
|
||||
|
|
59
INSTALL
59
INSTALL
|
@ -7,34 +7,39 @@ UNIX/LINUX similar systems
|
|||
|
||||
1) Using configure tools
|
||||
|
||||
You can simply type
|
||||
./configure [--prefix=/path]
|
||||
To build from top-level directory, you can simply type:
|
||||
./bootstrap.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
If you are root:
|
||||
make install
|
||||
make clean
|
||||
make distclean
|
||||
To keep all build files in a separate directory, you can type instead:
|
||||
./bootstrap.sh
|
||||
mkdir build
|
||||
cd build
|
||||
../configure
|
||||
make
|
||||
|
||||
else:
|
||||
To install:
|
||||
sudo make install
|
||||
|
||||
To clean:
|
||||
make clean
|
||||
make distclean
|
||||
|
||||
Binaries are located in the 'bin' directory.
|
||||
To build doc (requires 'doxygen' to be found on your system):
|
||||
(this will create an html directory in TOP_LEVEL/doc)
|
||||
make doc
|
||||
|
||||
If 'configure' does not work on your system please
|
||||
call './bootstrap.sh'.
|
||||
Main './configure' options (type './configure --help' for more details)
|
||||
'--enable-mj2'
|
||||
'--enable-jp3d'
|
||||
'--enable-jpwl'
|
||||
'--prefix=/path/to/install/directory' (example : '--prefix=$PWD/installed')
|
||||
'--enable-debug' (default : disabled)
|
||||
|
||||
If 'configure' does not find a library or header file,
|
||||
or to see available configure options, please try
|
||||
'./configure --help'.
|
||||
You can also specify your own CFLAGS and LDFLAGS with (for example):
|
||||
CFLAGS="-O3 -pipe" LDFLAGS="-Wl,-s" ./configure
|
||||
|
||||
Note: if Doxygen is found on your system, a target 'docs'
|
||||
will automatically be created in 'doc/Makefile'. To build
|
||||
the documentation (it will create an 'html' directory):
|
||||
cd doc
|
||||
make docs
|
||||
|
||||
2) Using cmake (see www.cmake.org)
|
||||
|
||||
|
@ -84,22 +89,16 @@ Main available cmake flags:
|
|||
MACOSX
|
||||
------
|
||||
|
||||
The same building procedures as above will soon be available for MACOSX.
|
||||
The xcode project file has also to be updated.
|
||||
Right now, the CMake procedure is the only one working. Please refer to instructions above.
|
||||
The same building procedures as above (autotools and cmake) work for MACOSX.
|
||||
The xcode project file can also be used.
|
||||
|
||||
If it does not work, try adding the following flag to the cmake command :
|
||||
'-DCMAKE_OSX_ARCHITECTURES:STRING=i386'
|
||||
|
||||
WINDOWS
|
||||
-------
|
||||
|
||||
If you're using cygwin, the same procedures as for Unix should work. Otherwise:
|
||||
If you're using cygwin or MinGW, the same procedures as for Unix can be used.
|
||||
|
||||
1) Using cmake to generate project files
|
||||
|
||||
Use the cmake procedure above with the '-G <generator-name>' flag to generate the project
|
||||
files for the IDE you are using. Type 'cmake --help' for available generators on your platform.
|
||||
|
||||
2) Using the provided project files
|
||||
|
||||
These files are obsolete and will be updated soon.
|
||||
Otherwise you can use cmake to generate project files for the IDE you are using (VC2010, etc).
|
||||
Type 'cmake --help' for available generators on your platform.
|
||||
|
|
102
Makefile.am
102
Makefile.am
|
@ -1,28 +1,88 @@
|
|||
#OpenJPEG top source directory
|
||||
SUBDIRS = libopenjpeg codec mj2 @jpwl_dir@ @jp3d_dir@ doc
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-jp3d=yes --enable-jpwl=yes --enable-mj2=yes
|
||||
|
||||
clean-local:
|
||||
@rm -rf bin
|
||||
@list='$(SUBDIRS)'; for dir in $${list} ; do \
|
||||
rm -f $${dir}/.report.txt ; \
|
||||
done
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
distclean-local: clean-local
|
||||
SUBDIRS = libopenjpeg codec
|
||||
|
||||
pkgconf_dir = $(libdir)/pkgconfig
|
||||
if WANT_JP3D
|
||||
SUBDIRS += jp3d
|
||||
endif
|
||||
|
||||
if WANT_JPWL
|
||||
SUBDIRS += jpwl
|
||||
endif
|
||||
|
||||
if WANT_MJ2
|
||||
SUBDIRS += mj2
|
||||
endif
|
||||
|
||||
SUBDIRS += doc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libopenjpeg1.pc
|
||||
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
config.guess \
|
||||
opj_config.h.in \
|
||||
opj_config.h.in~ \
|
||||
config.sub \
|
||||
configure \
|
||||
depcomp \
|
||||
install-sh \
|
||||
ltmain.sh \
|
||||
missing
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMake/CheckHaveGetopt.cmake \
|
||||
CMake/CTestCustom.cmake.in \
|
||||
CMake/OpenJPEGConfig.cmake.in \
|
||||
CMakeLists.txt \
|
||||
CTestConfig.cmake \
|
||||
CTestCustom.cmake.in \
|
||||
CMakeLists.txt \
|
||||
JavaOpenJPEG/java-jni/include/jawt.h \
|
||||
JavaOpenJPEG/java-jni/include/jdwpTransport.h \
|
||||
JavaOpenJPEG/java-jni/include/jni.h \
|
||||
JavaOpenJPEG/java-jni/include/jvmdi.h \
|
||||
JavaOpenJPEG/java-jni/include/jvmpi.h \
|
||||
JavaOpenJPEG/java-jni/include/jvmti.h \
|
||||
JavaOpenJPEG/java-jni/include/win32/jawt_md.h \
|
||||
JavaOpenJPEG/java-jni/include/win32/jni_md.h \
|
||||
JavaOpenJPEG/java-jni/lib/jvm.lib \
|
||||
JavaOpenJPEG/JavaOpenJPEG.c \
|
||||
JavaOpenJPEG/JavaOpenJPEGDecoder.c \
|
||||
JavaOpenJPEG/java-sources/org/openJpeg/OpenJPEGJavaDecoder.java \
|
||||
JavaOpenJPEG/java-sources/org/openJpeg/OpenJPEGJavaEncoder.java \
|
||||
JavaOpenJPEG/org_openJpeg_OpenJPEGJavaDecoder.h \
|
||||
JavaOpenJPEG/org_openJpeg_OpenJPEGJavaEncoder.h \
|
||||
LICENSE \
|
||||
CHANGES \
|
||||
bootstrap.sh \
|
||||
libopenjpeg1.pc.cmake \
|
||||
libopenjpeg1.pc.in \
|
||||
opj_configh.cmake.in \
|
||||
opj_config.h.in.user \
|
||||
m4/opj_check_lib.m4 \
|
||||
m4/opj_doxygen.m4 \
|
||||
m4/pkg.m4
|
||||
|
||||
.PHONY: doc
|
||||
|
||||
# Documentation
|
||||
|
||||
doc:
|
||||
@echo "entering doc/"
|
||||
@cd doc && make doc
|
||||
|
||||
install-data-hook:
|
||||
@echo ""
|
||||
@list='$(SUBDIRS)'; for dir in $${list} ; do \
|
||||
cat $${dir}/.report.txt ; \
|
||||
done
|
||||
@echo ""
|
||||
@echo "Installing: libopenjpeg1.pc $(DESTDIR)$(pkgconf_dir)"
|
||||
@echo ""
|
||||
@$(INSTALL) -d $(DESTDIR)$(pkgconf_dir)
|
||||
@cp libopenjpeg1.pc $(DESTDIR)$(pkgconf_dir)/libopenjpeg1.pc
|
||||
@(cd $(DESTDIR)$(pkgconf_dir) && $(RM) libopenjpeg.pc && \
|
||||
$(LN_S) libopenjpeg1.pc libopenjpeg.pc)
|
||||
$(LN_S) -nf libopenjpeg1.pc $(DESTDIR)$(pkgconfigdir)/libopenjpeg.pc
|
||||
@echo -e " (PC)\t$(pkgconfigdir)/libopenjpeg1.pc" >> $(top_builddir)/report.txt
|
||||
@echo -e " (LN)\t$(pkgconfigdir)/libopenjpeg.pc" >> $(top_builddir)/report.txt
|
||||
@cat $(top_builddir)/report.txt
|
||||
@rm $(top_builddir)/report.txt
|
||||
|
||||
uninstall-hook:
|
||||
@(cd $(DESTDIR)$(pkgconf_dir) && $(RM) libopenjpeg.pc libopenjpeg1.pc)
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/libopenjpeg.pc
|
||||
|
|
|
@ -1,52 +1,72 @@
|
|||
COMPILERFLAGS = -Wall
|
||||
|
||||
if with_sharedlibs
|
||||
COMPILERFLAGS += -DOPJ_EXPORTS
|
||||
else
|
||||
COMPILERFLAGS += -DOPJ_STATIC
|
||||
endif
|
||||
|
||||
USERLIBS = -lm
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common
|
||||
|
||||
if with_libtiff
|
||||
INCLUDES += @tiffincludes@
|
||||
USERLIBS += @tifflibs@
|
||||
endif
|
||||
|
||||
if with_libpng
|
||||
INCLUDES += @pngincludes@
|
||||
USERLIBS += @pnglibs@
|
||||
endif
|
||||
|
||||
if with_liblcms2
|
||||
INCLUDES += @lcms2includes@
|
||||
USERLIBS += @lcms2libs@
|
||||
endif
|
||||
|
||||
if with_liblcms1
|
||||
INCLUDES += @lcms1includes@
|
||||
USERLIBS += @lcms1libs@
|
||||
endif
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
bin_PROGRAMS = j2k_to_image image_to_j2k j2k_dump
|
||||
|
||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
|
||||
LDADD = $(USERLIBS) ../libopenjpeg/libopenjpeg.la
|
||||
j2k_to_image_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/codec \
|
||||
-I$(top_builddir)/codec \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
@PNG_CFLAGS@ \
|
||||
@TIFF_CFLAGS@ \
|
||||
@LCMS1_CFLAGS@ \
|
||||
@LCMS2_CFLAGS@
|
||||
j2k_to_image_CFLAGS =
|
||||
j2k_to_image_LDADD = $(top_builddir)/libopenjpeg/libopenjpeg.la @LCMS1_LIBS@ @LCMS2_LIBS@ @TIFF_LIBS@ @PNG_LIBS@ -lm
|
||||
j2k_to_image_SOURCES = \
|
||||
../common/color.c \
|
||||
../common/getopt.c \
|
||||
convert.c \
|
||||
index.c \
|
||||
j2k_to_image.c \
|
||||
../common/color.h
|
||||
|
||||
j2k_to_image_SOURCES = ../common/getopt.c index.c convert.c \
|
||||
../common/color.c j2k_to_image.c
|
||||
image_to_j2k_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/codec \
|
||||
-I$(top_builddir)/codec \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
@PNG_CFLAGS@ \
|
||||
@TIFF_CFLAGS@
|
||||
image_to_j2k_CFLAGS =
|
||||
image_to_j2k_LDADD = $(top_builddir)/libopenjpeg/libopenjpeg.la @TIFF_LIBS@ @PNG_LIBS@ -lm
|
||||
image_to_j2k_SOURCES = \
|
||||
../common/getopt.c \
|
||||
convert.c \
|
||||
index.c \
|
||||
image_to_j2k.c \
|
||||
convert.h \
|
||||
../common/format_defs.h \
|
||||
index.h
|
||||
|
||||
image_to_j2k_SOURCES = ../common/getopt.c index.c convert.c image_to_j2k.c
|
||||
j2k_dump_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/codec \
|
||||
-I$(top_builddir)/codec \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg
|
||||
j2k_dump_CFLAGS =
|
||||
j2k_dump_LDADD = $(top_builddir)/libopenjpeg/libopenjpeg.la -lm
|
||||
j2k_dump_SOURCES = \
|
||||
../common/getopt.c \
|
||||
index.c \
|
||||
j2k_dump.c \
|
||||
../common/getopt.h \
|
||||
index.h
|
||||
|
||||
j2k_dump_SOURCES = ../common/getopt.c index.c j2k_dump.c
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt \
|
||||
windirent.h
|
||||
|
||||
REPBIN=$(bin_PROGRAMS)
|
||||
|
||||
all-local:
|
||||
$(INSTALL) -d ../bin
|
||||
$(INSTALL) $(bin_PROGRAMS) ../bin
|
||||
@echo "" > .report.txt
|
||||
@for file in ${REPBIN} ; do \
|
||||
echo "Installing: ${prefix}/bin/$${file}" >> .report.txt ; \
|
||||
done
|
||||
install-data-hook:
|
||||
@echo -e " (B)\t\t$(bindir)/j2k_to_image$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (B)\t\t$(bindir)/image_to_j2k$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (B)\t\t$(bindir)/j2k_dump$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
|
|
930
configure.ac
930
configure.ac
|
@ -1,482 +1,472 @@
|
|||
#AC_PREREQ([2.65])
|
||||
define([OPJ_MAJOR], [1])
|
||||
define([OPJ_MINOR], [4])
|
||||
define([OPJ_BUILD], [0])
|
||||
#
|
||||
define([JP3D_MAJOR], [1])
|
||||
define([JP3D_MINOR], [3])
|
||||
define([JP3D_BUILD], [0])
|
||||
#
|
||||
#
|
||||
#AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
|
||||
AC_INIT(OpenJPEG,
|
||||
OPJ_MAJOR.OPJ_MINOR.OPJ_BUILD,
|
||||
http://code.google.com/p/openjpeg/,
|
||||
openjpeg-OPJ_MAJOR.OPJ_MINOR.OPJ_BUILD,
|
||||
http://www.openjpeg.org/)
|
||||
AC_CONFIG_SRCDIR([libopenjpeg/openjpeg.c])
|
||||
AC_CONFIG_HEADERS(opj_config.h)
|
||||
#
|
||||
|
||||
m4_define([OPJ_MAJOR], [1])
|
||||
m4_define([OPJ_MINOR], [4])
|
||||
m4_define([OPJ_MICRO], [0])
|
||||
|
||||
m4_define([JP3D_MAJOR], [1])
|
||||
m4_define([JP3D_MINOR], [3])
|
||||
m4_define([JP3D_MICRO], [0])
|
||||
|
||||
m4_define([lt_rev], m4_eval(OPJ_MAJOR + OPJ_MINOR))
|
||||
m4_define([lt_cur], OPJ_MICRO)
|
||||
m4_define([lt_age], OPJ_MINOR)
|
||||
|
||||
AC_PREREQ([2.62])
|
||||
AC_INIT([OpenJPEG],
|
||||
[OPJ_MAJOR.OPJ_MINOR.OPJ_MICRO],
|
||||
[openjpeg@googlegroups.com],
|
||||
[openjpeg],
|
||||
[http://www.openjpeg.org])
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADERS([opj_config.h])
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
#foreign:package will not follow the GNU Standards
|
||||
AM_INIT_AUTOMAKE(foreign)
|
||||
#
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(1.11 foreign dist-bzip2)
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
MAJOR_NR=OPJ_MAJOR
|
||||
MINOR_NR=OPJ_MINOR
|
||||
BUILD_NR=OPJ_BUILD
|
||||
MICRO_NR=OPJ_MICRO
|
||||
AC_SUBST(MAJOR_NR)
|
||||
AC_SUBST(MINOR_NR)
|
||||
AC_SUBST(BUILD_NR)
|
||||
#
|
||||
AC_SUBST(MICRO_NR)
|
||||
|
||||
JP3D_MAJOR_NR=JP3D_MAJOR
|
||||
JP3D_MINOR_NR=JP3D_MINOR
|
||||
JP3D_BUILD_NR=JP3D_BUILD
|
||||
JP3D_MICRO_NR=JP3D_MICRO
|
||||
AC_SUBST(JP3D_MAJOR_NR)
|
||||
AC_SUBST(JP3D_MINOR_NR)
|
||||
AC_SUBST(JP3D_BUILD_NR)
|
||||
#
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_SED
|
||||
AC_SYS_LARGEFILE
|
||||
AC_FUNC_FSEEKO
|
||||
AC_PROG_MAKE_SET
|
||||
#AC_HEADER_DIRENT
|
||||
#
|
||||
# Tests for Windows
|
||||
#
|
||||
AC_EXEEXT
|
||||
AC_OBJEXT
|
||||
#
|
||||
# Configure libtool
|
||||
AC_ENABLE_SHARED
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_LIBTOOL_SETUP
|
||||
AC_PROG_LIBTOOL
|
||||
#
|
||||
AC_C_BIGENDIAN
|
||||
#
|
||||
LIB_MATH=""
|
||||
AC_CHECK_LIB(m,sqrt,LIB_MATH="-lm",,)
|
||||
LIB_Z=""
|
||||
AC_CHECK_LIB(z,inflate,LIB_Z="-lz",,)
|
||||
#
|
||||
LIBS="$LIBS $LIB_MATH $LIB_Z"
|
||||
#
|
||||
AC_PATH_PROG([PKGCONFIG], [pkg-config])
|
||||
#
|
||||
# ------------------------------
|
||||
# Test for PNG
|
||||
# ------------------------------
|
||||
AC_MSG_CHECKING(whether to build with PNG support)
|
||||
pngincludes=""
|
||||
pnglibs=""
|
||||
png_header_found="no"
|
||||
with_libpng="yes"
|
||||
#
|
||||
AC_ARG_ENABLE(png,
|
||||
[ --enable-png[=[yes|no]] Build with PNG support [ [default=yes] ]],
|
||||
test "$enable_png" = "no" && with_libpng="no")
|
||||
#
|
||||
if test "x$with_libpng" = xyes ; then
|
||||
with_libpng="no"
|
||||
AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
|
||||
#
|
||||
pngheader=""
|
||||
AC_ARG_WITH(png_includes,
|
||||
[ --with-png-includes=DIR PNG includes in nonstandard DIR])
|
||||
if test -n "$with_png_includes" ; then
|
||||
pngheader="$with_png_includes"
|
||||
pngincludes="-I$with_png_includes"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
pngincludes="`$PKGCONFIG --variable=includedir libpng`"
|
||||
if test -n "$pngincludes" ; then
|
||||
pngheader="$pngincludes"
|
||||
pngincludes="-I$pngincludes"
|
||||
fi
|
||||
else
|
||||
if test -n "$LIBPNG_CONFIG" ; then
|
||||
pngincludes="`$LIBPNG_CONFIG --I_opts`"
|
||||
pngheader="`$LIBPNG_CONFIG --I_opts | $SED 's/-I//'`"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test -n "$pngheader" ; then
|
||||
pngheader="$pngheader/png.h"
|
||||
else
|
||||
pngheader="png.h"
|
||||
fi
|
||||
#
|
||||
AC_CHECK_HEADER($pngheader,png_header_found="yes",,)
|
||||
#
|
||||
AC_ARG_WITH(png_libraries,
|
||||
[ --with-png-libraries=DIR PNG library in nonstandard DIR])
|
||||
if [[ -n "$with_png_libraries" ]] ; then
|
||||
pnglibs="-L$with_png_libraries -lpng"
|
||||
else
|
||||
if test -n "$LIBPNG_CONFIG" ; then
|
||||
pnglibs="`$LIBPNG_CONFIG --ldflags`"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
pnglibs="`$PKGCONFIG --libs libpng`"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$pnglibs $LIB_Z $LIB_MATH"
|
||||
#
|
||||
AC_CHECK_LIB(png,png_create_read_struct,,pnglibs="",)
|
||||
#
|
||||
LIBS="$savedLIBS"
|
||||
if test -n "$pnglibs" ; then
|
||||
if test -n "$pngincludes" ; then
|
||||
with_libpng="yes"
|
||||
png_header_found="yes"
|
||||
LIBS="$LIBS $pnglibs"
|
||||
AC_DEFINE(HAVE_LIBPNG, [1], [define to 1 if you have libpng])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_RESULT(png is usable:$with_libpng)
|
||||
AM_CONDITIONAL([with_libpng], [test x$with_libpng = xyes])
|
||||
AC_SUBST(pngincludes)
|
||||
AC_SUBST(pnglibs)
|
||||
# -------------------------------
|
||||
# Test for TIFF
|
||||
# -------------------------------
|
||||
AC_MSG_CHECKING(whether to build with TIFF support)
|
||||
tifflibs=""
|
||||
tiffincludes=""
|
||||
with_libtiff="yes"
|
||||
tiff_header_found="no"
|
||||
#
|
||||
AC_ARG_ENABLE(tiff,
|
||||
[ --enable-tiff[=[yes|no]] Build with TIFF support [ [default=yes] ]],
|
||||
test "$enable_tiff" = "no" && with_libtiff="no")
|
||||
#
|
||||
if test "x$with_libtiff" = xyes ; then
|
||||
#TIFF compiled with JPEG and JBIG support?
|
||||
libjpeg=""
|
||||
AC_CHECK_LIB(jpeg,jpeg_read_header,libjpeg=-ljpeg,,)
|
||||
libjbig=""
|
||||
AC_CHECK_LIB(jbig,jbg_enc_init,libjbig=-ljbig,,)
|
||||
libjbig85=""
|
||||
AC_CHECK_LIB(jbig85,jbg85_enc_init,libjbig85=-ljbig85,,)
|
||||
#standard path
|
||||
with_libtiff="no"
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="-ltiff $libjpeg $libjbig $libjbig85 $LIB_Z $LIB_MATH"
|
||||
AC_CHECK_LIB(tiff, TIFFOpen, tifflibs=-ltiff)
|
||||
LIBS="$savedLIBS"
|
||||
if test -n "$tifflibs" ; then
|
||||
AC_CHECK_HEADER(tiff.h,tiff_header_found="yes",,)
|
||||
if test "$tiff_header_found" = "yes" ; then
|
||||
with_libtiff="yes"
|
||||
LIBS="$LIBS -ltiff $libjpeg $libjbig $libjbig85"
|
||||
AC_DEFINE(HAVE_LIBTIFF, [1], [define to 1 if you have libtiff])
|
||||
fi
|
||||
fi
|
||||
#
|
||||
if test "x$with_libtiff" = xno ; then
|
||||
#non-standard path
|
||||
AC_ARG_WITH(tiff_includes,
|
||||
[ --with-tiff-includes=DIR TIFF includes in nonstandard DIR])
|
||||
if test -n "$with_tiff_includes" ; then
|
||||
tiffheader="$with_tiff_includes/tiff.h"
|
||||
AC_CHECK_HEADER($tiffheader,tiff_header_found="yes",,)
|
||||
if test "$tiff_header_found" = "yes" ; then
|
||||
tiffincludes="-I$with_tiff_includes"
|
||||
fi
|
||||
fi
|
||||
AC_ARG_WITH(tiff_libraries,
|
||||
[ --with-tiff-libraries=DIR TIFF library in nonstandard DIR])
|
||||
if test -n "$with_tiff_libraries" ; then
|
||||
tifflibs="-L$with_tiff_libraries"
|
||||
fi
|
||||
tifflibs="$tifflibs -ltiff"
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$tifflibs $libjpeg $libjbig $libjbig85 $LIB_Z $LIB_MATH"
|
||||
with_libtiff="no"
|
||||
#
|
||||
AC_CHECK_LIB(tiff, TIFFOpen, , tifflibs="",)
|
||||
#
|
||||
if test -n "$tifflibs" ; then
|
||||
if test "$tiff_header_found" = "yes" ; then
|
||||
with_libtiff="yes"
|
||||
AC_DEFINE(HAVE_LIBTIFF, [1], [define to 1 if you have libtiff])
|
||||
fi
|
||||
fi
|
||||
LIBS="$savedLIBS $tifflibs $libjpeg $libjbig $libjbig85"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_RESULT(tiff is usable:$with_libtiff)
|
||||
AM_CONDITIONAL([with_libtiff], [test x$with_libtiff = xyes])
|
||||
AC_SUBST(tiffincludes)
|
||||
AC_SUBST(tifflibs)
|
||||
# -------------------------------
|
||||
# Test for LCMS version 2.x
|
||||
# -------------------------------
|
||||
AC_MSG_CHECKING(whether to build with LCMS support)
|
||||
lcms1includes=""
|
||||
lcms1libs=""
|
||||
lcms2includes=""
|
||||
lcms2libs=""
|
||||
with_liblcms1="no"
|
||||
lcms1_header_found="no"
|
||||
lcms2_header_found="no"
|
||||
have_lcms1_version=""
|
||||
have_lcms2_version=""
|
||||
with_liblcms2="yes"
|
||||
#
|
||||
AC_ARG_ENABLE(lcms2,
|
||||
[ --enable-lcms2[=[yes|no]] Build with LCMS-2 support [ [default=yes] ]],
|
||||
test "$enable_lcms2" = "no" && with_liblcms2="no")
|
||||
#
|
||||
if test "x$with_liblcms2" = xyes ; then
|
||||
with_liblcms2="no"
|
||||
lcms2header=""
|
||||
AC_ARG_WITH(lcms2_includes,
|
||||
[ --with-lcms2-includes=DIR LCMS-2 includes in nonstandard DIR])
|
||||
if test -n "$with_lcms2_includes" ; then
|
||||
lcms2header="$with_lcms2_includes"
|
||||
lcms2includes="-I$with_lcms2_includes"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
lcms2includes="`$PKGCONFIG --variable=prefix lcms2`"
|
||||
fi
|
||||
if test -n "$lcms2includes" ; then
|
||||
lcms2header="$lcms2_includes"
|
||||
lcms2includes="-I$lcms2includes/include"
|
||||
fi
|
||||
fi
|
||||
if test -n "$lcms2header" ; then
|
||||
lcms2header="$lcms2header/lcms2.h"
|
||||
else
|
||||
lcms2header="lcms2.h"
|
||||
fi
|
||||
AC_CHECK_HEADER($lcms2header,lcms2_header_found="yes",,)
|
||||
#
|
||||
AC_ARG_WITH(lcms2_libraries,
|
||||
[ --with-lcms2-libraries=DIR LCMS-2 library in nonstandard DIR])
|
||||
if test -n "$with_lcms2_libraries" ; then
|
||||
lcms2libs="-L$with_lcms2_libraries -llcms2"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
lcms2libs="`$PKGCONFIG --libs lcms2`"
|
||||
fi
|
||||
if test -z "$lcms2libs" ; then
|
||||
lcms2libs="-llcms2"
|
||||
fi
|
||||
lcms2libs="$lcms2libs"
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$lcms2libs $LIB_MATH"
|
||||
with_liblcms2="no"
|
||||
#
|
||||
AC_CHECK_LIB(lcms2, cmsOpenProfileFromFile, ,lcms2libs="",)
|
||||
#
|
||||
if test -n "$lcms2libs" ; then
|
||||
if test "$lcms2_header_found" = "yes" ; then
|
||||
with_liblcms2="yes"
|
||||
AC_DEFINE(HAVE_LIBLCMS2, [1], [define to 1 if you have lcms version 2.x])
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
have_lcms2_version="`$PKGCONFIG --modversion lcms2`"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$with_liblcms2" = "no" ; then
|
||||
lcms2libs=""
|
||||
lcms2includes=""
|
||||
lcms2libs=""
|
||||
fi
|
||||
LIBS="$savedLIBS $lcms2libs"
|
||||
fi
|
||||
#
|
||||
AC_MSG_RESULT(lcms2 is usable:$with_liblcms2)
|
||||
AM_CONDITIONAL([with_liblcms2], [test x$with_liblcms2 = xyes])
|
||||
AC_SUBST(lcms2includes)
|
||||
AC_SUBST(lcms2libs)
|
||||
AC_MSG_RESULT(lcms2libs:$lcms2libs)
|
||||
# ----------------------------
|
||||
# Test for LCMS version 1.x
|
||||
# ----------------------------
|
||||
if [[ -z "$lcms2libs" ]] ; then
|
||||
with_liblcms1="yes"
|
||||
AC_ARG_ENABLE(lcms1,
|
||||
[ --enable-lcms1[=[yes|no]] Build with LCMS-1 support [ [default=yes] ]],
|
||||
test "$enable_lcms1" = "no" && with_liblcms1="no")
|
||||
#
|
||||
if test "x$with_liblcms1" = xyes ; then
|
||||
with_liblcms1="no"
|
||||
lcms1header=""
|
||||
AC_ARG_WITH(lcms1_includes,
|
||||
[ --with-lcms1-includes=DIR LCMS-1 includes in nonstandard DIR])
|
||||
if test -n "$with_lcms1_includes" ; then
|
||||
lcms1header="$with_lcms1_includes"
|
||||
lcms1includes="-I$with_lcms1_includes"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
lcms1includes="`$PKGCONFIG --variable=includedir lcms`"
|
||||
fi
|
||||
if test -n "$lcms1includes" ; then
|
||||
lcms1header="$lcms1includes"
|
||||
lcms1includes="-I$lcms1includes"
|
||||
fi
|
||||
fi
|
||||
if test -n "$lcms1header" ; then
|
||||
lcms1header="$lcms1header/lcms.h"
|
||||
else
|
||||
lcms1header="lcms.h"
|
||||
fi
|
||||
AC_CHECK_HEADER($lcms1header,lcms1_header_found="yes",,)
|
||||
#
|
||||
AC_ARG_WITH(lcms1_libraries,
|
||||
[ --with-lcms1-libraries=DIR LCMS-1 library in nonstandard DIR])
|
||||
if test -n "$with_lcms1_libraries" ; then
|
||||
lcms1libs="-L$with_lcms1_libraries -llcms"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
lcms1libs="`$PKGCONFIG --libs lcms`"
|
||||
fi
|
||||
if test -z "$lcms1libs" ; then
|
||||
lcms1libs="-llcms"
|
||||
fi
|
||||
lcms1libs="$lcms1libs"
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$lcms1libs $LIB_MATH"
|
||||
with_liblcms1="no"
|
||||
#
|
||||
AC_CHECK_LIB(lcms, cmsOpenProfileFromFile, ,lcms1libs="",)
|
||||
#
|
||||
if test -n "$lcms1libs" ; then
|
||||
if test "$lcms1_header_found" = "yes" ; then
|
||||
with_liblcms1="yes"
|
||||
AC_DEFINE(HAVE_LIBLCMS1, [1], [define to 1 if you have lcms version 1.x])
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
have_lcms1_version="`$PKGCONFIG --modversion lcms`"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$with_liblcms1" = "no" ; then
|
||||
lcms1libs=""
|
||||
lcms1includes=""
|
||||
lcms1libs=""
|
||||
fi
|
||||
LIBS="$savedLIBS $lcms1libs"
|
||||
fi
|
||||
AC_MSG_RESULT(lcms is usable:$with_liblcms1)
|
||||
fi
|
||||
#
|
||||
AM_CONDITIONAL([with_liblcms1], [test x$with_liblcms1 = xyes])
|
||||
AC_SUBST(lcms1includes)
|
||||
AC_SUBST(lcms1libs)
|
||||
#
|
||||
# -------------------------------
|
||||
# Test for USE_JPWL
|
||||
# -------------------------------
|
||||
AC_MSG_CHECKING(whether to build with JPWL support)
|
||||
with_libjpwl="no"
|
||||
jpwl_dir=""
|
||||
AC_ARG_ENABLE(jpwl,
|
||||
[ --enable-jpwl[=[yes|no]] Build with JPWL support [ [default=no] ]],
|
||||
test "$enable_jpwl" = "yes" && with_libjpwl="yes")
|
||||
#
|
||||
AC_MSG_RESULT($with_libjpwl)
|
||||
AM_CONDITIONAL([with_libjpwl], [test x$with_libjpwl = xyes])
|
||||
if test "$with_libjpwl" = "yes" ; then
|
||||
jpwl_dir="jpwl"
|
||||
fi
|
||||
AC_SUBST(jpwl_dir)
|
||||
#
|
||||
# -------------------------------
|
||||
# Test for creating SHARED LIBS
|
||||
# wanted result: shared xor static
|
||||
# -------------------------------
|
||||
with_sharedlibs="yes"
|
||||
AC_MSG_CHECKING(whether to build shared libraries)
|
||||
AC_ARG_ENABLE(shared,
|
||||
[ --enable-shared[=[yes|no]] Build shared libs [ [default=yes] ]],
|
||||
test "$enable_shared" = "no" && with_sharedlibs="no")
|
||||
#
|
||||
AC_MSG_RESULT($with_sharedlibs)
|
||||
AM_CONDITIONAL([with_sharedlibs], [test x$with_sharedlibs = xyes])
|
||||
#
|
||||
#
|
||||
build_so="no"
|
||||
build_dll="no"
|
||||
build_dylib="no"
|
||||
case "${host_os}" in
|
||||
*cygwin*)
|
||||
build_dll="yes"
|
||||
;;
|
||||
*mingw*)
|
||||
build_dll="yes"
|
||||
;;
|
||||
*darwin*)
|
||||
build_dylib="yes"
|
||||
;;
|
||||
*)
|
||||
build_so="yes"
|
||||
;;
|
||||
esac
|
||||
#
|
||||
AM_CONDITIONAL([build_dll], [test x$build_dll = xyes])
|
||||
AM_CONDITIONAL([build_dylib], [test x$build_dylib = xyes])
|
||||
AM_CONDITIONAL([build_so], [test x$build_so = xyes])
|
||||
#
|
||||
AC_SUBST(JP3D_MICRO_NR)
|
||||
|
||||
# -------------------------------
|
||||
# Test for creating JP3D
|
||||
# -------------------------------
|
||||
with_jp3d="no"
|
||||
jp3d_dir=""
|
||||
AC_MSG_CHECKING(whether to build the JP3D library)
|
||||
AC_ARG_ENABLE(jp3d,
|
||||
[ --enable-jp3d[=[yes|no]] Build jp3d libs [ [default=no] ]],
|
||||
test "$enable_jp3d" = "yes" && with_jp3d="yes")
|
||||
#
|
||||
AC_MSG_RESULT($with_jp3d)
|
||||
if test "$with_jp3d" = "yes" ; then
|
||||
jp3d_dir="jp3d"
|
||||
LT_PREREQ([2.0])
|
||||
LT_INIT([win32-dll])
|
||||
|
||||
lt_version=lt_rev:lt_cur:lt_age
|
||||
AC_SUBST(lt_version)
|
||||
|
||||
|
||||
### Needed information
|
||||
|
||||
have_win32=no
|
||||
have_darwin="no"
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
have_win32="yes"
|
||||
;;
|
||||
darwin*)
|
||||
have_darwin="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_DARWIN], [test "x${have_darwin}" = "xyes"])
|
||||
|
||||
|
||||
### Additional options to configure
|
||||
|
||||
# debug
|
||||
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AC_HELP_STRING([--enable-debug], [build with debug symbols @<:@default=disabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_debug="yes"
|
||||
else
|
||||
want_debug="no"
|
||||
fi
|
||||
],
|
||||
[want_debug="no"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build in debug mode])
|
||||
AC_MSG_RESULT([${want_debug}])
|
||||
|
||||
# MJ2
|
||||
|
||||
AC_ARG_ENABLE([mj2],
|
||||
[AC_HELP_STRING([--enable-mj2], [build mj2 binaries @<:@default=disabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_mj2="yes"
|
||||
else
|
||||
want_mj2="no"
|
||||
fi
|
||||
],
|
||||
[want_mj2="no"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build the MJ2 binaries])
|
||||
AC_MSG_RESULT([${want_mj2}])
|
||||
|
||||
if test "x${want_mj2}" = "xyes" ; then
|
||||
AC_DEFINE(USE_MJ2, [1], [define to 1 if you use mj2])
|
||||
fi
|
||||
AC_SUBST(jp3d_dir)
|
||||
#
|
||||
AC_CHECK_PROG(with_doxygen, doxygen, [yes],[no],,)
|
||||
AM_CONDITIONAL([with_doxygen], [test x$with_doxygen = xyes])
|
||||
#
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([libopenjpeg1.pc])
|
||||
AC_CONFIG_FILES([libopenjpeg/Makefile])
|
||||
AC_CONFIG_FILES([jpwl/Makefile])
|
||||
AC_CONFIG_FILES([codec/Makefile])
|
||||
AC_CONFIG_FILES([mj2/Makefile])
|
||||
AC_CONFIG_FILES([doc/Makefile])
|
||||
AC_CONFIG_FILES([jp3d/Makefile])
|
||||
AC_CONFIG_FILES([jp3d/libjp3dvm/Makefile])
|
||||
AC_CONFIG_FILES([jp3d/codec/Makefile])
|
||||
|
||||
AM_CONDITIONAL([WANT_MJ2], [test "x${want_mj2}" = "xyes"])
|
||||
|
||||
# JPWL
|
||||
|
||||
AC_ARG_ENABLE([jpwl],
|
||||
[AC_HELP_STRING([--enable-jpwl], [build JPWL library @<:@default=disabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_jpwl="yes"
|
||||
else
|
||||
want_jpwl="no"
|
||||
fi
|
||||
],
|
||||
[want_jpwl="no"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build the JPWL library])
|
||||
AC_MSG_RESULT([${want_jpwl}])
|
||||
|
||||
if test "x${want_jpwl}" = "xyes" ; then
|
||||
AC_DEFINE(USE_JPWL, [1], [define to 1 if you use jpwl])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([WANT_JPWL], [test "x${want_jpwl}" = "xyes"])
|
||||
|
||||
# JP3D
|
||||
|
||||
AC_ARG_ENABLE([jp3d],
|
||||
[AC_HELP_STRING([--enable-jp3d], [build jp3d library @<:@default=disabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_jp3d="yes"
|
||||
else
|
||||
want_jp3d="no"
|
||||
fi
|
||||
],
|
||||
[want_jp3d="no"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build the JP3D library])
|
||||
AC_MSG_RESULT([${want_jp3d}])
|
||||
|
||||
if test "x${want_jp3d}" = "xyes" ; then
|
||||
AC_DEFINE(USE_JP3D, [1], [define to 1 if you use jp3d])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([WANT_JP3D], [test "x${want_jp3d}" = "xyes"])
|
||||
|
||||
|
||||
### Checks for programs
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
# pkg-config
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Check whether pkg-config supports Requires.private
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.22 ; then
|
||||
pkgconfig_requires_private="Requires.private"
|
||||
else
|
||||
pkgconfig_requires_private="Requires"
|
||||
fi
|
||||
AC_SUBST(pkgconfig_requires_private)
|
||||
|
||||
# doxygen
|
||||
|
||||
OPJ_CHECK_DOXYGEN
|
||||
|
||||
# ln -s
|
||||
|
||||
AC_PROG_LN_S
|
||||
|
||||
|
||||
### Checks for libraries
|
||||
|
||||
# libpng
|
||||
|
||||
AC_ARG_ENABLE([png],
|
||||
[AC_HELP_STRING([--disable-png], [disable PNG support @<:@default=enabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_png="yes"
|
||||
else
|
||||
want_png="no"
|
||||
fi
|
||||
],
|
||||
[want_png="yes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build with PNG support])
|
||||
AC_MSG_RESULT([${want_png}])
|
||||
|
||||
if test "x${want_png}" = "xyes" ; then
|
||||
|
||||
PKG_CHECK_MODULES([PNG], [libpng14],
|
||||
[have_libpng="yes"],
|
||||
[
|
||||
PKG_CHECK_MODULES([PNG], [libpng12],
|
||||
[have_libpng="yes"],
|
||||
[
|
||||
PKG_CHECK_MODULES([PNG], [libpng10],
|
||||
[have_libpng="yes"],
|
||||
[
|
||||
PKG_CHECK_MODULES([PNG], [libpng],
|
||||
[have_libpng="yes"],
|
||||
[have_libpng="no"])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
if ! test "x${have_libpng}" = "xyes" ; then
|
||||
OPJ_CHECK_LIB([/usr],
|
||||
[png.h],
|
||||
[png],
|
||||
[png_create_write_struct],
|
||||
[have_libpng="yes"],
|
||||
[have_libpng="no"])
|
||||
fi
|
||||
|
||||
if ! test "x${have_libpng}" = "xyes" ; then
|
||||
OPJ_CHECK_LIB([/usr/local],
|
||||
[png.h],
|
||||
[png],
|
||||
[png_create_write_struct],
|
||||
[have_libpng="yes"],
|
||||
[have_libpng="no"])
|
||||
fi
|
||||
|
||||
if ! test "x${have_libpng}" = "xyes" ; then
|
||||
OPJ_CHECK_LIB([/opt],
|
||||
[png.h],
|
||||
[png],
|
||||
[png_create_write_struct],
|
||||
[have_libpng="yes"],
|
||||
[have_libpng="no"])
|
||||
fi
|
||||
|
||||
if test "x${have_libpng}" = "xno" ; then
|
||||
AC_MSG_WARN([Can not find a usuable PNG library. Make sure that CPPFLAGS and LDFLAGS are correctly set.])
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether PNG is available])
|
||||
AC_MSG_RESULT([${have_libpng}])
|
||||
|
||||
if test "x${have_libpng}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_LIBPNG, [1], [define to 1 if you have libpng])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([with_libpng], [test x${have_libpng} = "xyes"])
|
||||
|
||||
#libtiff
|
||||
|
||||
AC_ARG_ENABLE([tiff],
|
||||
[AC_HELP_STRING([--disable-tiff], [disable TIFF support @<:@default=enabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_tiff="yes"
|
||||
else
|
||||
want_tiff="no"
|
||||
fi
|
||||
],
|
||||
[want_tiff="yes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build with TIFF support])
|
||||
AC_MSG_RESULT([${want_tiff}])
|
||||
|
||||
if test "x${want_tiff}" = "xyes" ; then
|
||||
|
||||
OPJ_CHECK_LIB([/usr],
|
||||
[tiff.h],
|
||||
[tiff],
|
||||
[TIFFOpen],
|
||||
[have_libtiff="yes"],
|
||||
[have_libtiff="no"])
|
||||
|
||||
if ! test "x${have_libtiff}" = "xyes" ; then
|
||||
OPJ_CHECK_LIB([/usr/local],
|
||||
[tiff.h],
|
||||
[tiff],
|
||||
[TIFFOpen],
|
||||
[have_libtiff="yes"],
|
||||
[have_libtiff="no"])
|
||||
fi
|
||||
|
||||
if ! test "x${have_libtiff}" = "xyes" ; then
|
||||
OPJ_CHECK_LIB([/opt],
|
||||
[tiff.h],
|
||||
[tiff],
|
||||
[TIFFOpen],
|
||||
[have_libtiff="yes"],
|
||||
[have_libtiff="no"])
|
||||
fi
|
||||
|
||||
if test "x${have_libtiff}" = "xno" ; then
|
||||
AC_MSG_WARN([Can not find a usuable TIFF library. Make sure that CPPFLAGS and LDFLAGS are correctly set.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether TIFF is available])
|
||||
AC_MSG_RESULT([${have_libtiff}])
|
||||
|
||||
if test "x${have_libtiff}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_LIBTIFF, [1], [define to 1 if you have libtiff])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([with_libtiff], [test "x${have_libtiff}" = "xyes"])
|
||||
|
||||
AC_ARG_VAR([TIFF_CFLAGS], [preprocessor flags for libtiff])
|
||||
AC_SUBST(TIFF_CFLAGS)
|
||||
AC_ARG_VAR([TIFF_LIBS], [linker flags for libtiff])
|
||||
AC_SUBST(TIFF_LIBS)
|
||||
|
||||
# libcms2
|
||||
|
||||
lcms_output="no"
|
||||
|
||||
AC_ARG_ENABLE([lcms2],
|
||||
[AC_HELP_STRING([--disable-lcms2], [disable LCMS-2 support @<:@default=enabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_lcms2="yes"
|
||||
else
|
||||
want_lcms2="no"
|
||||
fi
|
||||
],
|
||||
[want_lcms2="yes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build with LCMS-2 support])
|
||||
AC_MSG_RESULT([${want_lcms2}])
|
||||
|
||||
if test "x${want_lcms2}" = "xyes" ; then
|
||||
PKG_CHECK_MODULES([LCMS2], [lcms2],
|
||||
[
|
||||
have_lcms2="yes"
|
||||
requirements="lcms2"
|
||||
],
|
||||
[have_lcms2="no"])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether LCMS-2 is available])
|
||||
AC_MSG_RESULT([${have_lcms2}])
|
||||
|
||||
if test "x${have_lcms2}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_LIBLCMS2, [1], [define to 1 if you have lcms version 2.x])
|
||||
lcms_output="lcms version 2.x"
|
||||
fi
|
||||
|
||||
# libcms1
|
||||
|
||||
AC_ARG_ENABLE([lcms1],
|
||||
[AC_HELP_STRING([--disable-lcms1], [disable LCMS-1 support @<:@default=enabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
want_lcms1="yes"
|
||||
else
|
||||
want_lcms1="no"
|
||||
fi
|
||||
],
|
||||
[want_lcms1="yes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build with LCMS-1 support])
|
||||
AC_MSG_RESULT([${want_lcms1}])
|
||||
|
||||
if test "x${have_lcms2}" = "xno" ; then
|
||||
|
||||
if test "x${want_lcms1}" = "xyes" ; then
|
||||
PKG_CHECK_MODULES([LCMS1], [lcms1],
|
||||
[
|
||||
have_lcms1="yes"
|
||||
requirements="lcms1"
|
||||
],
|
||||
[PKG_CHECK_MODULES([LCMS1], [lcms],
|
||||
[
|
||||
have_lcms1="yes"
|
||||
requirements="lcms"
|
||||
],
|
||||
[have_lcms1="no"])])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether LCMS-1 is available])
|
||||
AC_MSG_RESULT([${have_lcms1}])
|
||||
|
||||
if test "x${have_lcms1}" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_LIBLCMS1, [1], [define to 1 if you have lcms version 1.x])
|
||||
lcms_output="lcms version 1.x"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
### Checks for header files
|
||||
|
||||
## FIXME: declarations must be fixed in source code. See autoconf manual
|
||||
AC_HEADER_DIRENT
|
||||
|
||||
|
||||
### Checks for types
|
||||
|
||||
|
||||
### Checks for structures
|
||||
|
||||
|
||||
### Checks for compiler characteristics
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
#OPJ_COMPILER_FLAG([-Wall])
|
||||
#OPJ_COMPILER_FLAG([-Wextra])
|
||||
#OPJ_COMPILER_FLAG([-Wshadow])
|
||||
#OPJ_COMPILER_FLAG([-Wpointer-arith])
|
||||
OPJ_COMPILER_FLAG([-Wno-unused-result])
|
||||
|
||||
if test "x${want_debug}" = "xyes" ; then
|
||||
OPJ_COMPILER_FLAG([-g])
|
||||
OPJ_COMPILER_FLAG([-O0])
|
||||
else
|
||||
OPJ_COMPILER_FLAG([-O3])
|
||||
fi
|
||||
|
||||
|
||||
### Checks for linker characteristics
|
||||
|
||||
|
||||
### Checks for library functions
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
libopenjpeg1.pc
|
||||
libopenjpeg/Makefile
|
||||
jpwl/Makefile
|
||||
codec/Makefile
|
||||
mj2/Makefile
|
||||
doc/Makefile
|
||||
jp3d/Makefile
|
||||
jp3d/libjp3dvm/Makefile
|
||||
jp3d/codec/Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
#
|
||||
echo "----------------------------------------------"
|
||||
echo " your configuration"
|
||||
echo ""
|
||||
echo "--with-png-libraries: $with_libpng"
|
||||
echo "libpng header : $png_header_found"
|
||||
echo "--enable-tiff : $with_libtiff"
|
||||
echo "libtiff header : $tiff_header_found"
|
||||
echo "--enable-lcms2 : $with_liblcms2"
|
||||
echo "lcms2 header : $lcms2_header_found"
|
||||
echo "lcms2 version : $have_lcms2_version"
|
||||
echo "--enable-lcms1 : $with_liblcms1"
|
||||
echo "lcms1 header : $lcms1_header_found"
|
||||
echo "lcms1 version : $have_lcms1_version"
|
||||
echo "--enable-jpwl : $with_libjpwl"
|
||||
echo "--enable-jp3d : $with_jp3d"
|
||||
echo "--enable-shared : $with_sharedlibs"
|
||||
echo "----------------------------------------------"
|
||||
|
||||
### Summary
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo "------------------------------------------------------------------------"
|
||||
echo "$PACKAGE $VERSION"
|
||||
echo "------------------------------------------------------------------------"
|
||||
echo
|
||||
echo
|
||||
echo "Configuration Options Summary:"
|
||||
echo
|
||||
echo " Debug...............: ${want_debug}"
|
||||
echo
|
||||
echo " Optional support:"
|
||||
echo " libpng............: ${have_libpng}"
|
||||
echo " libtiff...........: ${have_libtiff}"
|
||||
echo " libcms............: ${lcms_output}"
|
||||
echo
|
||||
echo " Documentation.......: ${opj_have_doxygen}"
|
||||
echo " Build.............: make doc"
|
||||
echo
|
||||
echo " mj2.................: ${want_mj2}"
|
||||
echo " jpwl................: ${want_jpwl}"
|
||||
echo " jp3d................: ${want_jp3d}"
|
||||
echo
|
||||
|
|
148
doc/Doxyfile.dox
148
doc/Doxyfile.dox
|
@ -1,14 +1,16 @@
|
|||
# Doxyfile 1.4.2
|
||||
# Doxyfile 1.7.3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = OpenJPEG
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_BRIEF =
|
||||
PROJECT_LOGO =
|
||||
OUTPUT_DIRECTORY = .
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
|
@ -26,19 +28,28 @@ ALWAYS_DETAILED_SEC = NO
|
|||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH = C://
|
||||
STRIP_FROM_INC_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = YES
|
||||
INHERIT_DOCS = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
EXTENSION_MAPPING =
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
SYMBOL_CACHE_SIZE = 0
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -47,6 +58,7 @@ EXTRACT_PRIVATE = YES
|
|||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
@ -55,19 +67,26 @@ INTERNAL_DOCS = NO
|
|||
CASE_SENSE_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_MEMBERS_CTORS_1ST = NO
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -77,25 +96,28 @@ WARN_IF_UNDOCUMENTED = YES
|
|||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../libopenjpeg \
|
||||
../jpwl
|
||||
../jpwl
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = *.h \
|
||||
*.c
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -104,33 +126,64 @@ INLINE_SOURCES = NO
|
|||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = ./html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
HTML_COLORSTYLE_SAT = 100
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
HTML_TIMESTAMP = YES
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||
DOCSET_PUBLISHER_NAME = Publisher
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
CHM_INDEX_ENCODING =
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
GENERATE_QHP = NO
|
||||
QCH_FILE =
|
||||
QHP_NAMESPACE = org.doxygen.Project
|
||||
QHP_VIRTUAL_FOLDER = doc
|
||||
QHP_CUST_FILTER_NAME =
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
QHG_LOCATION =
|
||||
GENERATE_ECLIPSEHELP = NO
|
||||
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
USE_INLINE_TREES = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
USE_MATHJAX = NO
|
||||
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
|
||||
SEARCHENGINE = NO
|
||||
SERVER_BASED_SEARCH = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -140,12 +193,13 @@ LATEX_CMD_NAME = latex
|
|||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
LATEX_SOURCE_CODE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -153,8 +207,8 @@ GENERATE_RTF = NO
|
|||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -167,8 +221,8 @@ MAN_LINKS = NO
|
|||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
|
@ -180,34 +234,39 @@ GENERATE_AUTOGEN_DEF = NO
|
|||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = USE_JPWL \
|
||||
USE_JPSEC
|
||||
EXPAND_AS_DEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
DOT_NUM_THREADS = 0
|
||||
DOT_FONTNAME = Helvetica
|
||||
DOT_FONTSIZE = 10
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
|
@ -216,19 +275,16 @@ TEMPLATE_RELATIONS = NO
|
|||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MSCFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
|
|
105
doc/Makefile.am
105
doc/Makefile.am
|
@ -1,49 +1,72 @@
|
|||
MAJOR = @MAJOR_NR@
|
||||
MINOR = @MINOR_NR@
|
||||
BUILD = @BUILD_NR@
|
||||
|
||||
if with_doxygen
|
||||
docs:
|
||||
doxygen Doxyfile.dox
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
.PHONY: doc
|
||||
|
||||
PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
|
||||
|
||||
if OPJ_BUILD_DOC
|
||||
|
||||
doc-clean:
|
||||
rm -rf $(top_srcdir)/doc/html/ $(top_srcdir)/doc/$(PACKAGE_DOCNAME).tar*
|
||||
|
||||
doc: all
|
||||
cd $(top_srcdir)/doc && \
|
||||
$(opj_doxygen) Doxyfile.dox
|
||||
rm -rf $(PACKAGE_DOCNAME).tar*
|
||||
rm -rf $(top_srcdir)/doc/$(PACKAGE_DOCNAME).tar*
|
||||
mkdir -p $(PACKAGE_DOCNAME)/doc
|
||||
cp -R $(top_srcdir)/doc/html/ $(PACKAGE_DOCNAME)/doc
|
||||
tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
|
||||
bzip2 -9 $(PACKAGE_DOCNAME).tar
|
||||
rm -rf $(PACKAGE_DOCNAME)/
|
||||
if ! test -f $(top_srcdir)/doc/$(PACKAGE_DOCNAME).tar.bz2 ; then \
|
||||
mv $(PACKAGE_DOCNAME).tar.bz2 $(top_srcdir)/doc; \
|
||||
fi
|
||||
|
||||
clean-local: doc-clean
|
||||
|
||||
else
|
||||
|
||||
doc:
|
||||
@echo "Documentation not built. Run ./configure --help"
|
||||
|
||||
endif
|
||||
|
||||
doc_dir = $(datarootdir)/doc/openjpeg-$(MAJOR).$(MINOR)
|
||||
docsdir = $(docdir)-$(MAJOR_NR).$(MINOR_NR)
|
||||
docs_DATA = $(top_builddir)/LICENSE $(top_builddir)/CHANGES
|
||||
|
||||
all-local:
|
||||
@echo "" > .report.txt
|
||||
@echo "Installing: image_to_j2k.1 ${mandir}/man1" >> .report.txt
|
||||
@echo "Installing: j2k_to_image.1 ${mandir}/man1" >> .report.txt
|
||||
@echo "Installing: j2k_dump.1 ${mandir}/man1" >> .report.txt
|
||||
@echo "Installing: libopenjpeg.3 ${mandir}/man3" >> .report.txt
|
||||
@echo "Installing: LICENSE CHANGES $(doc_dir)" >> .report.txt
|
||||
@cp man/man1/* .
|
||||
@cp man/man3/* .
|
||||
dist_man1_MANS = \
|
||||
man/man1/image_to_j2k.1 \
|
||||
man/man1/j2k_dump.1 \
|
||||
man/man1/j2k_to_image.1
|
||||
|
||||
dist_man3_MANS = \
|
||||
man/man3/libopenjpeg.3
|
||||
|
||||
install-data-hook:
|
||||
$(INSTALL) -d $(DESTDIR)$(doc_dir)
|
||||
$(INSTALL) -d $(DESTDIR)${mandir}/man1 $(DESTDIR)${mandir}/man3
|
||||
if with_libjpwl
|
||||
@(cd $(DESTDIR)${mandir}/man1 && $(RM) JPWL_image_to_j2k* JPWL_j2k_to_image*)
|
||||
@(cd $(DESTDIR)${mandir}/man3 && $(RM) JPWL_libopenjpeg* )
|
||||
endif
|
||||
@(cd $(DESTDIR)${mandir}/man1 && $(RM) image_to_j2k* j2k_to_image* j2k_dump* )
|
||||
@(cd $(DESTDIR)${mandir}/man3 && $(RM) libopenjpeg* )
|
||||
@gzip -f image_to_j2k.1 j2k_to_image.1 j2k_dump.1 libopenjpeg.3
|
||||
@cp image_to_j2k.1.gz j2k_to_image.1.gz j2k_dump.1.gz $(DESTDIR)${mandir}/man1
|
||||
@cp libopenjpeg.3.gz $(DESTDIR)${mandir}/man3
|
||||
@$(RM) *\.gz
|
||||
if with_libjpwl
|
||||
@(cd $(DESTDIR)${mandir}/man1 && \
|
||||
$(LN_S) image_to_j2k.1.gz JPWL_image_to_j2k.1.gz && \
|
||||
$(LN_S) j2k_to_image.1.gz JPWL_j2k_to_image.1.gz)
|
||||
@(cd ${mandir}/man3 && $(LN_S) libopenjpeg.3.gz JPWL_libopenjpeg.3.gz)
|
||||
endif
|
||||
@$(INSTALL) -m 644 ../LICENSE ../CHANGES $(DESTDIR)$(doc_dir)
|
||||
cd $(DESTDIR)$(man1dir) && \
|
||||
rm -f jpwl_image_to_j2k.1 && \
|
||||
$(LN_S) image_to_j2k.1 jpwl_image_to_j2k.1
|
||||
cd $(DESTDIR)$(man1dir) && \
|
||||
rm -f jpwl_j2k_to_image.1 && \
|
||||
$(LN_S) j2k_to_image.1 jpwl_j2k_to_image.1
|
||||
cd $(DESTDIR)$(man3dir) && \
|
||||
rm -f jpwl_libopenjpeg.3 && \
|
||||
$(LN_S) libopenjpeg.3 jpwl_libopenjpeg.3
|
||||
@echo -e " (MAN)\t$(man1dir)/image_to_j2k.1" >> $(top_builddir)/report.txt
|
||||
@echo -e " (LN)\t$(man1dir)/jpwl_image_to_j2k.1" >> $(top_builddir)/report.txt
|
||||
@echo -e " (MAN)\t$(man1dir)/j2k_dump.1" >> $(top_builddir)/report.txt
|
||||
@echo -e " (MAN)\t$(man1dir)/j2k_to_image.1" >> $(top_builddir)/report.txt
|
||||
@echo -e " (LN)\t$(man1dir)//jpwl_j2k_to_image.1" >> $(top_builddir)/report.txt
|
||||
@echo -e " (MAN)\t$(man3dir)/libopenjpeg.3" >> $(top_builddir)/report.txt
|
||||
@echo -e " (LN)\t$(man3dir)/jpwl_libopenjpeg.3" >> $(top_builddir)/report.txt
|
||||
|
||||
uninstall-hook:
|
||||
@(cd $(DESTDIR)${mandir}/man1 && $(RM) JPWL_image_to_j2k* JPWL_j2k_to_image* && \
|
||||
$(RM) image_to_j2k* j2k_to_image* j2k_dump* )
|
||||
@(cd $(DESTDIR)${mandir}/man3 && $(RM) JPWL_libopenjpeg* && \
|
||||
$(RM) libopenjpeg* )
|
||||
@(cd $(DESTDIR)$(doc_dir) && $(RM) * )
|
||||
@rmdir $(DESTDIR)$(doc_dir)
|
||||
rm -f $(DESTDIR)$(man1dir)/jpwl_image_to_j2k.1
|
||||
rm -f $(DESTDIR)$(man1dir)/jpwl_j2k_to_image.1
|
||||
rm -f $(DESTDIR)$(man3dir)/jpwl_libopenjpeg.3
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt \
|
||||
Doxyfile.dox
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
SUBDIRS = libjp3dvm codec
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt
|
||||
|
|
|
@ -1,27 +1,23 @@
|
|||
#jp3d/codec/
|
||||
|
||||
USERLIBS =
|
||||
INCLUDES = -I. -I../libjp3dvm
|
||||
CFLAGS = -Wall $(INCLUDES)
|
||||
|
||||
if with_sharedlibs
|
||||
CFLAGS += -DOPJ_EXPORTS
|
||||
else
|
||||
CFLAGS += -DOPJ_STATIC
|
||||
endif
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
bin_PROGRAMS = jp3d_to_volume volume_to_jp3d
|
||||
LDADD = $(USERLIBS) ../libjp3dvm/libopenjp3dvm.la
|
||||
|
||||
jp3d_to_volume_SOURCES = getopt.c convert.c jp3d_to_volume.c
|
||||
jp3d_to_volume_CPPFLAGS =
|
||||
jp3d_to_volume_CFLAGS =
|
||||
jp3d_to_volume_LDADD = $(top_builddir)/jp3d/libjp3dvm/libopenjp3dvm.la -lm
|
||||
jp3d_to_volume_SOURCES = getopt.c convert.c jp3d_to_volume.c convert.h
|
||||
|
||||
volume_to_jp3d_SOURCES = getopt.c convert.c volume_to_jp3d.c
|
||||
volume_to_jp3d_CPPFLAGS =
|
||||
volume_to_jp3d_CFLAGS =
|
||||
volume_to_jp3d_LDADD = $(top_builddir)/jp3d/libjp3dvm/libopenjp3dvm.la
|
||||
volume_to_jp3d_SOURCES = getopt.c convert.c volume_to_jp3d.c convert.h
|
||||
|
||||
REPBIN=$(bin_PROGRAMS)
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt \
|
||||
windirent.h
|
||||
|
||||
all-local:
|
||||
$(INSTALL) -d ../../bin
|
||||
$(INSTALL) $(bin_PROGRAMS) ../../bin
|
||||
@(for file in ${REPBIN} ; do \
|
||||
echo "Installing: ${prefix}/bin/$${file}" >> ../.report.txt ; \
|
||||
done)
|
||||
install-data-hook:
|
||||
@echo -e " (B)\t\t$(bindir)/jp3d_to_volume$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (B)\t\t$(bindir)/volume_to_jp3d$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
|
|
|
@ -1,99 +1,88 @@
|
|||
#libjp3dvm
|
||||
#
|
||||
MAJOR = @JP3D_MAJOR_NR@
|
||||
MINOR = @JP3D_MINOR_NR@
|
||||
BUILD = @JP3D_BUILD_NR@
|
||||
CURRENT=`expr $(MAJOR) + $(MINOR)`
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
lib_LTLIBRARIES = libopenjp3dvm.la
|
||||
|
||||
libopenjp3dvm_la_LDFLAGS = -no-undefined \
|
||||
-version-info $(CURRENT):$(BUILD):$(MINOR)
|
||||
includesdir = ${includedir}/openjpeg3d-@JP3D_MAJOR_NR@.@JP3D_MINOR_NR@
|
||||
includes_HEADERS = openjpeg3d.h
|
||||
|
||||
SRCS = bio.c cio.c dwt.c event.c jp3d.c jp3d_lib.c volume.c mct.c mqc.c \
|
||||
openjpeg.c pi.c raw.c t1.c t1_3d.c t2.c tcd.c tgt.c
|
||||
libopenjp3dvm_la_LDFLAGS = -no-undefined -version-info @lt_version@
|
||||
|
||||
INCLS = t1_3d.h bio.h cio.h dwt.h event.h fix.h int.h jp3d.h jp3d_lib.h \
|
||||
volume.h mct.h mqc.h pi.h raw.h t1.h t2.h tcd.h tgt.h opj_includes.h
|
||||
libopenjp3dvm_la_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/jp3d/libjp3dvm \
|
||||
-I$(top_builddir)/jp3d/libjp3dvm
|
||||
libopenjp3dvm_la_CFLAGS =
|
||||
libopenjp3dvm_la_LIBADD = -lm
|
||||
libopenjp3dvm_la_SOURCES = \
|
||||
bio.c \
|
||||
cio.c \
|
||||
dwt.c \
|
||||
event.c \
|
||||
jp3d.c \
|
||||
jp3d_lib.c \
|
||||
volume.c \
|
||||
mct.c \
|
||||
mqc.c \
|
||||
openjpeg.c \
|
||||
pi.c \
|
||||
raw.c \
|
||||
t1.c \
|
||||
t1_3d.c \
|
||||
t2.c \
|
||||
tcd.c \
|
||||
tgt.c \
|
||||
bio.h \
|
||||
cio.h \
|
||||
dwt.h \
|
||||
event.h \
|
||||
fix.h \
|
||||
int.h \
|
||||
jp3d.h \
|
||||
jp3d_lib.h \
|
||||
mct.h \
|
||||
mqc.h \
|
||||
opj_includes.h \
|
||||
pi.h \
|
||||
raw.h \
|
||||
t1.h \
|
||||
t1_3d.h \
|
||||
t2.h \
|
||||
tcd.h \
|
||||
tgt.h \
|
||||
volume.h
|
||||
|
||||
libopenjp3dvm_la_SOURCES = $(SRCS) $(INCLS)
|
||||
|
||||
includedir = ${prefix}/include/openjpeg3d-$(MAJOR).$(MINOR)
|
||||
include_HEADERS = openjpeg3d.h
|
||||
|
||||
# Converts cr/lf to just lf
|
||||
DOS2UNIX = dos2unix
|
||||
|
||||
dos2unix:
|
||||
@$(DOS2UNIX) $(SRCS) $(INCLS)
|
||||
|
||||
INCLUDES = -I../.. -I.
|
||||
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
|
||||
|
||||
if with_sharedlibs
|
||||
COMPILERFLAGS += -DOPJ_EXPORTS
|
||||
else
|
||||
COMPILERFLAGS += -DOPJ_STATIC
|
||||
libopenjp3dvm_la_LDFLAGS += -static
|
||||
endif
|
||||
|
||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
|
||||
#CFLAGS += -DJP3D_VERSION="\"$(MAJOR).$(MINOR).$(BUILD)\""
|
||||
|
||||
headerdir = openjpeg3d-$(MAJOR).$(MINOR)
|
||||
|
||||
all-local:
|
||||
@$(INSTALL) -d ../../bin
|
||||
@rm -rf .report_dir
|
||||
@$(INSTALL) -d .report_dir
|
||||
if build_so
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.so*" -exec cp -P {} .report_dir \;
|
||||
@find .libs -type l -name "*\.so*" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
if build_dll
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.dll" -exec cp -P {} .report_dir \;
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
if build_dylib
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.dylib" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type l -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
@cp -a .report_dir/* ../../bin
|
||||
@echo "" > ../.report.txt
|
||||
@echo "Installing: ${prefix}/include/${headerdir}/" >> ../.report.txt
|
||||
@echo "Installing: ${prefix}/include/${headerdir}/openjpeg3d.h" >> ../.report.txt
|
||||
@echo "Installing: ${prefix}/lib/libopenjp3dvm.la" >> ../.report.txt
|
||||
@(cd .report_dir; \
|
||||
for file in `ls *.dll 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/bin/$${file}" >> ../../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.a 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.so* 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.dylib 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../../.report.txt ; \
|
||||
done \
|
||||
)
|
||||
@rm -rf .report_dir
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt
|
||||
|
||||
install-data-hook:
|
||||
(cd $(DESTDIR)${prefix}/include && rm -f openjpeg3d.h)
|
||||
(cd $(DESTDIR)${prefix}/include && \
|
||||
$(LN_S) ${headerdir}/openjpeg3d.h openjpeg3d.h)
|
||||
cd $(DESTDIR)$(includedir) && \
|
||||
rm -f openjpeg3d.h && \
|
||||
$(LN_S) openjpeg3d-@JP3D_MAJOR_NR@.@JP3D_MINOR_NR@/openjpeg3d.h \
|
||||
openjpeg3d.h
|
||||
@echo -e " (LA)\t$(libdir)/libopenjp3dvm.la" >> $(top_builddir)/report.txt
|
||||
@( $(call solist) ) >> $(top_builddir)/report.txt
|
||||
@echo -e " (A)\t\t$(base)/$(a)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (H)\t\t$(includedir)/openjpeg3d-$(MAJOR_NR).$(MINOR_NR)/openjpeg3d.h" >> $(top_builddir)/report.txt
|
||||
@echo -e " (LN)\t$(includedir)/openjpeg3d.h" >> $(top_builddir)/report.txt
|
||||
|
||||
uninstall-hook:
|
||||
(cd $(DESTDIR)${prefix}/include && rm -rf openjpeg3d.h ${headerdir})
|
||||
rm -f $(DESTDIR)$(includedir)/openjpeg3d.h
|
||||
|
||||
solist = $(foreach f, $(dll) $(so), echo -e ' $(SO_PREFIX)\t$(base)/$(f)' ;)
|
||||
get_tok = $(shell grep -E "^$(1)=" $(lib_LTLIBRARIES) | cut -d "'" -f 2)
|
||||
base = $(call get_tok,libdir)
|
||||
so = $(call get_tok,library_names)
|
||||
a = $(call get_tok,old_library)
|
||||
|
||||
if HAVE_WIN32
|
||||
SO_PREFIX = (DLL)
|
||||
dll = $(call get_tok,dlname)
|
||||
else
|
||||
if HAVE_DARWIN
|
||||
SO_PREFIX = (DY)
|
||||
dll =
|
||||
else
|
||||
SO_PREFIX = (SO)
|
||||
dll =
|
||||
endif
|
||||
endif
|
||||
|
|
232
jpwl/Makefile.am
232
jpwl/Makefile.am
|
@ -1,138 +1,116 @@
|
|||
MAJOR = @MAJOR_NR@
|
||||
MINOR = @MINOR_NR@
|
||||
BUILD = @BUILD_NR@
|
||||
CURRENT=`expr $(MAJOR) + $(MINOR)`
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
lib_LTLIBRARIES = libopenjpeg_JPWL.la
|
||||
|
||||
libopenjpeg_JPWL_la_LDFLAGS = -no-undefined \
|
||||
-version-info $(CURRENT):$(BUILD):$(MINOR)
|
||||
OPJ_SRC = \
|
||||
../libopenjpeg/bio.c \
|
||||
../libopenjpeg/cio.c \
|
||||
../libopenjpeg/dwt.c \
|
||||
../libopenjpeg/event.c \
|
||||
../libopenjpeg/image.c \
|
||||
../libopenjpeg/j2k.c \
|
||||
../libopenjpeg/j2k_lib.c \
|
||||
../libopenjpeg/jp2.c \
|
||||
../libopenjpeg/jpt.c \
|
||||
../libopenjpeg/mct.c \
|
||||
../libopenjpeg/mqc.c \
|
||||
../libopenjpeg/openjpeg.c \
|
||||
../libopenjpeg/pi.c \
|
||||
../libopenjpeg/raw.c \
|
||||
../libopenjpeg/t1.c \
|
||||
../libopenjpeg/t2.c \
|
||||
../libopenjpeg/tcd.c \
|
||||
../libopenjpeg/tgt.c
|
||||
|
||||
JPWL_SRCS = crc.c jpwl.c jpwl_lib.c rs.c
|
||||
JPWL_INCLS = jpwl.h crc.h rs.h
|
||||
|
||||
SRCS = ../libopenjpeg/bio.c ../libopenjpeg/cio.c ../libopenjpeg/dwt.c \
|
||||
../libopenjpeg/event.c ../libopenjpeg/image.c ../libopenjpeg/j2k.c \
|
||||
../libopenjpeg/j2k_lib.c ../libopenjpeg/jp2.c ../libopenjpeg/jpt.c \
|
||||
../libopenjpeg/mct.c ../libopenjpeg/mqc.c ../libopenjpeg/openjpeg.c \
|
||||
../libopenjpeg/pi.c ../libopenjpeg/raw.c ../libopenjpeg/t1.c \
|
||||
../libopenjpeg/t2.c ../libopenjpeg/tcd.c ../libopenjpeg/tgt.c \
|
||||
$(JPWL_SRCS)
|
||||
|
||||
INCLS = ../libopenjpeg/bio.h ../libopenjpeg/cio.h ../libopenjpeg/dwt.h \
|
||||
../libopenjpeg/event.h ../libopenjpeg/fix.h ../libopenjpeg/image.h \
|
||||
../libopenjpeg/int.h ../libopenjpeg/j2k.h ../libopenjpeg/j2k_lib.h \
|
||||
../libopenjpeg/jp2.h ../libopenjpeg/jpt.h ../libopenjpeg/mct.h \
|
||||
../libopenjpeg/mqc.h ../libopenjpeg/openjpeg.h ../libopenjpeg/pi.h \
|
||||
../libopenjpeg/raw.h ../libopenjpeg/t1.h ../libopenjpeg/t2.h \
|
||||
../libopenjpeg/tcd.h ../libopenjpeg/tgt.h ../libopenjpeg/opj_malloc.h \
|
||||
../libopenjpeg/opj_includes.h \
|
||||
$(JPWL_INCLS)
|
||||
|
||||
libopenjpeg_JPWL_la_SOURCES = $(SRCS) $(INCLS)
|
||||
|
||||
# Converts cr/lf to just lf
|
||||
DOS2UNIX = dos2unix
|
||||
|
||||
dos2unix:
|
||||
@$(DOS2UNIX) $(SRCS) $(INCLS)
|
||||
|
||||
COMPILERFLAGS = -Wall -ffast-math -std=c99
|
||||
|
||||
USERLIBS =
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common
|
||||
|
||||
if with_libtiff
|
||||
INCLUDES += @tiffincludes@
|
||||
USERLIBS += @tifflibs@
|
||||
endif
|
||||
|
||||
if with_libpng
|
||||
INCLUDES += @pngincludes@
|
||||
USERLIBS += @pnglibs@
|
||||
endif
|
||||
|
||||
if with_liblcms2
|
||||
INCLUDES += @lcms2includes@
|
||||
USERLIBS += @lcms2libs@
|
||||
endif
|
||||
|
||||
if with_liblcms1
|
||||
INCLUDES += @lcms1includes@
|
||||
USERLIBS += @lcms1libs@
|
||||
endif
|
||||
|
||||
USERLIBS += -lm
|
||||
libopenjpeg_JPWL_la_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
-I$(top_srcdir)/jpwl \
|
||||
-I$(top_builddir)/jpwl \
|
||||
-DUSE_JPWL
|
||||
libopenjpeg_JPWL_la_CFLAGS =
|
||||
libopenjpeg_JPWL_la_LIBADD = -lm
|
||||
libopenjpeg_JPWL_la_LDFLAGS = -no-undefined -version-info @lt_version@
|
||||
libopenjpeg_JPWL_la_SOURCES = \
|
||||
$(OPJ_SRC) \
|
||||
crc.c \
|
||||
jpwl.c \
|
||||
jpwl_lib.c \
|
||||
rs.c \
|
||||
jpwl.h \
|
||||
crc.h \
|
||||
rs.h
|
||||
|
||||
bin_PROGRAMS = JPWL_j2k_to_image JPWL_image_to_j2k
|
||||
|
||||
JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
||||
JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
||||
JPWL_j2k_to_image_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
-I$(top_srcdir)/jpwl \
|
||||
-I$(top_builddir)/jpwl \
|
||||
-DUSE_JPWL \
|
||||
@TIFF_CFLAGS@ \
|
||||
@PNG_CFLAGS@ \
|
||||
@LCMS1_CFLAGS@ \
|
||||
@LCMS2_CFLAGS@
|
||||
JPWL_j2k_to_image_CFLAGS =
|
||||
JPWL_j2k_to_image_LDADD = $(top_builddir)/jpwl/libopenjpeg_JPWL.la @LCMS1_LIBS@ @LCMS2_LIBS@ @TIFF_LIBS@ @PNG_LIBS@
|
||||
JPWL_j2k_to_image_SOURCES = \
|
||||
$(top_builddir)/common/color.c \
|
||||
$(top_builddir)/common/getopt.c \
|
||||
$(top_builddir)/codec/index.c \
|
||||
$(top_builddir)/codec/convert.c \
|
||||
$(top_builddir)/codec/j2k_to_image.c
|
||||
|
||||
if with_sharedlibs
|
||||
COMPILERFLAGS += -DOPJ_EXPORTS
|
||||
JPWL_image_to_j2k_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
-I$(top_srcdir)/jpwl \
|
||||
-I$(top_builddir)/jpwl \
|
||||
-DUSE_JPWL \
|
||||
@TIFF_CFLAGS@ \
|
||||
@PNG_CFLAGS@
|
||||
JPWL_image_to_j2k_CFLAGS =
|
||||
JPWL_image_to_j2k_LDADD = $(top_builddir)/jpwl/libopenjpeg_JPWL.la @TIFF_LIBS@ @PNG_LIBS@
|
||||
|
||||
JPWL_image_to_j2k_SOURCES = \
|
||||
$(top_builddir)/common/getopt.c \
|
||||
$(top_builddir)/codec/index.c \
|
||||
$(top_builddir)/codec/convert.c \
|
||||
$(top_builddir)/codec/image_to_j2k.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt
|
||||
|
||||
install-data-hook:
|
||||
@echo -e " (B)\t\t$(bindir)/JPWL_j2k_to_image$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (B)\t\t$(bindir)/JPWL_image_to_j2k$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (LA)\t$(libdir)/libopenjpeg_JPWL.la" >> $(top_builddir)/report.txt
|
||||
@( $(call solist) ) >> $(top_builddir)/report.txt
|
||||
@echo -e " (A)\t\t$(base)/$(a)" >> $(top_builddir)/report.txt
|
||||
|
||||
solist = $(foreach f, $(dll) $(so), echo -e ' $(SO_PREFIX)\t$(base)/$(f)' ;)
|
||||
get_tok = $(shell grep -E "^$(1)=" $(lib_LTLIBRARIES) | cut -d "'" -f 2)
|
||||
base = $(call get_tok,libdir)
|
||||
so = $(call get_tok,library_names)
|
||||
a = $(call get_tok,old_library)
|
||||
|
||||
if HAVE_WIN32
|
||||
SO_PREFIX = (DLL)
|
||||
dll = $(call get_tok,dlname)
|
||||
else
|
||||
COMPILERFLAGS += -DOPJ_STATIC
|
||||
libopenjpeg_JPWL_la_LDFLAGS += -static
|
||||
if HAVE_DARWIN
|
||||
SO_PREFIX = (DY)
|
||||
dll =
|
||||
else
|
||||
SO_PREFIX = (SO)
|
||||
dll =
|
||||
endif
|
||||
|
||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
||||
LDADD = ./libopenjpeg_JPWL.la $(USERLIBS)
|
||||
|
||||
JPWL_j2k_to_image_SOURCES = ../common/getopt.c ../codec/index.c \
|
||||
../codec/convert.c ../common/color.c ../codec/j2k_to_image.c
|
||||
|
||||
JPWL_image_to_j2k_SOURCES = ../common/getopt.c ../codec/index.c \
|
||||
../codec/convert.c ../codec/image_to_j2k.c
|
||||
|
||||
REPBIN=$(bin_PROGRAMS)
|
||||
|
||||
all-local:
|
||||
@$(INSTALL) -d ../bin
|
||||
$(INSTALL) $(bin_PROGRAMS) ../bin
|
||||
@rm -rf .report_dir
|
||||
@$(INSTALL) -d .report_dir
|
||||
if build_so
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.so*" -exec cp -P {} .report_dir \;
|
||||
@find .libs -type l -name "*\.so*" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
if build_dll
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.dll" -exec cp -P {} .report_dir \;
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
if build_dylib
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.dylib" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type l -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
@cp -a .report_dir/* ../bin
|
||||
@echo "" > .report.txt
|
||||
@(for file in ${REPBIN} ; do \
|
||||
echo "Installing: ${prefix}/bin/$${file}" >> .report.txt ; \
|
||||
done)
|
||||
@echo "Installing: ${prefix}/lib/libopenjpeg_JPWL.la" >> .report.txt
|
||||
@(cd .report_dir; \
|
||||
for file in `ls *.dll 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/bin/$${file}" >> ../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.a 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.so* 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.dylib 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
||||
done \
|
||||
)
|
||||
@rm -rf .report_dir
|
||||
|
|
|
@ -1,98 +1,95 @@
|
|||
MAJOR = @MAJOR_NR@
|
||||
MINOR = @MINOR_NR@
|
||||
BUILD = @BUILD_NR@
|
||||
CURRENT=`expr $(MAJOR) + $(MINOR)`
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
includesdir = $(includedir)/openjpeg-$(MAJOR_NR).$(MINOR_NR)
|
||||
includes_HEADERS = openjpeg.h
|
||||
|
||||
lib_LTLIBRARIES = libopenjpeg.la
|
||||
|
||||
INCLUDES = -I.. -I.
|
||||
libopenjpeg_la_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
@LCMS1_CFLAGS@ \
|
||||
@LCMS2_CFLAGS@
|
||||
libopenjpeg_la_CFLAGS =
|
||||
libopenjpeg_la_LIBADD = @LCMS1_LIBS@ @LCMS2_LIBS@
|
||||
libopenjpeg_la_LDFLAGS = -no-undefined -version-info @lt_version@
|
||||
|
||||
libopenjpeg_la_LDFLAGS = -no-undefined \
|
||||
-version-info $(CURRENT):$(BUILD):$(MINOR)
|
||||
libopenjpeg_la_SOURCES = \
|
||||
bio.c \
|
||||
cio.c \
|
||||
dwt.c \
|
||||
event.c \
|
||||
image.c \
|
||||
j2k.c \
|
||||
j2k_lib.c \
|
||||
jp2.c \
|
||||
jpt.c \
|
||||
mct.c \
|
||||
mqc.c \
|
||||
openjpeg.c \
|
||||
pi.c \
|
||||
raw.c \
|
||||
t1.c \
|
||||
t2.c \
|
||||
tcd.c \
|
||||
tgt.c \
|
||||
bio.h \
|
||||
cio.h \
|
||||
dwt.h \
|
||||
event.h \
|
||||
fix.h \
|
||||
image.h \
|
||||
int.h \
|
||||
j2k.h \
|
||||
j2k_lib.h \
|
||||
jp2.h \
|
||||
jpt.h \
|
||||
mct.h \
|
||||
mqc.h \
|
||||
pi.h \
|
||||
raw.h \
|
||||
t1.h \
|
||||
t1_luts.h \
|
||||
t2.h \
|
||||
tcd.h \
|
||||
tgt.h \
|
||||
opj_malloc.h \
|
||||
opj_includes.h
|
||||
|
||||
SRCS = bio.c cio.c dwt.c event.c image.c j2k.c j2k_lib.c jp2.c jpt.c \
|
||||
mct.c mqc.c openjpeg.c pi.c raw.c t1.c t2.c tcd.c tgt.c
|
||||
|
||||
INCLS = bio.h cio.h dwt.h event.h fix.h image.h int.h j2k.h j2k_lib.h \
|
||||
jp2.h jpt.h mct.h mqc.h pi.h raw.h t1.h t2.h tcd.h tgt.h opj_malloc.h \
|
||||
opj_includes.h
|
||||
|
||||
libopenjpeg_la_SOURCES = $(SRCS) $(INCLS)
|
||||
|
||||
includedir = ${prefix}/include/openjpeg-$(MAJOR).$(MINOR)
|
||||
include_HEADERS = openjpeg.h
|
||||
|
||||
# Converts cr/lf to just lf
|
||||
DOS2UNIX = dos2unix
|
||||
|
||||
dos2unix:
|
||||
@$(DOS2UNIX) $(SRCS) $(INCLS)
|
||||
|
||||
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
|
||||
|
||||
if with_sharedlibs
|
||||
COMPILERFLAGS += -DOPJ_EXPORTS
|
||||
else
|
||||
COMPILERFLAGS += -DOPJ_STATIC
|
||||
libopenjpeg_la_LDFLAGS += -static
|
||||
endif
|
||||
|
||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
|
||||
|
||||
headerdir = openjpeg-$(MAJOR).$(MINOR)
|
||||
|
||||
all-local:
|
||||
@$(INSTALL) -d ../bin
|
||||
@rm -rf .report_dir
|
||||
@$(INSTALL) -d .report_dir
|
||||
if build_so
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.so*" -exec cp -P {} .report_dir \;
|
||||
@find .libs -type l -name "*\.so*" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
if build_dll
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.dll" -exec cp -P {} .report_dir \;
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type f -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
if build_dylib
|
||||
if with_sharedlibs
|
||||
@find .libs -type f -name "*\.dylib" -exec cp -P {} .report_dir \;
|
||||
else !with_sharedlibs
|
||||
@find .libs -type l -name "*\.a" -exec cp -P {} .report_dir \;
|
||||
endif !with_sharedlibs
|
||||
endif
|
||||
@cp -a .report_dir/* ../bin
|
||||
@echo "" > .report.txt
|
||||
@echo "Installing: ${prefix}/include/${headerdir}/" >> .report.txt
|
||||
@echo "Installing: ${prefix}/include/${headerdir}/openjpeg.h" >> .report.txt
|
||||
@echo "Installing: ${prefix}/lib/libopenjpeg.la" >> .report.txt
|
||||
@(cd .report_dir; \
|
||||
for file in `ls *.dll 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/bin/$${file}" >> ../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.a 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.so* 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
||||
done ; \
|
||||
for file in `ls *.dylib 2> /dev/null` ; do \
|
||||
echo "Installing: ${prefix}/lib/$${file}" >> ../.report.txt ; \
|
||||
done \
|
||||
)
|
||||
@rm -rf .report_dir
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt
|
||||
|
||||
install-data-hook:
|
||||
(cd $(DESTDIR)${prefix}/include && rm -f openjpeg.h)
|
||||
(cd $(DESTDIR)${prefix}/include && \
|
||||
$(LN_S) ${headerdir}/openjpeg.h openjpeg.h)
|
||||
|
||||
cd $(DESTDIR)$(includedir) && \
|
||||
rm -f openjpeg.h && \
|
||||
$(LN_S) openjpeg-$(MAJOR_NR).$(MINOR_NR)/openjpeg.h \
|
||||
openjpeg.h
|
||||
@rm -rf $(top_builddir)/report.txt
|
||||
@echo -e " (LA)\t$(libdir)/libopenjpeg.la" >> $(top_builddir)/report.txt
|
||||
@( $(call solist) ) >> $(top_builddir)/report.txt
|
||||
@echo -e " (A)\t\t$(base)/$(a)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (H)\t\t$(includedir)/openjpeg-$(MAJOR_NR).$(MINOR_NR)/openjpeg.h" >> $(top_builddir)/report.txt
|
||||
@echo -e " (LN)\t$(includedir)/openjpeg.h" >> $(top_builddir)/report.txt
|
||||
|
||||
uninstall-hook:
|
||||
(cd $(DESTDIR)${prefix}/include && rm -rf openjpeg.h ${headerdir})
|
||||
rm -f $(DESTDIR)$(includedir)/openjpeg.h
|
||||
|
||||
solist = $(foreach f, $(dll) $(so), echo -e ' $(SO_PREFIX)\t$(base)/$(f)' ;)
|
||||
get_tok = $(shell grep -E "^$(1)=" $(lib_LTLIBRARIES) | cut -d "'" -f 2)
|
||||
base = $(call get_tok,libdir)
|
||||
so = $(call get_tok,library_names)
|
||||
a = $(call get_tok,old_library)
|
||||
|
||||
if HAVE_WIN32
|
||||
SO_PREFIX = (DLL)
|
||||
dll = $(call get_tok,dlname)
|
||||
else
|
||||
if HAVE_DARWIN
|
||||
SO_PREFIX = (DY)
|
||||
dll =
|
||||
else
|
||||
SO_PREFIX = (SO)
|
||||
dll =
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -7,5 +7,6 @@ Name: openjpeg
|
|||
Description: JPEG2000 files library
|
||||
URL: http://www.openjpeg.org/
|
||||
Version: @VERSION@
|
||||
pkgconfig_requires_private: @requirements@
|
||||
Libs: -L${libdir} -lopenjpeg
|
||||
Cflags: -I${includedir}
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr>
|
||||
dnl That code is public domain and can be freely used or copied.
|
||||
|
||||
dnl Macro that check if a library is in a specified directory.
|
||||
|
||||
dnl Usage: OPJ_CHECK_LIB(prefix, header, lib, func [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl Call AC_SUBST(THELIB_CFLAGS)
|
||||
dnl Call AC_SUBST(THELIB_LIBS)
|
||||
dnl where THELIB is the uppercase value of 'lib'
|
||||
|
||||
AC_DEFUN([OPJ_CHECK_LIB],
|
||||
[
|
||||
|
||||
m4_pushdef([UP], m4_toupper([$3]))
|
||||
m4_pushdef([DOWN], m4_tolower([$3]))
|
||||
|
||||
__opj_prefix=$1
|
||||
__opj_header=$2
|
||||
__opj_lib=$3
|
||||
__opj_func=$4
|
||||
__opj_have_dep="no"
|
||||
|
||||
save_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS="${CPPFLAGS} -I${__opj_prefix}/include"
|
||||
AC_CHECK_HEADER([${__opj_header}], [__opj_have_dep="yes"], [__opj_have_dep="no"])
|
||||
CPPFLAGS=${save_CPPFLAGS}
|
||||
|
||||
if test "x${__opj_have_dep}" = "xyes" ; then
|
||||
save_LDFLAGS=${LDFLAGS}
|
||||
LDFLAGS="${LDFLAGS} -L${__opj_prefix}/lib"
|
||||
AC_CHECK_LIB([${__opj_lib}],
|
||||
[${__opj_func}],
|
||||
[__opj_have_dep="yes"],
|
||||
[__opj_have_dep="no"])
|
||||
LDFLAGS=${save_LDFLAGS}
|
||||
fi
|
||||
|
||||
if test "x${__opj_have_dep}" = "xyes" ; then
|
||||
if ! test "x$1" = "x/usr" ; then
|
||||
UP[]_CFLAGS="-I${__opj_prefix}/include"
|
||||
UP[]_LIBS="-L${__opj_prefix}/lib"
|
||||
fi
|
||||
UP[]_LIBS="${UP[]_LIBS} -l${__opj_lib}"
|
||||
fi
|
||||
|
||||
AC_ARG_VAR(UP[_CFLAGS], [preprocessor flags for lib$3])
|
||||
AC_SUBST(UP[_CFLAGS])
|
||||
AC_ARG_VAR(UP[_LIBS], [linker flags for lib$3])
|
||||
AC_SUBST(UP[_LIBS])
|
||||
|
||||
AS_IF([test "x${__opj_have_dep}" = "xyes"], [$5], [$6])
|
||||
|
||||
m4_popdef([UP])
|
||||
m4_popdef([DOWN])
|
||||
|
||||
])
|
|
@ -0,0 +1,30 @@
|
|||
dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
|
||||
dnl and Albin Tonnerre <albin dot tonnerre at gmail dot com>
|
||||
dnl That code is public domain and can be freely used or copied.
|
||||
|
||||
dnl Macro that checks if a compiler flag is supported by the compiler.
|
||||
|
||||
dnl Usage: OPJ_COMPILER_FLAG(flag)
|
||||
dnl flag is added to CFLAGS if supported.
|
||||
|
||||
AC_DEFUN([OPJ_COMPILER_FLAG],
|
||||
[
|
||||
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} $1"
|
||||
|
||||
AC_LANG_PUSH([C])
|
||||
AC_MSG_CHECKING([whether the compiler supports $1])
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[have_flag="yes"],
|
||||
[have_flag="no"])
|
||||
AC_MSG_RESULT([${have_flag}])
|
||||
|
||||
if test "x${have_flag}" = "xno" ; then
|
||||
CFLAGS="${CFLAGS_save}"
|
||||
fi
|
||||
AC_LANG_POP([C])
|
||||
|
||||
])
|
|
@ -0,0 +1,94 @@
|
|||
dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
|
||||
dnl That code is public domain and can be freely used or copied.
|
||||
|
||||
dnl Macro that check if doxygen is available or not.
|
||||
|
||||
dnl OPJ_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl Test for the doxygen program
|
||||
dnl Defines opj_doxygen
|
||||
dnl Defines the automake conditionnal OPJ_BUILD_DOC
|
||||
dnl
|
||||
AC_DEFUN([OPJ_CHECK_DOXYGEN],
|
||||
[
|
||||
|
||||
dnl
|
||||
dnl Disable the build of the documentation
|
||||
dnl
|
||||
AC_ARG_ENABLE([doc],
|
||||
[AC_HELP_STRING(
|
||||
[--disable-doc],
|
||||
[Disable documentation build @<:@default=enabled@:>@])],
|
||||
[
|
||||
if test "x${enableval}" = "xyes" ; then
|
||||
opj_enable_doc="yes"
|
||||
else
|
||||
opj_enable_doc="no"
|
||||
fi
|
||||
],
|
||||
[opj_enable_doc="yes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build documentation])
|
||||
AC_MSG_RESULT([${opj_enable_doc}])
|
||||
|
||||
if test "x${opj_enable_doc}" = "xyes" ; then
|
||||
|
||||
dnl Specify the file name, without path
|
||||
|
||||
opj_doxygen="doxygen"
|
||||
|
||||
AC_ARG_WITH([doxygen],
|
||||
[AC_HELP_STRING(
|
||||
[--with-doxygen=FILE],
|
||||
[doxygen program to use @<:@default=doxygen@:>@])],
|
||||
|
||||
dnl Check the given doxygen program.
|
||||
|
||||
[opj_doxygen=${withval}
|
||||
AC_CHECK_PROG([opj_have_doxygen],
|
||||
[${opj_doxygen}],
|
||||
[yes],
|
||||
[no])
|
||||
if test "x${opj_have_doxygen}" = "xno" ; then
|
||||
echo "WARNING:"
|
||||
echo "The doxygen program you specified:"
|
||||
echo "${opj_doxygen}"
|
||||
echo "was not found. Please check the path and make sure "
|
||||
echo "the program exists and is executable."
|
||||
AC_MSG_WARN([no doxygen detected. Documentation will not be built])
|
||||
fi
|
||||
],
|
||||
[AC_CHECK_PROG([opj_have_doxygen],
|
||||
[${opj_doxygen}],
|
||||
[yes],
|
||||
[no])
|
||||
if test "x${opj_have_doxygen}" = "xno" ; then
|
||||
echo "WARNING:"
|
||||
echo "The doxygen program was not found in your execute path."
|
||||
echo "You may have doxygen installed somewhere not covered by your path."
|
||||
echo ""
|
||||
echo "If this is the case make sure you have the packages installed, AND"
|
||||
echo "that the doxygen program is in your execute path (see your"
|
||||
echo "shell manual page on setting the \$PATH environment variable), OR"
|
||||
echo "alternatively, specify the program to use with --with-doxygen."
|
||||
AC_MSG_WARN([no doxygen detected. Documentation will not be built])
|
||||
fi
|
||||
])
|
||||
else
|
||||
opj_have_doxygen="no"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Substitution
|
||||
dnl
|
||||
AC_SUBST([opj_doxygen])
|
||||
|
||||
if ! test "x${opj_have_doxygen}" = "xyes" ; then
|
||||
opj_enable_doc="no"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(OPJ_BUILD_DOC, test "x${opj_have_doxygen}" = "xyes")
|
||||
|
||||
AS_IF([test "x${opj_have_doxygen}" = "xyes"], [$1], [$2])
|
||||
])
|
||||
|
||||
dnl End of opj_doxygen.m4
|
|
@ -0,0 +1,157 @@
|
|||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 1 (pkg-config-0.24)
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 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.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
# only at the first occurence in configure.ac, so if the first place
|
||||
# it's called might be skipped (such as if it is within an "if", you
|
||||
# have to call PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT])dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
142
mj2/Makefile.am
142
mj2/Makefile.am
|
@ -1,45 +1,113 @@
|
|||
COMPILERFLAGS = -Wall
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
if with_sharedlibs
|
||||
COMPILERFLAGS += -DOPJ_EXPORTS
|
||||
else
|
||||
COMPILERFLAGS += -DOPJ_STATIC
|
||||
endif
|
||||
OPJ_SRC = \
|
||||
../libopenjpeg/bio.c \
|
||||
../libopenjpeg/cio.c \
|
||||
../libopenjpeg/dwt.c \
|
||||
../libopenjpeg/event.c \
|
||||
../libopenjpeg/image.c \
|
||||
../libopenjpeg/j2k.c \
|
||||
../libopenjpeg/j2k_lib.c \
|
||||
../libopenjpeg/jp2.c \
|
||||
../libopenjpeg/jpt.c \
|
||||
../libopenjpeg/mct.c \
|
||||
../libopenjpeg/mqc.c \
|
||||
../libopenjpeg/openjpeg.c \
|
||||
../libopenjpeg/pi.c \
|
||||
../libopenjpeg/raw.c \
|
||||
../libopenjpeg/t1.c \
|
||||
../libopenjpeg/t2.c \
|
||||
../libopenjpeg/tcd.c \
|
||||
../libopenjpeg/tgt.c
|
||||
|
||||
USERLIBS =
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common
|
||||
bin_PROGRAMS = \
|
||||
frames_to_mj2 \
|
||||
mj2_to_frames \
|
||||
extract_j2k_from_mj2 \
|
||||
wrap_j2k_in_mj2
|
||||
|
||||
if with_liblcms2
|
||||
INCLUDES += @lcms2includes@
|
||||
USERLIBS += @lcms2libs@
|
||||
endif
|
||||
frames_to_mj2_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
-I$(top_srcdir)/mj2 \
|
||||
-I$(top_builddir)/mj2 \
|
||||
-DOPJ_STATIC
|
||||
frames_to_mj2_CFLAGS =
|
||||
frames_to_mj2_LDADD = -lm
|
||||
frames_to_mj2_SOURCES = \
|
||||
$(OPJ_SRC) \
|
||||
../common/getopt.c \
|
||||
mj2_convert.c \
|
||||
mj2.c \
|
||||
frames_to_mj2.c \
|
||||
mj2.h \
|
||||
mj2_convert.h
|
||||
|
||||
if with_liblcms1
|
||||
INCLUDES += @lcms1includes@
|
||||
USERLIBS += @lcms1libs@
|
||||
endif
|
||||
mj2_to_frames_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
-I$(top_srcdir)/mj2 \
|
||||
-I$(top_builddir)/mj2 \
|
||||
@LCMS2_CFLAGS@ \
|
||||
@LCMS1_CFLAGS@ \
|
||||
-DOPJ_STATIC
|
||||
mj2_to_frames_CFLAGS =
|
||||
mj2_to_frames_LDADD = @LCMS2_LIBS@ @LCMS1_LIBS@
|
||||
mj2_to_frames_SOURCES = \
|
||||
$(OPJ_SRC) \
|
||||
../common/color.c \
|
||||
../common/getopt.c \
|
||||
mj2_convert.c \
|
||||
mj2.c \
|
||||
mj2_to_frames.c \
|
||||
mj2.h \
|
||||
mj2_convert.h
|
||||
|
||||
bin_PROGRAMS = frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
|
||||
extract_j2k_from_mj2_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
-I$(top_srcdir)/mj2 \
|
||||
-I$(top_builddir)/mj2 \
|
||||
-DOPJ_STATIC
|
||||
extract_j2k_from_mj2_CFLAGS =
|
||||
extract_j2k_from_mj2_LDADD = -lm
|
||||
extract_j2k_from_mj2_SOURCES = \
|
||||
$(OPJ_SRC) \
|
||||
mj2.c \
|
||||
extract_j2k_from_mj2.c \
|
||||
mj2.h
|
||||
|
||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
|
||||
LDADD = ../libopenjpeg/libopenjpeg.la $(USERLIBS)
|
||||
wrap_j2k_in_mj2_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_builddir)/common \
|
||||
-I$(top_srcdir)/libopenjpeg \
|
||||
-I$(top_builddir)/libopenjpeg \
|
||||
-I$(top_srcdir)/mj2 \
|
||||
-I$(top_builddir)/mj2 \
|
||||
-DOPJ_STATIC
|
||||
wrap_j2k_in_mj2_CFLAGS =
|
||||
wrap_j2k_in_mj2_LDADD = -lm
|
||||
wrap_j2k_in_mj2_SOURCES = \
|
||||
$(OPJ_SRC) \
|
||||
mj2.c \
|
||||
wrap_j2k_in_mj2.c \
|
||||
mj2.h
|
||||
|
||||
frames_to_mj2_SOURCES = ../common/getopt.c mj2_convert.c mj2.c \
|
||||
frames_to_mj2.c
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt
|
||||
|
||||
mj2_to_frames_SOURCES = ../common/getopt.c mj2_convert.c mj2.c \
|
||||
../common/color.c mj2_to_frames.c
|
||||
|
||||
extract_j2k_from_mj2_SOURCES = mj2.c extract_j2k_from_mj2.c
|
||||
|
||||
wrap_j2k_in_mj2_SOURCES = mj2.c wrap_j2k_in_mj2.c
|
||||
|
||||
REPBIN=$(bin_PROGRAMS)
|
||||
|
||||
all-local:
|
||||
$(INSTALL) -d ../bin
|
||||
$(INSTALL) $(bin_PROGRAMS) ../bin
|
||||
@echo "" > .report.txt
|
||||
@(for file in ${REPBIN} ; do \
|
||||
echo "Installing: ${prefix}/bin/$${file}" >> .report.txt ; \
|
||||
done)
|
||||
install-data-hook:
|
||||
@echo -e " (B)\t\t$(bindir)/frames_to_mj2$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (B)\t\t$(bindir)/mj2_to_frames$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (B)\t\t$(bindir)/extract_j2k_from_mj2$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
@echo -e " (B)\t\t$(bindir)/wrap_j2k_in_mj2$(EXEEXT)" >> $(top_builddir)/report.txt
|
||||
|
|
Loading…
Reference in New Issue