Removed LCMS dependencies from Makefile.am/Makefile.nix
This commit is contained in:
parent
d08a96e251
commit
407b95e35f
3
CHANGES
3
CHANGES
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
December 9, 2010
|
||||||
|
! [szukw000] removed LCMS dependencies from Makefile.am/Makefile.nix
|
||||||
|
|
||||||
December 8, 2010
|
December 8, 2010
|
||||||
(thanks to Winfried for his help)
|
(thanks to Winfried for his help)
|
||||||
* [antonin] changed remaining "WIN32" to "_WIN32"
|
* [antonin] changed remaining "WIN32" to "_WIN32"
|
||||||
|
|
12
Makefile.nix
12
Makefile.nix
|
@ -30,16 +30,6 @@ INSTALL_INCLUDE = $(prefix)/include/$(headerdir)
|
||||||
# Converts cr/lf to just lf
|
# Converts cr/lf to just lf
|
||||||
DOS2UNIX = dos2unix
|
DOS2UNIX = dos2unix
|
||||||
|
|
||||||
ifeq ($(WITH_LCMS1),yes)
|
|
||||||
INCLUDE += $(LCMS1_INCLUDE)
|
|
||||||
LIBRARIES += $(LCMS1_LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(WITH_LCMS2),yes)
|
|
||||||
INCLUDE += $(LCMS2_INCLUDE)
|
|
||||||
LIBRARIES += $(LCMS2_LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
MODULES = $(SRCS:.c=.o)
|
MODULES = $(SRCS:.c=.o)
|
||||||
|
|
||||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
|
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
|
||||||
|
@ -84,7 +74,7 @@ $(STATICLIB): $(MODULES)
|
||||||
|
|
||||||
ifeq ($(ENABLE_SHARED),yes)
|
ifeq ($(ENABLE_SHARED),yes)
|
||||||
$(SHAREDLIB): $(MODULES)
|
$(SHAREDLIB): $(MODULES)
|
||||||
$(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
$(CC) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install: OpenJPEG
|
install: OpenJPEG
|
||||||
|
|
16
config.nix
16
config.nix
|
@ -20,15 +20,15 @@ ENABLE_SHARED = yes
|
||||||
#==== HAVE YOU CREATED opj_config.h FROM opj_config.h.in.user ? ====
|
#==== HAVE YOU CREATED opj_config.h FROM opj_config.h.in.user ? ====
|
||||||
#==== SHOULD BE IN SYNC WITH opj_config.h ====
|
#==== SHOULD BE IN SYNC WITH opj_config.h ====
|
||||||
WITH_LCMS1 = no
|
WITH_LCMS1 = no
|
||||||
WITH_LCMS2 = yes
|
WITH_LCMS2 = no
|
||||||
WITH_PNG = yes
|
WITH_PNG = no
|
||||||
WITH_TIFF = yes
|
WITH_TIFF = no
|
||||||
#
|
#
|
||||||
# Set to yes if you want compile/install
|
# Set to yes if you want compile/install
|
||||||
# jpwl libraries/binaries
|
# jpwl libraries/binaries
|
||||||
# jp3d libraries/binaries
|
# jp3d libraries/binaries
|
||||||
WITH_JPWL = yes
|
WITH_JPWL = no
|
||||||
WITH_JP3D = yes
|
WITH_JP3D = no
|
||||||
#
|
#
|
||||||
#Set to yes if you have doxygen installed
|
#Set to yes if you have doxygen installed
|
||||||
#Set to no if doxygen is missing.
|
#Set to no if doxygen is missing.
|
||||||
|
@ -43,6 +43,8 @@ TIFF_INCLUDE = -I/usr/include
|
||||||
LCMS1_LIB = -L/usr/lib -llcms
|
LCMS1_LIB = -L/usr/lib -llcms
|
||||||
LCMS2_LIB = -L/usr/lib -llcms2
|
LCMS2_LIB = -L/usr/lib -llcms2
|
||||||
PNG_LIB = -L/usr/lib -lpng -lz
|
PNG_LIB = -L/usr/lib -lpng -lz
|
||||||
#tiff with jpeg support?
|
#tiff with jpeg/jbig support?
|
||||||
|
JBIG_LIB = -ljbig
|
||||||
|
JBIG85_LIB = -ljbig85
|
||||||
JPEG_LIB = -ljpeg
|
JPEG_LIB = -ljpeg
|
||||||
TIFF_LIB = -L/usr/lib -ltiff $(JPEG_LIB)
|
TIFF_LIB = -L/usr/lib -ltiff $(JPEG_LIB) $(JBIG_LIB) $(JBIG85_LIB)
|
||||||
|
|
57
configure.ac
57
configure.ac
|
@ -60,11 +60,10 @@ AC_PROG_LIBTOOL
|
||||||
#
|
#
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
#
|
#
|
||||||
LDLIBS=""
|
|
||||||
#
|
|
||||||
LIB_MATH=""
|
LIB_MATH=""
|
||||||
AC_CHECK_LIB(m,sqrt,LIB_MATH="-lm",,)
|
AC_CHECK_LIB(m,sqrt,LIB_MATH="-lm",,)
|
||||||
LDLIBS=""
|
LIB_Z=""
|
||||||
|
AC_CHECK_LIB(z,inflate,LIB_Z="-lz",,)
|
||||||
#
|
#
|
||||||
AC_PATH_PROG([PKGCONFIG], [pkg-config])
|
AC_PATH_PROG([PKGCONFIG], [pkg-config])
|
||||||
#
|
#
|
||||||
|
@ -94,49 +93,49 @@ if test "x$with_libpng" = xyes ; then
|
||||||
else
|
else
|
||||||
if test -n "$PKGCONFIG" ; then
|
if test -n "$PKGCONFIG" ; then
|
||||||
pngincludes="`$PKGCONFIG --variable=includedir libpng`"
|
pngincludes="`$PKGCONFIG --variable=includedir libpng`"
|
||||||
fi
|
|
||||||
if test -n "$pngincludes" ; then
|
if test -n "$pngincludes" ; then
|
||||||
pngheader="$pngincludes"
|
pngheader="$pngincludes"
|
||||||
pngincludes="-I$pngincludes"
|
pngincludes="-I$pngincludes"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if test -n "$LIBPNG_CONFIG" ; then
|
||||||
|
pngincludes="`$LIBPNG_CONFIG --I_opts`"
|
||||||
|
pngheader="`$LIBPNG_CONFIG --I_opts | $SED 's/-I//'`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test -n "$pngheader" ; then
|
if test -n "$pngheader" ; then
|
||||||
pngheader="$pngheader/png.h"
|
pngheader="$pngheader/png.h"
|
||||||
else
|
else
|
||||||
pngheader="png.h"
|
pngheader="png.h"
|
||||||
fi
|
fi
|
||||||
|
#
|
||||||
AC_CHECK_HEADER($pngheader,png_header_found="yes",,)
|
AC_CHECK_HEADER($pngheader,png_header_found="yes",,)
|
||||||
#last resort
|
|
||||||
if test "$png_header_found" = "no" ; then
|
|
||||||
pngincludes=""
|
|
||||||
pngheader=""
|
|
||||||
if test -n "$LIBPNG_CONFIG" ; then
|
|
||||||
pngincludes="`$LIBPNG_CONFIG --I_opts`"
|
|
||||||
pngheader="`$LIBPNG_CONFIG --I_opts | $SED 's/-I//'`"
|
|
||||||
fi
|
|
||||||
if test -n "$pngheader" ; then
|
|
||||||
pngheader="$pngheader/png.h"
|
|
||||||
AC_CHECK_HEADER($pngheader,png_header_found="yes",,)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
#
|
#
|
||||||
AC_ARG_WITH(png_libraries,
|
AC_ARG_WITH(png_libraries,
|
||||||
[ --with-png-libraries=DIR PNG library in nonstandard DIR])
|
[ --with-png-libraries=DIR PNG library in nonstandard DIR])
|
||||||
if [[ -n "$with_png_libraries" ]] ; then
|
if [[ -n "$with_png_libraries" ]] ; then
|
||||||
pnglibs="-L$with_png_libraries -lpng -lz $LIB_MATH"
|
pnglibs="-L$with_png_libraries -lpng $LIB_Z $LIB_MATH"
|
||||||
else
|
else
|
||||||
if test -n "$LIBPNG_CONFIG" ; then
|
if test -n "$LIBPNG_CONFIG" ; then
|
||||||
pnglibs="`$LIBPNG_CONFIG --ldflags` -lz $LIB_MATH"
|
pnglibs="`$LIBPNG_CONFIG --ldflags` $LIB_Z $LIB_MATH"
|
||||||
else
|
else
|
||||||
if test -n "$PKGCONFIG" ; then
|
if test -n "$PKGCONFIG" ; then
|
||||||
pnglibs="`$PKGCONFIG --libs libpng` $LIB_MATH"
|
pnglibs="`$PKGCONFIG --libs libpng` $LIB_Z $LIB_MATH"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
savedLIBS="$LIBS"
|
||||||
|
LIBS="$pnglibs"
|
||||||
|
#
|
||||||
|
AC_CHECK_LIB(png,png_read_png,,pnglibs="",)
|
||||||
|
#
|
||||||
|
LIBS="$savedLIBS"
|
||||||
if test -n "$pnglibs" ; then
|
if test -n "$pnglibs" ; then
|
||||||
if test -n "$pngincludes" ; then
|
if test -n "$pngincludes" ; then
|
||||||
with_libpng="yes"
|
with_libpng="yes"
|
||||||
png_header_found="yes"
|
png_header_found="yes"
|
||||||
|
LIBS="$LIBS $pnglibs"
|
||||||
AC_DEFINE(HAVE_LIBPNG, [1], [define to 1 if you have libpng])
|
AC_DEFINE(HAVE_LIBPNG, [1], [define to 1 if you have libpng])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -144,7 +143,6 @@ fi
|
||||||
#
|
#
|
||||||
AC_MSG_RESULT(png is usable:$with_libpng)
|
AC_MSG_RESULT(png is usable:$with_libpng)
|
||||||
AM_CONDITIONAL([with_libpng], [test x$with_libpng = xyes])
|
AM_CONDITIONAL([with_libpng], [test x$with_libpng = xyes])
|
||||||
LDLIBS="$LDLIBS $pnglibs"
|
|
||||||
AC_SUBST(pngincludes)
|
AC_SUBST(pngincludes)
|
||||||
AC_SUBST(pnglibs)
|
AC_SUBST(pnglibs)
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
@ -161,14 +159,24 @@ AC_ARG_ENABLE(tiff,
|
||||||
test "$enable_tiff" = "no" && with_libtiff="no")
|
test "$enable_tiff" = "no" && with_libtiff="no")
|
||||||
#
|
#
|
||||||
if test "x$with_libtiff" = xyes ; then
|
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
|
#standard path
|
||||||
with_libtiff="no"
|
with_libtiff="no"
|
||||||
|
savedLIBS="$LIBS"
|
||||||
|
LIBS="-ltiff $libjpeg $libjbig $libjbig85 $LIB_Z $LIB_MATH"
|
||||||
AC_CHECK_LIB(tiff, TIFFOpen, tifflibs=-ltiff)
|
AC_CHECK_LIB(tiff, TIFFOpen, tifflibs=-ltiff)
|
||||||
|
LIBS="$savedLIBS"
|
||||||
if test -n "$tifflibs" ; then
|
if test -n "$tifflibs" ; then
|
||||||
AC_CHECK_HEADER(tiff.h,tiff_header_found="yes",,)
|
AC_CHECK_HEADER(tiff.h,tiff_header_found="yes",,)
|
||||||
if test "$tiff_header_found" = "yes" ; then
|
if test "$tiff_header_found" = "yes" ; then
|
||||||
with_libtiff="yes"
|
with_libtiff="yes"
|
||||||
LIBS="$LIBS -ltiff $LIB_MATH"
|
LIBS="$LIBS -ltiff $libjpeg $libjbig $libjbig85 $LIB_Z $LIB_MATH"
|
||||||
AC_DEFINE(HAVE_LIBTIFF, [1], [define to 1 if you have libtiff])
|
AC_DEFINE(HAVE_LIBTIFF, [1], [define to 1 if you have libtiff])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -208,7 +216,6 @@ fi
|
||||||
#
|
#
|
||||||
AC_MSG_RESULT(tiff is usable:$with_libtiff)
|
AC_MSG_RESULT(tiff is usable:$with_libtiff)
|
||||||
AM_CONDITIONAL([with_libtiff], [test x$with_libtiff = xyes])
|
AM_CONDITIONAL([with_libtiff], [test x$with_libtiff = xyes])
|
||||||
LDLIBS="$tifflibs $LDLIBS"
|
|
||||||
AC_SUBST(tiffincludes)
|
AC_SUBST(tiffincludes)
|
||||||
AC_SUBST(tifflibs)
|
AC_SUBST(tifflibs)
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
@ -292,7 +299,6 @@ fi
|
||||||
#
|
#
|
||||||
AC_MSG_RESULT(lcms2 is usable:$with_liblcms2)
|
AC_MSG_RESULT(lcms2 is usable:$with_liblcms2)
|
||||||
AM_CONDITIONAL([with_liblcms2], [test x$with_liblmcs2 = xyes])
|
AM_CONDITIONAL([with_liblcms2], [test x$with_liblmcs2 = xyes])
|
||||||
LDLIBS="$lcms2libs $LDLIBS"
|
|
||||||
AC_SUBST(lcms2includes)
|
AC_SUBST(lcms2includes)
|
||||||
AC_SUBST(lcms2libs)
|
AC_SUBST(lcms2libs)
|
||||||
AC_MSG_RESULT(lcms2libs:$lcms2libs)
|
AC_MSG_RESULT(lcms2libs:$lcms2libs)
|
||||||
|
@ -368,7 +374,6 @@ AC_MSG_RESULT(lcms is usable:$with_liblcms1)
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
AM_CONDITIONAL([with_liblcms1], [test x$with_liblcms1 = xyes])
|
AM_CONDITIONAL([with_liblcms1], [test x$with_liblcms1 = xyes])
|
||||||
LDLIBS="$lcms1libs $LDLIBS"
|
|
||||||
AC_SUBST(lcms1includes)
|
AC_SUBST(lcms1includes)
|
||||||
AC_SUBST(lcms1libs)
|
AC_SUBST(lcms1libs)
|
||||||
#
|
#
|
||||||
|
@ -417,8 +422,6 @@ if test "$with_jp3d" = "yes" ; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST(jp3d_dir)
|
AC_SUBST(jp3d_dir)
|
||||||
#
|
#
|
||||||
AC_SUBST(LDLIBS)
|
|
||||||
#
|
|
||||||
AC_CHECK_PROG(with_doxygen, doxygen, [yes],[no],,)
|
AC_CHECK_PROG(with_doxygen, doxygen, [yes],[no],,)
|
||||||
AM_CONDITIONAL([with_doxygen], [test x$with_doxygen = xyes])
|
AM_CONDITIONAL([with_doxygen], [test x$with_doxygen = xyes])
|
||||||
#
|
#
|
||||||
|
|
|
@ -30,7 +30,6 @@ INCLS = ../libopenjpeg/bio.h ../libopenjpeg/cio.h ../libopenjpeg/dwt.h \
|
||||||
$(JPWL_INCLS)
|
$(JPWL_INCLS)
|
||||||
|
|
||||||
libopenjpeg_JPWL_la_SOURCES = $(SRCS) $(INCLS)
|
libopenjpeg_JPWL_la_SOURCES = $(SRCS) $(INCLS)
|
||||||
libopenjpeg_JPWL_la_LIBADD = @LDLIBS@
|
|
||||||
|
|
||||||
# Converts cr/lf to just lf
|
# Converts cr/lf to just lf
|
||||||
DOS2UNIX = dos2unix
|
DOS2UNIX = dos2unix
|
||||||
|
|
|
@ -57,8 +57,6 @@ endif
|
||||||
|
|
||||||
USERLIBS += -lm
|
USERLIBS += -lm
|
||||||
|
|
||||||
LIBRARIES += $(USERLIBS)
|
|
||||||
|
|
||||||
MODULES = $(SRCS:.c=.o)
|
MODULES = $(SRCS:.c=.o)
|
||||||
|
|
||||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDE) -DUSE_JPWL
|
CFLAGS = $(COMPILERFLAGS) $(INCLUDE) -DUSE_JPWL
|
||||||
|
@ -97,7 +95,7 @@ $(STATICLIB): $(MODULES)
|
||||||
|
|
||||||
ifeq ($(ENABLE_SHARED),yes)
|
ifeq ($(ENABLE_SHARED),yes)
|
||||||
$(SHAREDLIB): $(MODULES)
|
$(SHAREDLIB): $(MODULES)
|
||||||
$(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
$(CC) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
JPWL_j2k_to_image: ../codec/j2k_to_image.c
|
JPWL_j2k_to_image: ../codec/j2k_to_image.c
|
||||||
|
|
|
@ -10,8 +10,6 @@ INCLUDES = -I.. -I.
|
||||||
libopenjpeg_la_LDFLAGS = -no-undefined \
|
libopenjpeg_la_LDFLAGS = -no-undefined \
|
||||||
-version-info $(CURRENT):$(BUILD):$(MINOR)
|
-version-info $(CURRENT):$(BUILD):$(MINOR)
|
||||||
|
|
||||||
libopenjpeg_la_LIBADD = @LDLIBS@
|
|
||||||
|
|
||||||
SRCS = bio.c cio.c dwt.c event.c image.c j2k.c j2k_lib.c jp2.c jpt.c \
|
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
|
mct.c mqc.c openjpeg.c pi.c raw.c t1.c t2.c tcd.c tgt.c
|
||||||
|
|
||||||
|
@ -32,14 +30,6 @@ dos2unix:
|
||||||
|
|
||||||
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
|
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
|
||||||
|
|
||||||
if with_liblcms1
|
|
||||||
INCLUDES += @lcms1includes@
|
|
||||||
endif
|
|
||||||
|
|
||||||
if with_liblcms2
|
|
||||||
INCLUDES += @lcms2includes@
|
|
||||||
endif
|
|
||||||
|
|
||||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
|
CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
|
||||||
|
|
||||||
headerdir = openjpeg-$(MAJOR).$(MINOR)
|
headerdir = openjpeg-$(MAJOR).$(MINOR)
|
||||||
|
|
Loading…
Reference in New Issue