updated autotools files to improve build and install procedures (credit to Vincent Torri)

This commit is contained in:
Antonin Descampe 2011-03-04 10:53:27 +00:00
parent 89456eed51
commit 86edc0a40e
18 changed files with 1537 additions and 1015 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed ! : changed
+ : added + : added
March 4, 2011
! [antonin] updated autotools files to improve build and install procedures (credit to Vincent Torri).
February 17, 2011 February 17, 2011
* [antonin] replaced 'long' by 'size_t' in dwt.c to be sure to cast to a pointer size. * [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. * [antonin] now allows 16-bit precision for mj2 encoding and decoding (solves Issue 49 and Issue 63). Credit to Winfried.

59
INSTALL
View File

@ -7,34 +7,39 @@ UNIX/LINUX similar systems
1) Using configure tools 1) Using configure tools
You can simply type To build from top-level directory, you can simply type:
./configure [--prefix=/path] ./bootstrap.sh
./configure
make make
If you are root: To keep all build files in a separate directory, you can type instead:
make install ./bootstrap.sh
make clean mkdir build
make distclean cd build
../configure
make
else: To install:
sudo make install sudo make install
To clean:
make clean make clean
make distclean 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 Main './configure' options (type './configure --help' for more details)
call './bootstrap.sh'. '--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, You can also specify your own CFLAGS and LDFLAGS with (for example):
or to see available configure options, please try CFLAGS="-O3 -pipe" LDFLAGS="-Wl,-s" ./configure
'./configure --help'.
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) 2) Using cmake (see www.cmake.org)
@ -84,22 +89,16 @@ Main available cmake flags:
MACOSX MACOSX
------ ------
The same building procedures as above will soon be available for MACOSX. The same building procedures as above (autotools and cmake) work for MACOSX.
The xcode project file has also to be updated. The xcode project file can also be used.
Right now, the CMake procedure is the only one working. Please refer to instructions above.
If it does not work, try adding the following flag to the cmake command : If it does not work, try adding the following flag to the cmake command :
'-DCMAKE_OSX_ARCHITECTURES:STRING=i386' '-DCMAKE_OSX_ARCHITECTURES:STRING=i386'
WINDOWS 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 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.
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.

View File

@ -1,28 +1,88 @@
#OpenJPEG top source directory DISTCHECK_CONFIGURE_FLAGS = --enable-jp3d=yes --enable-jpwl=yes --enable-mj2=yes
SUBDIRS = libopenjpeg codec mj2 @jpwl_dir@ @jp3d_dir@ doc
clean-local: ACLOCAL_AMFLAGS = -I m4
@rm -rf bin
@list='$(SUBDIRS)'; for dir in $${list} ; do \
rm -f $${dir}/.report.txt ; \
done
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: install-data-hook:
@echo "" $(LN_S) -nf libopenjpeg1.pc $(DESTDIR)$(pkgconfigdir)/libopenjpeg.pc
@list='$(SUBDIRS)'; for dir in $${list} ; do \ @echo -e " (PC)\t$(pkgconfigdir)/libopenjpeg1.pc" >> $(top_builddir)/report.txt
cat $${dir}/.report.txt ; \ @echo -e " (LN)\t$(pkgconfigdir)/libopenjpeg.pc" >> $(top_builddir)/report.txt
done @cat $(top_builddir)/report.txt
@echo "" @rm $(top_builddir)/report.txt
@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)
uninstall-hook: uninstall-hook:
@(cd $(DESTDIR)$(pkgconf_dir) && $(RM) libopenjpeg.pc libopenjpeg1.pc) rm -f $(DESTDIR)$(pkgconfigdir)/libopenjpeg.pc

View File

@ -1,52 +1,72 @@
COMPILERFLAGS = -Wall MAINTAINERCLEANFILES = Makefile.in
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
bin_PROGRAMS = j2k_to_image image_to_j2k j2k_dump bin_PROGRAMS = j2k_to_image image_to_j2k j2k_dump
CFLAGS = $(COMPILERFLAGS) $(INCLUDES) j2k_to_image_CPPFLAGS = \
LDADD = $(USERLIBS) ../libopenjpeg/libopenjpeg.la -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 \ image_to_j2k_CPPFLAGS = \
../common/color.c j2k_to_image.c -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) install-data-hook:
@echo -e " (B)\t\t$(bindir)/j2k_to_image$(EXEEXT)" >> $(top_builddir)/report.txt
all-local: @echo -e " (B)\t\t$(bindir)/image_to_j2k$(EXEEXT)" >> $(top_builddir)/report.txt
$(INSTALL) -d ../bin @echo -e " (B)\t\t$(bindir)/j2k_dump$(EXEEXT)" >> $(top_builddir)/report.txt
$(INSTALL) $(bin_PROGRAMS) ../bin
@echo "" > .report.txt
@for file in ${REPBIN} ; do \
echo "Installing: ${prefix}/bin/$${file}" >> .report.txt ; \
done

View File

@ -1,482 +1,472 @@
#AC_PREREQ([2.65])
define([OPJ_MAJOR], [1]) m4_define([OPJ_MAJOR], [1])
define([OPJ_MINOR], [4]) m4_define([OPJ_MINOR], [4])
define([OPJ_BUILD], [0]) m4_define([OPJ_MICRO], [0])
#
define([JP3D_MAJOR], [1]) m4_define([JP3D_MAJOR], [1])
define([JP3D_MINOR], [3]) m4_define([JP3D_MINOR], [3])
define([JP3D_BUILD], [0]) m4_define([JP3D_MICRO], [0])
#
# m4_define([lt_rev], m4_eval(OPJ_MAJOR + OPJ_MINOR))
#AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL]) m4_define([lt_cur], OPJ_MICRO)
AC_INIT(OpenJPEG, m4_define([lt_age], OPJ_MINOR)
OPJ_MAJOR.OPJ_MINOR.OPJ_BUILD,
http://code.google.com/p/openjpeg/, AC_PREREQ([2.62])
openjpeg-OPJ_MAJOR.OPJ_MINOR.OPJ_BUILD, AC_INIT([OpenJPEG],
http://www.openjpeg.org/) [OPJ_MAJOR.OPJ_MINOR.OPJ_MICRO],
AC_CONFIG_SRCDIR([libopenjpeg/openjpeg.c]) [openjpeg@googlegroups.com],
AC_CONFIG_HEADERS(opj_config.h) [openjpeg],
# [http://www.openjpeg.org])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([opj_config.h])
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
#foreign:package will not follow the GNU Standards AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(foreign)
# AM_INIT_AUTOMAKE(1.11 foreign dist-bzip2)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
MAJOR_NR=OPJ_MAJOR MAJOR_NR=OPJ_MAJOR
MINOR_NR=OPJ_MINOR MINOR_NR=OPJ_MINOR
BUILD_NR=OPJ_BUILD MICRO_NR=OPJ_MICRO
AC_SUBST(MAJOR_NR) AC_SUBST(MAJOR_NR)
AC_SUBST(MINOR_NR) AC_SUBST(MINOR_NR)
AC_SUBST(BUILD_NR) AC_SUBST(MICRO_NR)
#
JP3D_MAJOR_NR=JP3D_MAJOR JP3D_MAJOR_NR=JP3D_MAJOR
JP3D_MINOR_NR=JP3D_MINOR JP3D_MINOR_NR=JP3D_MINOR
JP3D_BUILD_NR=JP3D_BUILD JP3D_MICRO_NR=JP3D_MICRO
AC_SUBST(JP3D_MAJOR_NR) AC_SUBST(JP3D_MAJOR_NR)
AC_SUBST(JP3D_MINOR_NR) AC_SUBST(JP3D_MINOR_NR)
AC_SUBST(JP3D_BUILD_NR) AC_SUBST(JP3D_MICRO_NR)
#
# Checks for programs. LT_PREREQ([2.0])
AC_PROG_CC LT_INIT([win32-dll])
AC_PROG_CXX
AC_PROG_INSTALL lt_version=lt_rev:lt_cur:lt_age
AC_PROG_LN_S AC_SUBST(lt_version)
AC_PROG_SED
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO ### Needed information
AC_PROG_MAKE_SET
#AC_HEADER_DIRENT have_win32=no
# have_darwin="no"
# Tests for Windows case "$host_os" in
# mingw*)
AC_EXEEXT have_win32="yes"
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*) darwin*)
build_dll="yes" have_darwin="yes"
;;
*darwin*)
build_dylib="yes"
;;
*)
build_so="yes"
;; ;;
esac 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])
#
# ------------------------------- AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
# Test for creating JP3D AM_CONDITIONAL([HAVE_DARWIN], [test "x${have_darwin}" = "xyes"])
# -------------------------------
with_jp3d="no"
jp3d_dir="" ### Additional options to configure
AC_MSG_CHECKING(whether to build the JP3D library)
AC_ARG_ENABLE(jp3d, # debug
[ --enable-jp3d[=[yes|no]] Build jp3d libs [ [default=no] ]],
test "$enable_jp3d" = "yes" && with_jp3d="yes") AC_ARG_ENABLE([debug],
# [AC_HELP_STRING([--enable-debug], [build with debug symbols @<:@default=disabled@:>@])],
AC_MSG_RESULT($with_jp3d) [
if test "$with_jp3d" = "yes" ; then if test "x${enableval}" = "xyes" ; then
jp3d_dir="jp3d" 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 fi
AC_SUBST(jp3d_dir)
# AM_CONDITIONAL([WANT_MJ2], [test "x${want_mj2}" = "xyes"])
AC_CHECK_PROG(with_doxygen, doxygen, [yes],[no],,)
AM_CONDITIONAL([with_doxygen], [test x$with_doxygen = xyes]) # JPWL
#
AC_CONFIG_FILES([Makefile]) AC_ARG_ENABLE([jpwl],
AC_CONFIG_FILES([libopenjpeg1.pc]) [AC_HELP_STRING([--enable-jpwl], [build JPWL library @<:@default=disabled@:>@])],
AC_CONFIG_FILES([libopenjpeg/Makefile]) [
AC_CONFIG_FILES([jpwl/Makefile]) if test "x${enableval}" = "xyes" ; then
AC_CONFIG_FILES([codec/Makefile]) want_jpwl="yes"
AC_CONFIG_FILES([mj2/Makefile]) else
AC_CONFIG_FILES([doc/Makefile]) want_jpwl="no"
AC_CONFIG_FILES([jp3d/Makefile]) fi
AC_CONFIG_FILES([jp3d/libjp3dvm/Makefile]) ],
AC_CONFIG_FILES([jp3d/codec/Makefile]) [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 AC_OUTPUT
#
echo "----------------------------------------------" ### Summary
echo " your configuration"
echo "" echo
echo "--with-png-libraries: $with_libpng" echo
echo "libpng header : $png_header_found" echo
echo "--enable-tiff : $with_libtiff" echo "------------------------------------------------------------------------"
echo "libtiff header : $tiff_header_found" echo "$PACKAGE $VERSION"
echo "--enable-lcms2 : $with_liblcms2" echo "------------------------------------------------------------------------"
echo "lcms2 header : $lcms2_header_found" echo
echo "lcms2 version : $have_lcms2_version" echo
echo "--enable-lcms1 : $with_liblcms1" echo "Configuration Options Summary:"
echo "lcms1 header : $lcms1_header_found" echo
echo "lcms1 version : $have_lcms1_version" echo " Debug...............: ${want_debug}"
echo "--enable-jpwl : $with_libjpwl" echo
echo "--enable-jp3d : $with_jp3d" echo " Optional support:"
echo "--enable-shared : $with_sharedlibs" echo " libpng............: ${have_libpng}"
echo "----------------------------------------------" 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

View File

@ -1,14 +1,16 @@
# Doxyfile 1.4.2 # Doxyfile 1.7.3
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Project related configuration options # Project related configuration options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = OpenJPEG PROJECT_NAME = OpenJPEG
PROJECT_NUMBER = PROJECT_NUMBER =
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = . OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES
BRIEF_MEMBER_DESC = YES BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \ ABBREVIATE_BRIEF = "The $name class" \
@ -29,16 +31,25 @@ STRIP_FROM_PATH = C://
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
SHORT_NAMES = NO SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = YES
INHERIT_DOCS = YES INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
SEPARATE_MEMBER_PAGES = NO SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8 TAB_SIZE = 8
ALIASES = ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO 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 SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Build related configuration options # Build related configuration options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -47,6 +58,7 @@ EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO HIDE_FRIEND_COMPOUNDS = NO
@ -55,10 +67,14 @@ INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES SHOW_INCLUDE_FILES = YES
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES INLINE_INFO = YES
SORT_MEMBER_DOCS = YES SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES GENERATE_BUGLIST = YES
@ -67,7 +83,10 @@ ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30 MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO SHOW_DIRECTORIES = NO
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER = FILE_VERSION_FILTER =
LAYOUT_FILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to warning and progress messages # configuration options related to warning and progress messages
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -83,12 +102,14 @@ WARN_LOGFILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
INPUT = ../libopenjpeg \ INPUT = ../libopenjpeg \
../jpwl ../jpwl
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.h \ FILE_PATTERNS = *.h \
*.c *.c
RECURSIVE = NO RECURSIVE = NO
EXCLUDE = EXCLUDE =
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH = EXAMPLE_PATH =
EXAMPLE_PATTERNS = * EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO EXAMPLE_RECURSIVE = NO
@ -96,6 +117,7 @@ IMAGE_PATH =
INPUT_FILTER = INPUT_FILTER =
FILTER_PATTERNS = FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to source browsing # configuration options related to source browsing
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -104,6 +126,8 @@ INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES VERBATIM_HEADERS = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the alphabetical class index # configuration options related to the alphabetical class index
@ -120,17 +144,46 @@ HTML_FILE_EXTENSION = .html
HTML_HEADER = HTML_HEADER =
HTML_FOOTER = HTML_FOOTER =
HTML_STYLESHEET = HTML_STYLESHEET =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = YES
HTML_ALIGN_MEMBERS = 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 GENERATE_HTMLHELP = NO
CHM_FILE = CHM_FILE =
HHC_LOCATION = HHC_LOCATION =
GENERATE_CHI = NO GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO BINARY_TOC = NO
TOC_EXPAND = 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 DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4 ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO GENERATE_TREEVIEW = NO
USE_INLINE_TREES = NO
TREEVIEW_WIDTH = 250 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 # configuration options related to the LaTeX output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -146,6 +199,7 @@ PDF_HYPERLINKS = NO
USE_PDFLATEX = NO USE_PDFLATEX = NO
LATEX_BATCHMODE = NO LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO LATEX_HIDE_INDICES = NO
LATEX_SOURCE_CODE = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the RTF output # configuration options related to the RTF output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -206,8 +260,13 @@ PERL_PATH = /usr/bin/perl
# Configuration options related to the dot tool # Configuration options related to the dot tool
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES CLASS_DIAGRAMS = YES
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO HAVE_DOT = NO
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES GROUP_GRAPHS = YES
@ -216,19 +275,16 @@ TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png DOT_IMAGE_FORMAT = png
DOT_PATH = DOT_PATH =
DOTFILE_DIRS = DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024 MSCFILE_DIRS =
MAX_DOT_GRAPH_HEIGHT = 1024 DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 1000 MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES GENERATE_LEGEND = YES
DOT_CLEANUP = YES DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

View File

@ -1,49 +1,72 @@
MAJOR = @MAJOR_NR@
MINOR = @MINOR_NR@
BUILD = @BUILD_NR@
if with_doxygen MAINTAINERCLEANFILES = Makefile.in
docs:
doxygen Doxyfile.dox .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 endif
doc_dir = $(datarootdir)/doc/openjpeg-$(MAJOR).$(MINOR) docsdir = $(docdir)-$(MAJOR_NR).$(MINOR_NR)
docs_DATA = $(top_builddir)/LICENSE $(top_builddir)/CHANGES
all-local: dist_man1_MANS = \
@echo "" > .report.txt man/man1/image_to_j2k.1 \
@echo "Installing: image_to_j2k.1 ${mandir}/man1" >> .report.txt man/man1/j2k_dump.1 \
@echo "Installing: j2k_to_image.1 ${mandir}/man1" >> .report.txt man/man1/j2k_to_image.1
@echo "Installing: j2k_dump.1 ${mandir}/man1" >> .report.txt
@echo "Installing: libopenjpeg.3 ${mandir}/man3" >> .report.txt dist_man3_MANS = \
@echo "Installing: LICENSE CHANGES $(doc_dir)" >> .report.txt man/man3/libopenjpeg.3
@cp man/man1/* .
@cp man/man3/* .
install-data-hook: install-data-hook:
$(INSTALL) -d $(DESTDIR)$(doc_dir) cd $(DESTDIR)$(man1dir) && \
$(INSTALL) -d $(DESTDIR)${mandir}/man1 $(DESTDIR)${mandir}/man3 rm -f jpwl_image_to_j2k.1 && \
if with_libjpwl $(LN_S) image_to_j2k.1 jpwl_image_to_j2k.1
@(cd $(DESTDIR)${mandir}/man1 && $(RM) JPWL_image_to_j2k* JPWL_j2k_to_image*) cd $(DESTDIR)$(man1dir) && \
@(cd $(DESTDIR)${mandir}/man3 && $(RM) JPWL_libopenjpeg* ) rm -f jpwl_j2k_to_image.1 && \
endif $(LN_S) j2k_to_image.1 jpwl_j2k_to_image.1
@(cd $(DESTDIR)${mandir}/man1 && $(RM) image_to_j2k* j2k_to_image* j2k_dump* ) cd $(DESTDIR)$(man3dir) && \
@(cd $(DESTDIR)${mandir}/man3 && $(RM) libopenjpeg* ) rm -f jpwl_libopenjpeg.3 && \
@gzip -f image_to_j2k.1 j2k_to_image.1 j2k_dump.1 libopenjpeg.3 $(LN_S) libopenjpeg.3 jpwl_libopenjpeg.3
@cp image_to_j2k.1.gz j2k_to_image.1.gz j2k_dump.1.gz $(DESTDIR)${mandir}/man1 @echo -e " (MAN)\t$(man1dir)/image_to_j2k.1" >> $(top_builddir)/report.txt
@cp libopenjpeg.3.gz $(DESTDIR)${mandir}/man3 @echo -e " (LN)\t$(man1dir)/jpwl_image_to_j2k.1" >> $(top_builddir)/report.txt
@$(RM) *\.gz @echo -e " (MAN)\t$(man1dir)/j2k_dump.1" >> $(top_builddir)/report.txt
if with_libjpwl @echo -e " (MAN)\t$(man1dir)/j2k_to_image.1" >> $(top_builddir)/report.txt
@(cd $(DESTDIR)${mandir}/man1 && \ @echo -e " (LN)\t$(man1dir)//jpwl_j2k_to_image.1" >> $(top_builddir)/report.txt
$(LN_S) image_to_j2k.1.gz JPWL_image_to_j2k.1.gz && \ @echo -e " (MAN)\t$(man3dir)/libopenjpeg.3" >> $(top_builddir)/report.txt
$(LN_S) j2k_to_image.1.gz JPWL_j2k_to_image.1.gz) @echo -e " (LN)\t$(man3dir)/jpwl_libopenjpeg.3" >> $(top_builddir)/report.txt
@(cd ${mandir}/man3 && $(LN_S) libopenjpeg.3.gz JPWL_libopenjpeg.3.gz)
endif
@$(INSTALL) -m 644 ../LICENSE ../CHANGES $(DESTDIR)$(doc_dir)
uninstall-hook: uninstall-hook:
@(cd $(DESTDIR)${mandir}/man1 && $(RM) JPWL_image_to_j2k* JPWL_j2k_to_image* && \ rm -f $(DESTDIR)$(man1dir)/jpwl_image_to_j2k.1
$(RM) image_to_j2k* j2k_to_image* j2k_dump* ) rm -f $(DESTDIR)$(man1dir)/jpwl_j2k_to_image.1
@(cd $(DESTDIR)${mandir}/man3 && $(RM) JPWL_libopenjpeg* && \ rm -f $(DESTDIR)$(man3dir)/jpwl_libopenjpeg.3
$(RM) libopenjpeg* )
@(cd $(DESTDIR)$(doc_dir) && $(RM) * ) EXTRA_DIST = \
@rmdir $(DESTDIR)$(doc_dir) CMakeLists.txt \
Doxyfile.dox

View File

@ -1 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = libjp3dvm codec SUBDIRS = libjp3dvm codec
EXTRA_DIST = \
CMakeLists.txt

View File

@ -1,27 +1,23 @@
#jp3d/codec/
USERLIBS = MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I. -I../libjp3dvm
CFLAGS = -Wall $(INCLUDES)
if with_sharedlibs
CFLAGS += -DOPJ_EXPORTS
else
CFLAGS += -DOPJ_STATIC
endif
bin_PROGRAMS = jp3d_to_volume volume_to_jp3d bin_PROGRAMS = jp3d_to_volume volume_to_jp3d
LDADD = $(USERLIBS) ../libjp3dvm/libopenjp3dvm.la 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-data-hook:
$(INSTALL) -d ../../bin @echo -e " (B)\t\t$(bindir)/jp3d_to_volume$(EXEEXT)" >> $(top_builddir)/report.txt
$(INSTALL) $(bin_PROGRAMS) ../../bin @echo -e " (B)\t\t$(bindir)/volume_to_jp3d$(EXEEXT)" >> $(top_builddir)/report.txt
@(for file in ${REPBIN} ; do \
echo "Installing: ${prefix}/bin/$${file}" >> ../.report.txt ; \
done)

View File

@ -1,99 +1,88 @@
#libjp3dvm MAINTAINERCLEANFILES = Makefile.in
#
MAJOR = @JP3D_MAJOR_NR@
MINOR = @JP3D_MINOR_NR@
BUILD = @JP3D_BUILD_NR@
CURRENT=`expr $(MAJOR) + $(MINOR)`
lib_LTLIBRARIES = libopenjp3dvm.la lib_LTLIBRARIES = libopenjp3dvm.la
libopenjp3dvm_la_LDFLAGS = -no-undefined \ includesdir = ${includedir}/openjpeg3d-@JP3D_MAJOR_NR@.@JP3D_MINOR_NR@
-version-info $(CURRENT):$(BUILD):$(MINOR) includes_HEADERS = openjpeg3d.h
SRCS = bio.c cio.c dwt.c event.c jp3d.c jp3d_lib.c volume.c mct.c mqc.c \ libopenjp3dvm_la_LDFLAGS = -no-undefined -version-info @lt_version@
openjpeg.c pi.c raw.c t1.c t1_3d.c t2.c tcd.c tgt.c
INCLS = t1_3d.h bio.h cio.h dwt.h event.h fix.h int.h jp3d.h jp3d_lib.h \ libopenjp3dvm_la_CPPFLAGS = \
volume.h mct.h mqc.h pi.h raw.h t1.h t2.h tcd.h tgt.h opj_includes.h -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) EXTRA_DIST = \
CMakeLists.txt
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
install-data-hook: install-data-hook:
(cd $(DESTDIR)${prefix}/include && rm -f openjpeg3d.h) cd $(DESTDIR)$(includedir) && \
(cd $(DESTDIR)${prefix}/include && \ rm -f openjpeg3d.h && \
$(LN_S) ${headerdir}/openjpeg3d.h 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: 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

View File

@ -1,138 +1,116 @@
MAJOR = @MAJOR_NR@ MAINTAINERCLEANFILES = Makefile.in
MINOR = @MINOR_NR@
BUILD = @BUILD_NR@
CURRENT=`expr $(MAJOR) + $(MINOR)`
lib_LTLIBRARIES = libopenjpeg_JPWL.la lib_LTLIBRARIES = libopenjpeg_JPWL.la
libopenjpeg_JPWL_la_LDFLAGS = -no-undefined \ OPJ_SRC = \
-version-info $(CURRENT):$(BUILD):$(MINOR) ../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 libopenjpeg_JPWL_la_CPPFLAGS = \
JPWL_INCLS = jpwl.h crc.h rs.h -I. \
-I$(top_srcdir)/libopenjpeg \
SRCS = ../libopenjpeg/bio.c ../libopenjpeg/cio.c ../libopenjpeg/dwt.c \ -I$(top_builddir)/libopenjpeg \
../libopenjpeg/event.c ../libopenjpeg/image.c ../libopenjpeg/j2k.c \ -I$(top_srcdir)/jpwl \
../libopenjpeg/j2k_lib.c ../libopenjpeg/jp2.c ../libopenjpeg/jpt.c \ -I$(top_builddir)/jpwl \
../libopenjpeg/mct.c ../libopenjpeg/mqc.c ../libopenjpeg/openjpeg.c \ -DUSE_JPWL
../libopenjpeg/pi.c ../libopenjpeg/raw.c ../libopenjpeg/t1.c \ libopenjpeg_JPWL_la_CFLAGS =
../libopenjpeg/t2.c ../libopenjpeg/tcd.c ../libopenjpeg/tgt.c \ libopenjpeg_JPWL_la_LIBADD = -lm
$(JPWL_SRCS) libopenjpeg_JPWL_la_LDFLAGS = -no-undefined -version-info @lt_version@
libopenjpeg_JPWL_la_SOURCES = \
INCLS = ../libopenjpeg/bio.h ../libopenjpeg/cio.h ../libopenjpeg/dwt.h \ $(OPJ_SRC) \
../libopenjpeg/event.h ../libopenjpeg/fix.h ../libopenjpeg/image.h \ crc.c \
../libopenjpeg/int.h ../libopenjpeg/j2k.h ../libopenjpeg/j2k_lib.h \ jpwl.c \
../libopenjpeg/jp2.h ../libopenjpeg/jpt.h ../libopenjpeg/mct.h \ jpwl_lib.c \
../libopenjpeg/mqc.h ../libopenjpeg/openjpeg.h ../libopenjpeg/pi.h \ rs.c \
../libopenjpeg/raw.h ../libopenjpeg/t1.h ../libopenjpeg/t2.h \ jpwl.h \
../libopenjpeg/tcd.h ../libopenjpeg/tgt.h ../libopenjpeg/opj_malloc.h \ crc.h \
../libopenjpeg/opj_includes.h \ rs.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
bin_PROGRAMS = JPWL_j2k_to_image JPWL_image_to_j2k bin_PROGRAMS = JPWL_j2k_to_image JPWL_image_to_j2k
JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL JPWL_j2k_to_image_CPPFLAGS = \
JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL -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 JPWL_image_to_j2k_CPPFLAGS = \
COMPILERFLAGS += -DOPJ_EXPORTS -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 else
COMPILERFLAGS += -DOPJ_STATIC if HAVE_DARWIN
libopenjpeg_JPWL_la_LDFLAGS += -static SO_PREFIX = (DY)
dll =
else
SO_PREFIX = (SO)
dll =
endif 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 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

View File

@ -1,98 +1,95 @@
MAJOR = @MAJOR_NR@ MAINTAINERCLEANFILES = Makefile.in
MINOR = @MINOR_NR@
BUILD = @BUILD_NR@ includesdir = $(includedir)/openjpeg-$(MAJOR_NR).$(MINOR_NR)
CURRENT=`expr $(MAJOR) + $(MINOR)` includes_HEADERS = openjpeg.h
lib_LTLIBRARIES = libopenjpeg.la 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 \ libopenjpeg_la_SOURCES = \
-version-info $(CURRENT):$(BUILD):$(MINOR) 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 \ EXTRA_DIST = \
mct.c mqc.c openjpeg.c pi.c raw.c t1.c t2.c tcd.c tgt.c CMakeLists.txt
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
install-data-hook: install-data-hook:
(cd $(DESTDIR)${prefix}/include && rm -f openjpeg.h) cd $(DESTDIR)$(includedir) && \
(cd $(DESTDIR)${prefix}/include && \ rm -f openjpeg.h && \
$(LN_S) ${headerdir}/openjpeg.h 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: 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

View File

@ -7,5 +7,6 @@ Name: openjpeg
Description: JPEG2000 files library Description: JPEG2000 files library
URL: http://www.openjpeg.org/ URL: http://www.openjpeg.org/
Version: @VERSION@ Version: @VERSION@
pkgconfig_requires_private: @requirements@
Libs: -L${libdir} -lopenjpeg Libs: -L${libdir} -lopenjpeg
Cflags: -I${includedir} Cflags: -I${includedir}

56
m4/opj_check_lib.m4 Normal file
View File

@ -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])
])

30
m4/opj_compiler_flag.m4 Normal file
View File

@ -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])
])

94
m4/opj_doxygen.m4 Normal file
View File

@ -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

157
m4/pkg.m4 Normal file
View File

@ -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

View File

@ -1,45 +1,113 @@
COMPILERFLAGS = -Wall MAINTAINERCLEANFILES = Makefile.in
if with_sharedlibs OPJ_SRC = \
COMPILERFLAGS += -DOPJ_EXPORTS ../libopenjpeg/bio.c \
else ../libopenjpeg/cio.c \
COMPILERFLAGS += -DOPJ_STATIC ../libopenjpeg/dwt.c \
endif ../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 = bin_PROGRAMS = \
INCLUDES = -I.. -I. -I../libopenjpeg -I../common frames_to_mj2 \
mj2_to_frames \
extract_j2k_from_mj2 \
wrap_j2k_in_mj2
if with_liblcms2 frames_to_mj2_CPPFLAGS = \
INCLUDES += @lcms2includes@ -I. \
USERLIBS += @lcms2libs@ -I$(top_srcdir)/common \
endif -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 mj2_to_frames_CPPFLAGS = \
INCLUDES += @lcms1includes@ -I. \
USERLIBS += @lcms1libs@ -I$(top_srcdir)/common \
endif -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) wrap_j2k_in_mj2_CPPFLAGS = \
LDADD = ../libopenjpeg/libopenjpeg.la $(USERLIBS) -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 \ EXTRA_DIST = \
frames_to_mj2.c CMakeLists.txt
mj2_to_frames_SOURCES = ../common/getopt.c mj2_convert.c mj2.c \ install-data-hook:
../common/color.c mj2_to_frames.c @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
extract_j2k_from_mj2_SOURCES = mj2.c extract_j2k_from_mj2.c @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
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)