Skip to content

Commit

Permalink
Support LibRaw delegate library
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jul 14, 2017
1 parent f94b084 commit cefed48
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2619,6 +2619,8 @@ LIBOPENJP2_CFLAGS = @LIBOPENJP2_CFLAGS@
LIBOPENJP2_LIBS = @LIBOPENJP2_LIBS@
LIBRARY_EXTRA_CPPFLAGS = @LIBRARY_EXTRA_CPPFLAGS@
LIBRARY_PATH = @LIBRARY_PATH@
LIBRAW_CFLAGS = @LIBRAW_CFLAGS@
LIBRAW_LIBS = @LIBRAW_LIBS@
LIBS = @LIBS@
LIBSTDCLDFLAGS = @LIBSTDCLDFLAGS@
LIBTOOL = @LIBTOOL@
Expand Down Expand Up @@ -2758,6 +2760,8 @@ QUANTUM_DEPTH = @QUANTUM_DEPTH@
RANLIB = @RANLIB@
RAQM_CFLAGS = @RAQM_CFLAGS@
RAQM_LIBS = @RAQM_LIBS@
RAW_CFLAGS = @RAW_CFLAGS@
RAW_LIBS = @RAW_LIBS@
RMDelegate = @RMDelegate@
RPM = @RPM@
RSVGDecodeDelegate = @RSVGDecodeDelegate@
Expand Down
144 changes: 141 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,12 @@ CAIRO_SVG_LIBS
CAIRO_SVG_CFLAGS
RSVG_LIBS
RSVG_CFLAGS
RAW_LIBS
RAW_CFLAGS
RAW_DELEGATE_FALSE
RAW_DELEGATE_TRUE
LIBRAW_LIBS
LIBRAW_CFLAGS
PNG_DELEGATE_FALSE
PNG_DELEGATE_TRUE
PNG_LIBS
Expand Down Expand Up @@ -1217,6 +1223,7 @@ with_lzma
with_openexr
with_pango
with_png
with_LibRaw
with_rsvg
with_tiff
with_webp
Expand Down Expand Up @@ -1273,6 +1280,8 @@ PANGO_CFLAGS
PANGO_LIBS
PNG_CFLAGS
PNG_LIBS
LIBRAW_CFLAGS
LIBRAW_LIBS
RSVG_CFLAGS
RSVG_LIBS
CAIRO_SVG_CFLAGS
Expand Down Expand Up @@ -2019,6 +2028,7 @@ Optional Packages:
--without-openexr disable OpenEXR support
--without-pango disable PANGO support
--without-png disable PNG support
--without-raw disable Raw support
--with-rsvg enable RSVG support
--without-tiff disable TIFF support
--without-webp disable WEBP support
Expand Down Expand Up @@ -2092,6 +2102,9 @@ Some influential environment variables:
PANGO_LIBS linker flags for PANGO, overriding pkg-config
PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
PNG_LIBS linker flags for PNG, overriding pkg-config
LIBRAW_CFLAGS
C compiler flags for LIBRAW, overriding pkg-config
LIBRAW_LIBS linker flags for LIBRAW, overriding pkg-config
RSVG_CFLAGS C compiler flags for RSVG, overriding pkg-config
RSVG_LIBS linker flags for RSVG, overriding pkg-config
CAIRO_SVG_CFLAGS
Expand Down Expand Up @@ -4519,7 +4532,7 @@ MAGICK_PATCHLEVEL_VERSION=1

MAGICK_VERSION=7.0.6-1

MAGICK_GIT_REVISION=20383:6421a7175:20170712
MAGICK_GIT_REVISION=20419:f94b084a6:20170714


# Substitute library versioning
Expand Down Expand Up @@ -32508,7 +32521,6 @@ fi
# Check for JBIG delegate library.
#


# Check whether --with-jbig was given.
if test "${with_jbig+set}" = set; then :
withval=$with_jbig; with_jbig=$withval
Expand Down Expand Up @@ -33701,6 +33713,123 @@ fi



#
# Check for the Raw delegate library.
#

# Check whether --with-LibRaw was given.
if test "${with_LibRaw+set}" = set; then :
withval=$with_LibRaw; with_raw=$withval
else
with_raw='yes'
fi


if test "$with_raw" != 'yes'; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-libraw=$with_raw "
fi

have_raw='no'
RAW_CFLAGS=""
RAW_LIBS=""
RAW_PKG=""
if test "x$with_raw" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }

pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBRAW" >&5
$as_echo_n "checking for LIBRAW... " >&6; }

if test -n "$LIBRAW_CFLAGS"; then
pkg_cv_LIBRAW_CFLAGS="$LIBRAW_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libraw >= 0.14.8\""; } >&5
($PKG_CONFIG --exists --print-errors "libraw >= 0.14.8") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBRAW_CFLAGS=`$PKG_CONFIG --cflags "libraw >= 0.14.8" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$LIBRAW_LIBS"; then
pkg_cv_LIBRAW_LIBS="$LIBRAW_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libraw >= 0.14.8\""; } >&5
($PKG_CONFIG --exists --print-errors "libraw >= 0.14.8") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBRAW_LIBS=`$PKG_CONFIG --libs "libraw >= 0.14.8" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi



if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
LIBRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libraw >= 0.14.8" 2>&1`
else
LIBRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libraw >= 0.14.8" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBRAW_PKG_ERRORS" >&5

have_raw=no
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
have_raw=no
else
LIBRAW_CFLAGS=$pkg_cv_LIBRAW_CFLAGS
LIBRAW_LIBS=$pkg_cv_LIBRAW_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
have_raw=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi

if test "$have_raw" = 'yes'; then

$as_echo "#define RAW_DELEGATE 1" >>confdefs.h

CFLAGS="$RAW_CFLAGS $CFLAGS"
fi

if test "$have_raw" = 'yes'; then
RAW_DELEGATE_TRUE=
RAW_DELEGATE_FALSE='#'
else
RAW_DELEGATE_TRUE='#'
RAW_DELEGATE_FALSE=
fi





#
# Check for RSVG delegate library.
#
Expand Down Expand Up @@ -37466,6 +37595,9 @@ fi
if test "$have_ps" = 'yes' ; then
MAGICK_DELEGATES="$MAGICK_DELEGATES ps"
fi
if test "$have_raw" = 'yes' ; then
MAGICK_DELEGATES="$MAGICK_DELEGATES raw"
fi
if test "$have_raqm" = 'yes' ; then
MAGICK_DELEGATES="$MAGICK_DELEGATES raqm"
fi
Expand Down Expand Up @@ -37635,7 +37767,7 @@ fi
if test "$build_modules" != 'no'; then
MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
else
MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
fi


Expand Down Expand Up @@ -38006,6 +38138,10 @@ if test -z "${PNG_DELEGATE_TRUE}" && test -z "${PNG_DELEGATE_FALSE}"; then
as_fn_error $? "conditional \"PNG_DELEGATE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${RAW_DELEGATE_TRUE}" && test -z "${RAW_DELEGATE_FALSE}"; then
as_fn_error $? "conditional \"RAW_DELEGATE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${RSVG_DELEGATE_TRUE}" && test -z "${RSVG_DELEGATE_FALSE}"; then
as_fn_error $? "conditional \"RSVG_DELEGATE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down Expand Up @@ -40672,6 +40808,7 @@ matches your expectations.
PERL --with-perl=$with_perl $have_perl
PNG --with-png=$with_png $have_png
RAQM --with-raqm=$with_raqm $have_raqm
RAW --with-raw=$with_raw $have_raw
RSVG --with-rsvg=$with_rsvg $have_rsvg
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
Expand Down Expand Up @@ -40759,6 +40896,7 @@ matches your expectations.
PERL --with-perl=$with_perl $have_perl
PNG --with-png=$with_png $have_png
RAQM --with-raqm=$with_raqm $have_raqm
RAW --with-raw=$with_raw $have_raw
RSVG --with-rsvg=$with_rsvg $have_rsvg
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
Expand Down
41 changes: 39 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,6 @@ dnl ===========================================================================
#
# Check for JBIG delegate library.
#

AC_ARG_WITH([jbig],
[AC_HELP_STRING([--without-jbig],
[disable JBIG support])],
Expand Down Expand Up @@ -2596,6 +2595,40 @@ AC_SUBST(PNG_LIBS)

dnl ===========================================================================

#
# Check for the Raw delegate library.
#
AC_ARG_WITH([LibRaw],
[AC_HELP_STRING([--without-raw],
[disable Raw support])],
[with_raw=$withval],
[with_raw='yes'])

if test "$with_raw" != 'yes'; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-libraw=$with_raw "
fi

have_raw='no'
RAW_CFLAGS=""
RAW_LIBS=""
RAW_PKG=""
if test "x$with_raw" = "xyes"; then
AC_MSG_RESULT([-------------------------------------------------------------])
PKG_CHECK_MODULES(LIBRAW,[libraw >= 0.14.8], have_raw=yes, have_raw=no)
AC_MSG_RESULT([])
fi

if test "$have_raw" = 'yes'; then
AC_DEFINE(RAW_DELEGATE,1,Define if you have LIBRAW library)
CFLAGS="$RAW_CFLAGS $CFLAGS"
fi

AM_CONDITIONAL(RAW_DELEGATE, test "$have_raw" = 'yes')
AC_SUBST(RAW_CFLAGS)
AC_SUBST(RAW_LIBS)

dnl ===========================================================================

#
# Check for RSVG delegate library.
#
Expand Down Expand Up @@ -3685,6 +3718,9 @@ fi
if test "$have_ps" = 'yes' ; then
MAGICK_DELEGATES="$MAGICK_DELEGATES ps"
fi
if test "$have_raw" = 'yes' ; then
MAGICK_DELEGATES="$MAGICK_DELEGATES raw"
fi
if test "$have_raqm" = 'yes' ; then
MAGICK_DELEGATES="$MAGICK_DELEGATES raqm"
fi
Expand Down Expand Up @@ -3766,7 +3802,7 @@ fi
if test "$build_modules" != 'no'; then
MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
else
MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
fi
AC_SUBST(MAGICK_DEP_LIBS)

Expand Down Expand Up @@ -3921,6 +3957,7 @@ matches your expectations.
PERL --with-perl=$with_perl $have_perl
PNG --with-png=$with_png $have_png
RAQM --with-raqm=$with_raqm $have_raqm
RAW --with-raw=$with_raw $have_raw
RSVG --with-rsvg=$with_rsvg $have_rsvg
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
Expand Down
3 changes: 3 additions & 0 deletions utilities/compare.1
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ Image Operators:
lightness rescaling using sigmoidal contrast enhancement
\-trim trim image edges

Image Channel Operators:
\-separate separate an image channel into a grayscale image

Image Sequence Operators:
\-crop geometry cut out a rectangular region of the image
\-write filename write images to this file
Expand Down
1 change: 0 additions & 1 deletion utilities/convert.1
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ Image Operators:
\-white-threshold value
force all pixels above the threshold into white


Image Channel Operators:
\-channel-fx expression
exchange, extract, or transfer one or more image channels
Expand Down

0 comments on commit cefed48

Please sign in to comment.