Changed build choice in configure.ac/Makefile.am/Makefile.nix: shared xor static
This commit is contained in:
parent
0264197f3f
commit
436d2f4bb9
4
CHANGES
4
CHANGES
|
@ -5,6 +5,10 @@ What's New for OpenJPEG
|
|||
! : changed
|
||||
+ : added
|
||||
|
||||
December 10, 2010
|
||||
! [szukw000] changed build choice in configure.ac/Makefile.am/Makefile.nix:
|
||||
shared xor static
|
||||
|
||||
December 9, 2010
|
||||
! [antonin] removed LCMS dependency in jp3d/libjp3dvm/CMakeLists.txt
|
||||
! [antonin] updated xcode project
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
COMPILERFLAGS = -Wall -static
|
||||
COMPILERFLAGS = -Wall
|
||||
|
||||
if with_staticlibs
|
||||
COMPILERFLAGS += -static
|
||||
endif
|
||||
|
||||
USERLIBS = -lm
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common
|
||||
|
||||
|
|
|
@ -35,14 +35,15 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@with_libtiff_TRUE@am__append_1 = @tiffincludes@
|
||||
@with_libtiff_TRUE@am__append_2 = @tifflibs@
|
||||
@with_libpng_TRUE@am__append_3 = @pngincludes@
|
||||
@with_libpng_TRUE@am__append_4 = @pnglibs@
|
||||
@with_liblcms2_TRUE@am__append_5 = @lcms2includes@
|
||||
@with_liblcms2_TRUE@am__append_6 = @lcms2libs@
|
||||
@with_liblcms1_TRUE@am__append_7 = @lcms1includes@
|
||||
@with_liblcms1_TRUE@am__append_8 = @lcms1libs@
|
||||
@with_staticlibs_TRUE@am__append_1 = -static
|
||||
@with_libtiff_TRUE@am__append_2 = @tiffincludes@
|
||||
@with_libtiff_TRUE@am__append_3 = @tifflibs@
|
||||
@with_libpng_TRUE@am__append_4 = @pngincludes@
|
||||
@with_libpng_TRUE@am__append_5 = @pnglibs@
|
||||
@with_liblcms2_TRUE@am__append_6 = @lcms2includes@
|
||||
@with_liblcms2_TRUE@am__append_7 = @lcms2libs@
|
||||
@with_liblcms1_TRUE@am__append_8 = @lcms1includes@
|
||||
@with_liblcms1_TRUE@am__append_9 = @lcms1libs@
|
||||
bin_PROGRAMS = j2k_to_image$(EXEEXT) image_to_j2k$(EXEEXT) \
|
||||
j2k_dump$(EXEEXT)
|
||||
subdir = codec
|
||||
|
@ -239,11 +240,11 @@ top_build_prefix = @top_build_prefix@
|
|||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
with_doxygen = @with_doxygen@
|
||||
COMPILERFLAGS = -Wall -static
|
||||
USERLIBS = -lm $(am__append_2) $(am__append_4) $(am__append_6) \
|
||||
$(am__append_8)
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common $(am__append_1) \
|
||||
$(am__append_3) $(am__append_5) $(am__append_7)
|
||||
COMPILERFLAGS = -Wall $(am__append_1)
|
||||
USERLIBS = -lm $(am__append_3) $(am__append_5) $(am__append_7) \
|
||||
$(am__append_9)
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common $(am__append_2) \
|
||||
$(am__append_4) $(am__append_6) $(am__append_8)
|
||||
LDADD = $(USERLIBS) ../libopenjpeg/libopenjpeg.la
|
||||
j2k_to_image_SOURCES = ../common/getopt.c index.c convert.c \
|
||||
../common/color.c j2k_to_image.c
|
||||
|
|
|
@ -34,18 +34,24 @@ all: j2k_to_image image_to_j2k j2k_dump
|
|||
install -d ../bin
|
||||
install j2k_to_image image_to_j2k j2k_dump ../bin
|
||||
|
||||
j2k_to_image: j2k_to_image.c ../libopenjpeg.a
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
ELIB = ../libopenjpeg.so.$(MAJOR).$(MINOR).$(BUILD)
|
||||
else
|
||||
ELIB = ../libopenjpeg.a
|
||||
endif
|
||||
|
||||
j2k_to_image: j2k_to_image.c $(ELIB)
|
||||
$(CC) $(CFLAGS) ../common/getopt.c index.c convert.c \
|
||||
../common/color.c j2k_to_image.c \
|
||||
-o j2k_to_image ../libopenjpeg.a $(USERLIBS)
|
||||
-o j2k_to_image $(ELIB) $(USERLIBS)
|
||||
|
||||
image_to_j2k: image_to_j2k.c ../libopenjpeg.a
|
||||
image_to_j2k: image_to_j2k.c $(ELIB)
|
||||
$(CC) $(CFLAGS) ../common/getopt.c index.c convert.c image_to_j2k.c \
|
||||
-o image_to_j2k ../libopenjpeg.a $(USERLIBS)
|
||||
-o image_to_j2k $(ELIB) $(USERLIBS)
|
||||
|
||||
j2k_dump: j2k_dump.c ../libopenjpeg.a
|
||||
j2k_dump: j2k_dump.c $(ELIB)
|
||||
$(CC) $(CFLAGS) ../common/getopt.c index.c j2k_dump.c \
|
||||
-o j2k_dump ../libopenjpeg.a $(USERLIBS)
|
||||
-o j2k_dump $(ELIB) $(USERLIBS)
|
||||
|
||||
clean:
|
||||
rm -f j2k_to_image image_to_j2k j2k_dump
|
||||
|
|
|
@ -8,7 +8,6 @@ JP3D_BUILD = 0
|
|||
|
||||
prefix=/usr/local
|
||||
CC = gcc
|
||||
LDCONFIG = /sbin/ldconfig
|
||||
AR = ar
|
||||
#
|
||||
#Set this to no if you do no want to compile/install shared libs.
|
||||
|
|
|
@ -751,6 +751,8 @@ with_doxygen_FALSE
|
|||
with_doxygen_TRUE
|
||||
with_doxygen
|
||||
jp3d_dir
|
||||
with_staticlibs_FALSE
|
||||
with_staticlibs_TRUE
|
||||
with_sharedlibs_FALSE
|
||||
with_sharedlibs_TRUE
|
||||
jpwl_dir
|
||||
|
@ -1571,6 +1573,7 @@ Optional Features:
|
|||
--enable-lcms1=[yes|no] Build with LCMS-1 support [default=yes]
|
||||
--enable-jpwl=[yes|no] Build with JPWL support [default=no]
|
||||
--enable-shared=[yes|no] Build shared libs [default=yes]
|
||||
--enable-static=[yes|no] Build static libs [default=no]
|
||||
--enable-jp3d=[yes|no] Build jp3d libs [default=no]
|
||||
|
||||
Optional Packages:
|
||||
|
@ -4922,37 +4925,6 @@ fi
|
|||
|
||||
|
||||
|
||||
# Check whether --enable-static was given.
|
||||
if test "${enable_static+set}" = set; then :
|
||||
enableval=$enable_static; p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
enable_static=yes
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
|
@ -5866,13 +5838,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
|
|||
else
|
||||
lt_cv_nm_interface="BSD nm"
|
||||
echo "int some_variable = 0;" > conftest.$ac_ext
|
||||
(eval echo "\"\$as_me:5869: $ac_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:5841: $ac_compile\"" >&5)
|
||||
(eval "$ac_compile" 2>conftest.err)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:5872: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval echo "\"\$as_me:5844: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:5875: output\"" >&5)
|
||||
(eval echo "\"\$as_me:5847: output\"" >&5)
|
||||
cat conftest.out >&5
|
||||
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
||||
lt_cv_nm_interface="MS dumpbin"
|
||||
|
@ -7063,7 +7035,7 @@ ia64-*-hpux*)
|
|||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 7066 "configure"' > conftest.$ac_ext
|
||||
echo '#line 7038 "configure"' > conftest.$ac_ext
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -8629,6 +8601,36 @@ fi
|
|||
|
||||
|
||||
|
||||
# Check whether --enable-static was given.
|
||||
if test "${enable_static+set}" = set; then :
|
||||
enableval=$enable_static; p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
enable_static=yes
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-pic was given.
|
||||
|
@ -9054,11 +9056,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:9057: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:9059: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:9061: \$? = $ac_status" >&5
|
||||
echo "$as_me:9063: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -9393,11 +9395,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:9396: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:9398: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:9400: \$? = $ac_status" >&5
|
||||
echo "$as_me:9402: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -9498,11 +9500,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:9501: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:9503: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:9505: \$? = $ac_status" >&5
|
||||
echo "$as_me:9507: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -9553,11 +9555,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:9556: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:9558: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:9560: \$? = $ac_status" >&5
|
||||
echo "$as_me:9562: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -11920,7 +11922,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11923 "configure"
|
||||
#line 11925 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -12016,7 +12018,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12019 "configure"
|
||||
#line 12021 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -13972,11 +13974,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:13975: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:13977: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:13979: \$? = $ac_status" >&5
|
||||
echo "$as_me:13981: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -14071,11 +14073,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:14074: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14076: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:14078: \$? = $ac_status" >&5
|
||||
echo "$as_me:14080: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -14123,11 +14125,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:14126: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14128: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:14130: \$? = $ac_status" >&5
|
||||
echo "$as_me:14132: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -15383,6 +15385,8 @@ if test "x$ac_cv_lib_z_inflate" = x""yes; then :
|
|||
LIB_Z="-lz"
|
||||
fi
|
||||
|
||||
#
|
||||
LIBS="$LIBS $LIB_MATH $LIB_Z"
|
||||
#
|
||||
# Extract the first word of "pkg-config", so it can be a program name with args.
|
||||
set dummy pkg-config; ac_word=$2
|
||||
|
@ -15530,18 +15534,18 @@ if test "${with_png_libraries+set}" = set; then :
|
|||
fi
|
||||
|
||||
if [ -n "$with_png_libraries" ] ; then
|
||||
pnglibs="-L$with_png_libraries -lpng $LIB_Z $LIB_MATH"
|
||||
pnglibs="-L$with_png_libraries -lpng"
|
||||
else
|
||||
if test -n "$LIBPNG_CONFIG" ; then
|
||||
pnglibs="`$LIBPNG_CONFIG --ldflags` $LIB_Z $LIB_MATH"
|
||||
pnglibs="`$LIBPNG_CONFIG --ldflags`"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
pnglibs="`$PKGCONFIG --libs libpng` $LIB_Z $LIB_MATH"
|
||||
pnglibs="`$PKGCONFIG --libs libpng`"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$pnglibs"
|
||||
LIBS="$pnglibs $LIB_Z $LIB_MATH"
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_read_png in -lpng" >&5
|
||||
$as_echo_n "checking for png_read_png in -lpng... " >&6; }
|
||||
|
@ -15811,7 +15815,7 @@ fi
|
|||
|
||||
if test "$tiff_header_found" = "yes" ; then
|
||||
with_libtiff="yes"
|
||||
LIBS="$LIBS -ltiff $libjpeg $libjbig $libjbig85 $LIB_Z $LIB_MATH"
|
||||
LIBS="$LIBS -ltiff $libjpeg $libjbig $libjbig85"
|
||||
|
||||
$as_echo "#define HAVE_LIBTIFF 1" >>confdefs.h
|
||||
|
||||
|
@ -15849,9 +15853,9 @@ fi
|
|||
if test -n "$with_tiff_libraries" ; then
|
||||
tifflibs="-L$with_tiff_libraries"
|
||||
fi
|
||||
tifflibs="$tifflibs -ltiff $LIB_MATH"
|
||||
tifflibs="$tifflibs -ltiff"
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$tifflibs"
|
||||
LIBS="$tifflibs $libjpeg $libjbig $libjbig85 $LIB_Z $LIB_MATH"
|
||||
with_libtiff="no"
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
|
||||
|
@ -15910,7 +15914,7 @@ $as_echo "#define HAVE_LIBTIFF 1" >>confdefs.h
|
|||
|
||||
fi
|
||||
fi
|
||||
LIBS="$savedLIBS $tifflibs"
|
||||
LIBS="$savedLIBS $tifflibs $libjpeg $libjbig $libjbig85"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
@ -15998,10 +16002,10 @@ fi
|
|||
if test -z "$lcms2libs" ; then
|
||||
lcms2libs="-llcms2"
|
||||
fi
|
||||
lcms2libs="$lcms2libs $LIB_MATH"
|
||||
lcms2libs="$lcms2libs"
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$lcms2libs"
|
||||
LIBS="$lcms2libs $LIB_MATH"
|
||||
with_liblcms2="no"
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsOpenProfileFromFile in -llcms2" >&5
|
||||
|
@ -16146,10 +16150,10 @@ fi
|
|||
if test -z "$lcms1libs" ; then
|
||||
lcms1libs="-llcms"
|
||||
fi
|
||||
lcms1libs="$lcms1libs $LIB_MATH"
|
||||
lcms1libs="$lcms1libs"
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$lcms1libs"
|
||||
LIBS="$lcms1libs $LIB_MATH"
|
||||
with_liblcms1="no"
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsOpenProfileFromFile in -llcms" >&5
|
||||
|
@ -16263,6 +16267,7 @@ fi
|
|||
#
|
||||
# -------------------------------
|
||||
# Test for creating SHARED LIBS
|
||||
# wanted result: shared xor static
|
||||
# -------------------------------
|
||||
with_sharedlibs="yes"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
|
||||
|
@ -16275,6 +16280,26 @@ fi
|
|||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sharedlibs" >&5
|
||||
$as_echo "$with_sharedlibs" >&6; }
|
||||
#
|
||||
# -------------------------------
|
||||
# Test for creating STATIC LIBS
|
||||
# -------------------------------
|
||||
if test "$with_sharedlibs" = "yes" ; then
|
||||
with_staticlibs="no"
|
||||
else
|
||||
with_staticlibs="yes"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
|
||||
$as_echo_n "checking whether to build static libraries... " >&6; }
|
||||
# Check whether --enable-static was given.
|
||||
if test "${enable_static+set}" = set; then :
|
||||
enableval=$enable_static; test "$enable_static" = "no" && with_staticlibs="no"
|
||||
fi
|
||||
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_staticlibs" >&5
|
||||
$as_echo "$with_staticlibs" >&6; }
|
||||
#
|
||||
fi
|
||||
if test x$with_sharedlibs = xyes; then
|
||||
with_sharedlibs_TRUE=
|
||||
with_sharedlibs_FALSE='#'
|
||||
|
@ -16283,6 +16308,14 @@ else
|
|||
with_sharedlibs_FALSE=
|
||||
fi
|
||||
|
||||
if test x$with_staticlibs = xyes; then
|
||||
with_staticlibs_TRUE=
|
||||
with_staticlibs_FALSE='#'
|
||||
else
|
||||
with_staticlibs_TRUE='#'
|
||||
with_staticlibs_FALSE=
|
||||
fi
|
||||
|
||||
#
|
||||
# -------------------------------
|
||||
# Test for creating JP3D
|
||||
|
@ -16517,6 +16550,10 @@ if test -z "${with_sharedlibs_TRUE}" && test -z "${with_sharedlibs_FALSE}"; then
|
|||
as_fn_error "conditional \"with_sharedlibs\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${with_staticlibs_TRUE}" && test -z "${with_staticlibs_FALSE}"; then
|
||||
as_fn_error "conditional \"with_staticlibs\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${with_doxygen_TRUE}" && test -z "${with_doxygen_FALSE}"; then
|
||||
as_fn_error "conditional \"with_doxygen\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
@ -17120,12 +17157,12 @@ sed_quote_subst='$sed_quote_subst'
|
|||
double_quote_subst='$double_quote_subst'
|
||||
delay_variable_subst='$delay_variable_subst'
|
||||
enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
|
||||
|
@ -18219,9 +18256,6 @@ available_tags="CXX "
|
|||
# Whether or not to build shared libraries.
|
||||
build_libtool_libs=$enable_shared
|
||||
|
||||
# Whether or not to build static libraries.
|
||||
build_old_libs=$enable_static
|
||||
|
||||
# Assembler program.
|
||||
AS=$AS
|
||||
|
||||
|
@ -18235,6 +18269,9 @@ OBJDUMP=$OBJDUMP
|
|||
macro_version=$macro_version
|
||||
macro_revision=$macro_revision
|
||||
|
||||
# Whether or not to build static libraries.
|
||||
build_old_libs=$enable_static
|
||||
|
||||
# What type of objects to build.
|
||||
pic_mode=$pic_mode
|
||||
|
||||
|
@ -19026,4 +19063,5 @@ echo "lcms1 version : $have_lcms1_version"
|
|||
echo "--enable-jpwl : $with_libjpwl"
|
||||
echo "--enable-jp3d : $with_jp3d"
|
||||
echo "--enable-shared : $with_sharedlibs"
|
||||
echo "--enable-static : $with_staticlibs"
|
||||
echo "----------------------------------------------"
|
||||
|
|
46
configure.ac
46
configure.ac
|
@ -53,7 +53,6 @@ AC_OBJEXT
|
|||
#
|
||||
# Configure libtool
|
||||
AC_ENABLE_SHARED
|
||||
AC_ENABLE_STATIC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_LIBTOOL_SETUP
|
||||
AC_PROG_LIBTOOL
|
||||
|
@ -65,6 +64,8 @@ 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])
|
||||
#
|
||||
# ------------------------------
|
||||
|
@ -115,18 +116,18 @@ if test "x$with_libpng" = xyes ; then
|
|||
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 $LIB_Z $LIB_MATH"
|
||||
pnglibs="-L$with_png_libraries -lpng"
|
||||
else
|
||||
if test -n "$LIBPNG_CONFIG" ; then
|
||||
pnglibs="`$LIBPNG_CONFIG --ldflags` $LIB_Z $LIB_MATH"
|
||||
pnglibs="`$LIBPNG_CONFIG --ldflags`"
|
||||
else
|
||||
if test -n "$PKGCONFIG" ; then
|
||||
pnglibs="`$PKGCONFIG --libs libpng` $LIB_Z $LIB_MATH"
|
||||
pnglibs="`$PKGCONFIG --libs libpng`"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$pnglibs"
|
||||
LIBS="$pnglibs $LIB_Z $LIB_MATH"
|
||||
#
|
||||
AC_CHECK_LIB(png,png_read_png,,pnglibs="",)
|
||||
#
|
||||
|
@ -176,7 +177,7 @@ if test "x$with_libtiff" = xyes ; 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 $LIB_Z $LIB_MATH"
|
||||
LIBS="$LIBS -ltiff $libjpeg $libjbig $libjbig85"
|
||||
AC_DEFINE(HAVE_LIBTIFF, [1], [define to 1 if you have libtiff])
|
||||
fi
|
||||
fi
|
||||
|
@ -197,9 +198,9 @@ if test "x$with_libtiff" = xyes ; then
|
|||
if test -n "$with_tiff_libraries" ; then
|
||||
tifflibs="-L$with_tiff_libraries"
|
||||
fi
|
||||
tifflibs="$tifflibs -ltiff $LIB_MATH"
|
||||
tifflibs="$tifflibs -ltiff"
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$tifflibs"
|
||||
LIBS="$tifflibs $libjpeg $libjbig $libjbig85 $LIB_Z $LIB_MATH"
|
||||
with_libtiff="no"
|
||||
#
|
||||
AC_CHECK_LIB(tiff, TIFFOpen, , tifflibs="",)
|
||||
|
@ -210,7 +211,7 @@ if test "x$with_libtiff" = xyes ; then
|
|||
AC_DEFINE(HAVE_LIBTIFF, [1], [define to 1 if you have libtiff])
|
||||
fi
|
||||
fi
|
||||
LIBS="$savedLIBS $tifflibs"
|
||||
LIBS="$savedLIBS $tifflibs $libjpeg $libjbig $libjbig85"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
@ -272,10 +273,10 @@ if test "x$with_liblcms2" = xyes ; then
|
|||
if test -z "$lcms2libs" ; then
|
||||
lcms2libs="-llcms2"
|
||||
fi
|
||||
lcms2libs="$lcms2libs $LIB_MATH"
|
||||
lcms2libs="$lcms2libs"
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$lcms2libs"
|
||||
LIBS="$lcms2libs $LIB_MATH"
|
||||
with_liblcms2="no"
|
||||
#
|
||||
AC_CHECK_LIB(lcms2, cmsOpenProfileFromFile, ,lcms2libs="",)
|
||||
|
@ -346,10 +347,10 @@ if [[ -z "$lcms2libs" ]] ; then
|
|||
if test -z "$lcms1libs" ; then
|
||||
lcms1libs="-llcms"
|
||||
fi
|
||||
lcms1libs="$lcms1libs $LIB_MATH"
|
||||
lcms1libs="$lcms1libs"
|
||||
fi
|
||||
savedLIBS="$LIBS"
|
||||
LIBS="$lcms1libs"
|
||||
LIBS="$lcms1libs $LIB_MATH"
|
||||
with_liblcms1="no"
|
||||
#
|
||||
AC_CHECK_LIB(lcms, cmsOpenProfileFromFile, ,lcms1libs="",)
|
||||
|
@ -396,6 +397,7 @@ 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)
|
||||
|
@ -404,7 +406,24 @@ AC_ARG_ENABLE(shared,
|
|||
test "$enable_shared" = "no" && with_sharedlibs="no")
|
||||
#
|
||||
AC_MSG_RESULT($with_sharedlibs)
|
||||
#
|
||||
# -------------------------------
|
||||
# Test for creating STATIC LIBS
|
||||
# -------------------------------
|
||||
if test "$with_sharedlibs" = "yes" ; then
|
||||
with_staticlibs="no"
|
||||
else
|
||||
with_staticlibs="yes"
|
||||
AC_MSG_CHECKING(whether to build static libraries)
|
||||
AC_ARG_ENABLE(static,
|
||||
[ --enable-static[=[yes|no]] Build static libs [ [default=no] ]],
|
||||
test "$enable_static" = "no" && with_staticlibs="no")
|
||||
#
|
||||
AC_MSG_RESULT($with_staticlibs)
|
||||
#
|
||||
fi
|
||||
AM_CONDITIONAL([with_sharedlibs], [test x$with_sharedlibs = xyes])
|
||||
AM_CONDITIONAL([with_staticlibs], [test x$with_staticlibs = xyes])
|
||||
#
|
||||
# -------------------------------
|
||||
# Test for creating JP3D
|
||||
|
@ -453,4 +472,5 @@ echo "lcms1 version : $have_lcms1_version"
|
|||
echo "--enable-jpwl : $with_libjpwl"
|
||||
echo "--enable-jp3d : $with_jp3d"
|
||||
echo "--enable-shared : $with_sharedlibs"
|
||||
echo "--enable-static : $with_staticlibs"
|
||||
echo "----------------------------------------------"
|
||||
|
|
|
@ -34,10 +34,11 @@ MODULES = $(SRCS:.c=.o)
|
|||
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
|
||||
|
||||
LIBNAME = lib$(TARGET)
|
||||
STATICLIB = $(LIBNAME).a
|
||||
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
SHAREDLIB = $(LIBNAME).so.$(JP3D_MAJOR).$(JP3D_MINOR).$(JP3D_BUILD)
|
||||
else
|
||||
STATICLIB = $(LIBNAME).a
|
||||
endif
|
||||
|
||||
default: all
|
||||
|
@ -45,13 +46,14 @@ default: all
|
|||
all: Jp3dVM
|
||||
make -C codec -f Makefile.nix all
|
||||
install -d ../bin
|
||||
install -m 644 $(STATICLIB) ../bin
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
install -m 755 $(SHAREDLIB) ../bin
|
||||
(cd ../bin && \
|
||||
ln -sf $(SHAREDLIB) $(LIBNAME).so.$(JP3D_MAJOR).$(JP3D_MINOR))
|
||||
(cd ../bin && \
|
||||
ln -sf $(LIBNAME).so.$(JP3D_MAJOR).$(JP3D_MINOR) $(LIBNAME).so)
|
||||
else
|
||||
install -m 644 $(STATICLIB) ../bin
|
||||
endif
|
||||
|
||||
dos2unix:
|
||||
|
@ -62,26 +64,26 @@ Jp3dVM: $(STATICLIB) $(SHAREDLIB)
|
|||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(STATICLIB): $(MODULES)
|
||||
$(AR) r $@ $(MODULES)
|
||||
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
$(SHAREDLIB): $(MODULES)
|
||||
$(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
||||
else
|
||||
$(STATICLIB): $(MODULES)
|
||||
$(AR) r $@ $(MODULES)
|
||||
endif
|
||||
|
||||
install: Jp3dVM
|
||||
install -d '$(DESTDIR)$(INSTALL_LIBDIR)'
|
||||
install -m 644 -o root -g root $(STATICLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && ranlib $(STATICLIB))
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
install -m 755 -o root -g root $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
|
||||
ln -sf $(SHAREDLIB) $(LIBNAME).so.$(JP3D_MAJOR).$(JP3D_MINOR) )
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
|
||||
ln -sf $(LIBNAME).so.$(JP3D_MAJOR).$(JP3D_MINOR) $(LIBNAME).so )
|
||||
else
|
||||
install -m 644 -o root -g root $(STATICLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && ranlib $(STATICLIB))
|
||||
endif
|
||||
$(LDCONFIG)
|
||||
install -d $(DESTDIR)$(INSTALL_INCLUDE)
|
||||
rm -f $(DESTDIR)$(INSTALL_INCLUDE)/openjpeg3d.h
|
||||
install -m 644 -o root -g root libjp3dvm/openjpeg3d.h \
|
||||
|
@ -91,15 +93,16 @@ endif
|
|||
make -C codec -f Makefile.nix install
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
|
||||
rm -f $(LIBNAME).so $(LIBNAME).so.$(JP3D_MAJOR).$(JP3D_MINOR) $(SHAREDLIB))
|
||||
else
|
||||
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)
|
||||
endif
|
||||
$(LDCONFIG)
|
||||
rm -f $(DESTDIR)$(prefix)/include/openjpeg3d.h
|
||||
rm -rf $(DESTDIR)$(INSTALL_INCLUDE)
|
||||
make -C codec -f Makefile.nix uninstall
|
||||
|
||||
clean:
|
||||
rm -f core u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB)
|
||||
make -C codec -f Makefile.nix clean
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
USERLIBS =
|
||||
INCLUDES = -I. -I../libjp3dvm
|
||||
CFLAGS = -Wall $(INCLUDES) -static
|
||||
CFLAGS = -Wall $(INCLUDES)
|
||||
|
||||
if with_staticlibs
|
||||
CFLAGS += -static
|
||||
endif
|
||||
|
||||
bin_PROGRAMS = jp3d_to_volume volume_to_jp3d
|
||||
LDADD = $(USERLIBS) ../libjp3dvm/libopenjp3dvm.la
|
||||
|
|
|
@ -37,6 +37,7 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@with_staticlibs_TRUE@am__append_1 = -static
|
||||
bin_PROGRAMS = jp3d_to_volume$(EXEEXT) volume_to_jp3d$(EXEEXT)
|
||||
subdir = jp3d/codec
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
|
@ -92,7 +93,7 @@ AWK = @AWK@
|
|||
BUILD_NR = @BUILD_NR@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = -Wall $(INCLUDES) -static
|
||||
CFLAGS = -Wall $(INCLUDES) $(am__append_1)
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
|
|
|
@ -6,17 +6,23 @@ INSTALL_BIN = $(prefix)/bin
|
|||
CFLAGS = -Wall -I. -I../libjp3dvm -lstdc++ # -g -p -pg
|
||||
#USERLIBS = -lm
|
||||
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
ELIB = ../libopenjp3dvm.so.$(JP3D_MAJOR).$(JP3D_MINOR).$(JP3D_BUILD)
|
||||
else
|
||||
ELIB = ../libopenjp3dvm.a
|
||||
endif
|
||||
|
||||
all: jp3d_to_volume volume_to_jp3d
|
||||
install -d ../../bin
|
||||
install jp3d_to_volume volume_to_jp3d ../../bin
|
||||
|
||||
jp3d_to_volume: jp3d_to_volume.c ../libopenjp3dvm.a
|
||||
jp3d_to_volume: jp3d_to_volume.c $(ELIB)
|
||||
$(CC) $(CFLAGS) getopt.c convert.c jp3d_to_volume.c \
|
||||
-o jp3d_to_volume ../libopenjp3dvm.a $(USERLIBS)
|
||||
-o jp3d_to_volume $(ELIB) $(USERLIBS)
|
||||
|
||||
volume_to_jp3d: volume_to_jp3d.c ../libopenjp3dvm.a
|
||||
volume_to_jp3d: volume_to_jp3d.c $(ELIB)
|
||||
$(CC) $(CFLAGS) getopt.c convert.c volume_to_jp3d.c \
|
||||
-o volume_to_jp3d ../libopenjp3dvm.a $(USERLIBS)
|
||||
-o volume_to_jp3d $(ELIB) $(USERLIBS)
|
||||
|
||||
clean:
|
||||
rm -f jp3d_to_volume volume_to_jp3d
|
||||
|
|
|
@ -66,8 +66,13 @@ USERLIBS += -lm
|
|||
|
||||
bin_PROGRAMS = JPWL_j2k_to_image JPWL_image_to_j2k
|
||||
|
||||
JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL -static
|
||||
JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL -static
|
||||
JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
||||
JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
||||
|
||||
if with_staticlibs
|
||||
JPWL_j2k_to_image_CFLAGS += -static
|
||||
JPWL_image_to_j2k_CFLAGS += -static
|
||||
endif
|
||||
|
||||
CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL
|
||||
LDADD = ./libopenjpeg_JPWL.la $(USERLIBS)
|
||||
|
|
|
@ -45,6 +45,8 @@ target_triplet = @target@
|
|||
@with_liblcms1_TRUE@am__append_7 = @lcms1includes@
|
||||
@with_liblcms1_TRUE@am__append_8 = @lcms1libs@
|
||||
bin_PROGRAMS = JPWL_j2k_to_image$(EXEEXT) JPWL_image_to_j2k$(EXEEXT)
|
||||
@with_staticlibs_TRUE@am__append_9 = -static
|
||||
@with_staticlibs_TRUE@am__append_10 = -static
|
||||
subdir = jpwl
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
|
@ -317,8 +319,10 @@ USERLIBS = $(am__append_2) $(am__append_4) $(am__append_6) \
|
|||
$(am__append_8) -lm
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common $(am__append_1) \
|
||||
$(am__append_3) $(am__append_5) $(am__append_7)
|
||||
JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL -static
|
||||
JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL -static
|
||||
JPWL_j2k_to_image_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL \
|
||||
$(am__append_9)
|
||||
JPWL_image_to_j2k_CFLAGS = $(COMPILERFLAGS) $(INCLUDES) -DUSE_JPWL \
|
||||
$(am__append_10)
|
||||
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
|
||||
|
|
|
@ -62,21 +62,23 @@ MODULES = $(SRCS:.c=.o)
|
|||
CFLAGS = $(COMPILERFLAGS) $(INCLUDE) -DUSE_JPWL
|
||||
|
||||
LIBNAME = lib$(TARGET)
|
||||
STATICLIB = $(LIBNAME).a
|
||||
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
SHAREDLIB = $(LIBNAME).so.$(MAJOR).$(MINOR).$(BUILD)
|
||||
else
|
||||
STATICLIB = $(LIBNAME).a
|
||||
endif
|
||||
|
||||
default: all
|
||||
|
||||
all: OpenJPEG_JPWL JPWL_image_to_j2k JPWL_j2k_to_image
|
||||
install -d ../bin
|
||||
install -m 644 $(STATICLIB) ../bin
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
install -m 755 $(SHAREDLIB) ../bin
|
||||
(cd ../bin && ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR).$(MINOR))
|
||||
(cd ../bin && ln -sf $(LIBNAME).so.$(MAJOR).$(MINOR) $(LIBNAME).so)
|
||||
else
|
||||
install -m 644 $(STATICLIB) ../bin
|
||||
endif
|
||||
install JPWL_image_to_j2k JPWL_j2k_to_image ../bin
|
||||
|
||||
|
@ -90,36 +92,42 @@ JPWL_codec: JPWL_j2k_to_image JPWL_image_to_j2k $(STATICLIB)
|
|||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(STATICLIB): $(MODULES)
|
||||
$(AR) r $@ $(MODULES)
|
||||
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
$(SHAREDLIB): $(MODULES)
|
||||
$(CC) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
|
||||
else
|
||||
$(STATICLIB): $(MODULES)
|
||||
$(AR) r $@ $(MODULES)
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
ELIB = $(SHAREDLIB)
|
||||
else
|
||||
ELIB = $(STATICLIB)
|
||||
endif
|
||||
|
||||
JPWL_j2k_to_image: ../codec/j2k_to_image.c
|
||||
$(CC) $(CFLAGS) ../common/getopt.c ../codec/index.c \
|
||||
../codec/convert.c ../common/color.c ../codec/j2k_to_image.c \
|
||||
-o JPWL_j2k_to_image ./libopenjpeg_JPWL.a $(USERLIBS)
|
||||
-o JPWL_j2k_to_image $(ELIB) $(USERLIBS)
|
||||
|
||||
JPWL_image_to_j2k: ../codec/image_to_j2k.c
|
||||
$(CC) $(CFLAGS) ../common/getopt.c ../codec/index.c \
|
||||
../codec/convert.c ../codec/image_to_j2k.c \
|
||||
-o JPWL_image_to_j2k ./libopenjpeg_JPWL.a $(USERLIBS)
|
||||
-o JPWL_image_to_j2k $(ELIB) $(USERLIBS)
|
||||
|
||||
install: OpenJPEG_JPWL
|
||||
install -d $(DESTDIR)$(INSTALL_LIBDIR)
|
||||
install -m 644 -o root -g root $(STATICLIB) $(DESTDIR)$(INSTALL_LIBDIR)
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && ranlib $(STATICLIB))
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
install -m 755 -o root -g root $(SHAREDLIB) $(DESTDIR)$(INSTALL_LIBDIR)
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
|
||||
ln -sf $(SHAREDLIB) $(LIBNAME).so.$(MAJOR).$(MINOR) )
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
|
||||
ln -sf $(LIBNAME).so.$(MAJOR).$(MINOR) $(LIBNAME).so )
|
||||
else
|
||||
install -m 644 -o root -g root $(STATICLIB) $(DESTDIR)$(INSTALL_LIBDIR)
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && ranlib $(STATICLIB))
|
||||
endif
|
||||
$(LDCONFIG)
|
||||
install -d $(DESTDIR)$(INSTALL_BIN)
|
||||
install -m 755 -o root -g root JPWL_j2k_to_image $(DESTDIR)$(INSTALL_BIN)
|
||||
install -m 755 -o root -g root JPWL_image_to_j2k $(DESTDIR)$(INSTALL_BIN)
|
||||
|
@ -134,11 +142,11 @@ cleancodec:
|
|||
clean: cleanlib cleancodec
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
(cd $(DESTDIR)$(INSTALL_LIBDIR) && \
|
||||
rm -f $(LIBNAME).so $(LIBNAME).so.$(MAJOR).$(MINOR) $(SHAREDLIB))
|
||||
else
|
||||
rm -f $(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)
|
||||
endif
|
||||
$(LDCONFIG)
|
||||
rm -f $(DESTDIR)$(INSTALL_BIN)/JPWL_j2k_to_image
|
||||
rm -f $(DESTDIR)$(INSTALL_BIN)/JPWL_image_to_j2k
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
COMPILERFLAGS = -Wall -static
|
||||
COMPILERFLAGS = -Wall
|
||||
|
||||
if with_staticlibs
|
||||
COMPILERFLAGS += -static
|
||||
endif
|
||||
|
||||
USERLIBS =
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common
|
||||
|
|
|
@ -35,10 +35,11 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@with_liblcms2_TRUE@am__append_1 = @lcms2includes@
|
||||
@with_liblcms2_TRUE@am__append_2 = @lcms2libs@
|
||||
@with_liblcms1_TRUE@am__append_3 = @lcms1includes@
|
||||
@with_liblcms1_TRUE@am__append_4 = @lcms1libs@
|
||||
@with_staticlibs_TRUE@am__append_1 = -static
|
||||
@with_liblcms2_TRUE@am__append_2 = @lcms2includes@
|
||||
@with_liblcms2_TRUE@am__append_3 = @lcms2libs@
|
||||
@with_liblcms1_TRUE@am__append_4 = @lcms1includes@
|
||||
@with_liblcms1_TRUE@am__append_5 = @lcms1libs@
|
||||
bin_PROGRAMS = frames_to_mj2$(EXEEXT) mj2_to_frames$(EXEEXT) \
|
||||
extract_j2k_from_mj2$(EXEEXT) wrap_j2k_in_mj2$(EXEEXT)
|
||||
subdir = mj2
|
||||
|
@ -240,10 +241,10 @@ top_build_prefix = @top_build_prefix@
|
|||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
with_doxygen = @with_doxygen@
|
||||
COMPILERFLAGS = -Wall -static
|
||||
USERLIBS = $(am__append_2) $(am__append_4)
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common $(am__append_1) \
|
||||
$(am__append_3)
|
||||
COMPILERFLAGS = -Wall $(am__append_1)
|
||||
USERLIBS = $(am__append_3) $(am__append_5)
|
||||
INCLUDES = -I.. -I. -I../libopenjpeg -I../common $(am__append_2) \
|
||||
$(am__append_4)
|
||||
LDADD = ../libopenjpeg/libopenjpeg.la $(USERLIBS)
|
||||
frames_to_mj2_SOURCES = ../common/getopt.c mj2_convert.c mj2.c \
|
||||
frames_to_mj2.c
|
||||
|
|
|
@ -19,27 +19,33 @@ endif
|
|||
|
||||
CFLAGS += $(INCLUDE) -lstdc++ # -g -p -pg
|
||||
|
||||
ifeq ($(ENABLE_SHARED),yes)
|
||||
ELIB = ../libopenjpeg.so.$(MAJOR).$(MINOR).$(BUILD)
|
||||
else
|
||||
ELIB = ../libopenjpeg.a
|
||||
endif
|
||||
|
||||
all: frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
|
||||
install -d ../bin
|
||||
install frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 \
|
||||
wrap_j2k_in_mj2 ../bin
|
||||
|
||||
frames_to_mj2: frames_to_mj2.c ../libopenjpeg.a
|
||||
frames_to_mj2: frames_to_mj2.c $(ELIB)
|
||||
$(CC) $(CFLAGS) ../common/getopt.c mj2_convert.c mj2.c frames_to_mj2.c \
|
||||
-o frames_to_mj2 ../libopenjpeg.a $(USERLIBS)
|
||||
-o frames_to_mj2 $(ELIB) $(USERLIBS)
|
||||
|
||||
mj2_to_frames: mj2_to_frames.c ../libopenjpeg.a
|
||||
mj2_to_frames: mj2_to_frames.c $(ELIB)
|
||||
$(CC) $(CFLAGS) ../common/getopt.c mj2_convert.c mj2.c \
|
||||
../common/color.c mj2_to_frames.c \
|
||||
-o mj2_to_frames ../libopenjpeg.a $(USERLIBS)
|
||||
-o mj2_to_frames $(ELIB) $(USERLIBS)
|
||||
|
||||
extract_j2k_from_mj2: extract_j2k_from_mj2.c ../libopenjpeg.a
|
||||
extract_j2k_from_mj2: extract_j2k_from_mj2.c $(ELIB)
|
||||
$(CC) $(CFLAGS) mj2.c extract_j2k_from_mj2.c \
|
||||
-o extract_j2k_from_mj2 ../libopenjpeg.a $(USERLIBS)
|
||||
-o extract_j2k_from_mj2 $(ELIB) $(USERLIBS)
|
||||
|
||||
wrap_j2k_in_mj2: wrap_j2k_in_mj2.c ../libopenjpeg.a
|
||||
wrap_j2k_in_mj2: wrap_j2k_in_mj2.c $(ELIB)
|
||||
$(CC) $(CFLAGS) mj2.c wrap_j2k_in_mj2.c \
|
||||
-o wrap_j2k_in_mj2 ../libopenjpeg.a $(USERLIBS)
|
||||
-o wrap_j2k_in_mj2 $(ELIB) $(USERLIBS)
|
||||
|
||||
clean:
|
||||
rm -f frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
|
||||
|
|
Loading…
Reference in New Issue