INCLUDEARCH_PATH
INCLUDE_PATH
PERLMAINCC
-XML_LIBS
XML_DELEGATE_FALSE
XML_DELEGATE_TRUE
-xml2_config
-WMF_LIBS_DEPS
-WMF_LIBS
+XML_LIBS
+XML_CFLAGS
WMF_DELEGATE_FALSE
WMF_DELEGATE_TRUE
+WMF_LIBS
+WMF_CFLAGS
WEBP_LIBS
WEBP_DELEGATE_FALSE
WEBP_DELEGATE_TRUE
CAIRO_SVG_CFLAGS
RSVG_LIBS
RSVG_CFLAGS
-PNG_LIBS
PNG_DELEGATE_FALSE
PNG_DELEGATE_TRUE
+PNG_LIBS
+PNG_CFLAGS
PANGOCAIRO_DELEGATE_FALSE
PANGOCAIRO_DELEGATE_TRUE
PANGO_DELEGATE_FALSE
LIBOPENJP2_DELEGATE_TRUE
LIBOPENJP2_LIBS
LIBOPENJP2_CFLAGS
-LCMS_LIBS
LCMS_DELEGATE_FALSE
LCMS_DELEGATE_TRUE
+LCMS_LIBS
+LCMS_CFLAGS
JPEG_LIBS
JPEG_DELEGATE_FALSE
JPEG_DELEGATE_TRUE
FONTCONFIG_LIBS
FONTCONFIG_CFLAGS
DJVU_LIBS
+DJVU_CFLAGS
DJVU_DELEGATE_FALSE
DJVU_DELEGATE_TRUE
+ddjvuapi_LIBS
+ddjvuapi_CFLAGS
FPX_LIBS
FPX_DELEGATE_FALSE
FPX_DELEGATE_TRUE
FFTW_LIBS
+FFTW_CFLAGS
FFTW_DELEGATE_FALSE
FFTW_DELEGATE_TRUE
+fftw3_LIBS
+fftw3_CFLAGS
DPS_LIBS
DPS_DELEGATE_FALSE
DPS_DELEGATE_TRUE
LIB_DL
WITH_LTDL_FALSE
WITH_LTDL_TRUE
-ZLIB_LIBS
ZLIB_DELEGATE_FALSE
ZLIB_DELEGATE_TRUE
+ZLIB_LIBS
+ZLIB_CFLAGS
XEXT_LIBS
X11_LIBS
X11_DELEGATE_FALSE
with_jbig
with_jpeg
with_lcms
-with_lcms2
with_openjp2
with_lqr
with_lzma
PKG_CONFIG_LIBDIR
CXXCPP
XMKMF
+ZLIB_CFLAGS
+ZLIB_LIBS
AUTOTRACE_CFLAGS
AUTOTRACE_LIBS
+fftw3_CFLAGS
+fftw3_LIBS
+ddjvuapi_CFLAGS
+ddjvuapi_LIBS
FONTCONFIG_CFLAGS
FONTCONFIG_LIBS
FREETYPE_CFLAGS
FREETYPE_LIBS
GVC_CFLAGS
GVC_LIBS
+LCMS_CFLAGS
+LCMS_LIBS
LIBOPENJP2_CFLAGS
LIBOPENJP2_LIBS
LQR_CFLAGS
OPENEXR_LIBS
PANGO_CFLAGS
PANGO_LIBS
+PNG_CFLAGS
+PNG_LIBS
RSVG_CFLAGS
RSVG_LIBS
CAIRO_SVG_CFLAGS
-CAIRO_SVG_LIBS'
+CAIRO_SVG_LIBS
+WMF_CFLAGS
+WMF_LIBS
+XML_CFLAGS
+XML_LIBS'
# Initialize some variables set by options.
--without-jbig disable JBIG support
--without-jpeg disable JPEG support
--without-lcms disable lcms (v1.1X) support
- --without-lcms2 disable lcms (v2.X) support
--without-openjp2 disable OpenJP2 support
--without-lqr disable Liquid Rescale support
--without-lzma disable LZMA support
path overriding pkg-config's built-in search path
CXXCPP C++ preprocessor
XMKMF Path to xmkmf, Makefile generator for X Window System
+ ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
+ ZLIB_LIBS linker flags for ZLIB, overriding pkg-config
AUTOTRACE_CFLAGS
C compiler flags for AUTOTRACE, overriding pkg-config
AUTOTRACE_LIBS
linker flags for AUTOTRACE, overriding pkg-config
+ fftw3_CFLAGS
+ C compiler flags for fftw3, overriding pkg-config
+ fftw3_LIBS linker flags for fftw3, overriding pkg-config
+ ddjvuapi_CFLAGS
+ C compiler flags for ddjvuapi, overriding pkg-config
+ ddjvuapi_LIBS
+ linker flags for ddjvuapi, overriding pkg-config
FONTCONFIG_CFLAGS
C compiler flags for FONTCONFIG, overriding pkg-config
FONTCONFIG_LIBS
linker flags for FREETYPE, overriding pkg-config
GVC_CFLAGS C compiler flags for GVC, overriding pkg-config
GVC_LIBS linker flags for GVC, overriding pkg-config
+ LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
+ LCMS_LIBS linker flags for LCMS, overriding pkg-config
LIBOPENJP2_CFLAGS
C compiler flags for LIBOPENJP2, overriding pkg-config
LIBOPENJP2_LIBS
PANGO_CFLAGS
C compiler flags for PANGO, overriding pkg-config
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
RSVG_CFLAGS C compiler flags for RSVG, overriding pkg-config
RSVG_LIBS linker flags for RSVG, overriding pkg-config
CAIRO_SVG_CFLAGS
C compiler flags for CAIRO_SVG, overriding pkg-config
CAIRO_SVG_LIBS
linker flags for CAIRO_SVG, overriding pkg-config
+ WMF_CFLAGS C compiler flags for WMF, overriding pkg-config
+ WMF_LIBS linker flags for WMF, overriding pkg-config
+ XML_CFLAGS C compiler flags for XML, overriding pkg-config
+ XML_LIBS linker flags for XML, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
MAGICK_VERSION=7.0.0-0
-MAGICK_SVN_REVISION=18723M
+MAGICK_SVN_REVISION=18729M
# Substitute library versioning
fi
have_zlib='no'
-ZLIB_LIBS=''
-if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ZLIB_CFLAGS=""
+ZLIB_LIBS=""
+ZLIB_PKG=""
+if test "x$with_zlib" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5
-$as_echo_n "checking for ZLIB... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
- ZLIB_LIBS=''
- failed=0
- passed=0
- ac_fn_c_check_header_mongrel "$LINENO" "zconf.h" "ac_cv_header_zconf_h" "$ac_includes_default"
-if test "x$ac_cv_header_zconf_h" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
-
- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
-$as_echo_n "checking for compress in -lz... " >&6; }
-if ${ac_cv_lib_z_compress+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char compress ();
-int
-main ()
-{
-return compress ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_compress=yes
-else
- ac_cv_lib_z_compress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
-$as_echo "$ac_cv_lib_z_compress" >&6; }
-if test "x$ac_cv_lib_z_compress" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
-$as_echo_n "checking for uncompress in -lz... " >&6; }
-if ${ac_cv_lib_z_uncompress+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5
+$as_echo_n "checking for ZLIB... " >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uncompress ();
-int
-main ()
-{
-return uncompress ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_uncompress=yes
+if test -n "$ZLIB_CFLAGS"; then
+ pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- ac_cv_lib_z_uncompress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ pkg_failed=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
-if test "x$ac_cv_lib_z_uncompress" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ else
+ pkg_failed=untried
fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
-$as_echo_n "checking for deflate in -lz... " >&6; }
-if ${ac_cv_lib_z_deflate+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char deflate ();
-int
-main ()
-{
-return deflate ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_deflate=yes
+if test -n "$ZLIB_LIBS"; then
+ pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- ac_cv_lib_z_deflate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ pkg_failed=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
-$as_echo "$ac_cv_lib_z_deflate" >&6; }
-if test "x$ac_cv_lib_z_deflate" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ else
+ pkg_failed=untried
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
-$as_echo_n "checking for inflate in -lz... " >&6; }
-if ${ac_cv_lib_z_inflate+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inflate ();
-int
-main ()
-{
-return inflate ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_inflate=yes
-else
- ac_cv_lib_z_inflate=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
-$as_echo "$ac_cv_lib_z_inflate" >&6; }
-if test "x$ac_cv_lib_z_inflate" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzseek in -lz" >&5
-$as_echo_n "checking for gzseek in -lz... " >&6; }
-if ${ac_cv_lib_z_gzseek+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gzseek ();
-int
-main ()
-{
-return gzseek ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_gzseek=yes
-else
- ac_cv_lib_z_gzseek=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzseek" >&5
-$as_echo "$ac_cv_lib_z_gzseek" >&6; }
-if test "x$ac_cv_lib_z_gzseek" = xyes; then :
- passed=`expr $passed + 1`
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- failed=`expr $failed + 1`
+ _pkg_short_errors_supported=no
fi
+ if test $_pkg_short_errors_supported = yes; then
+ ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.0.0" 2>&1`
+ else
+ ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.0.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ZLIB_PKG_ERRORS" >&5
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gztell in -lz" >&5
-$as_echo_n "checking for gztell in -lz... " >&6; }
-if ${ac_cv_lib_z_gztell+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gztell ();
-int
-main ()
-{
-return gztell ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_gztell=yes
+ have_zlib=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_zlib=no
else
- ac_cv_lib_z_gztell=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
+ ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_zlib=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gztell" >&5
-$as_echo "$ac_cv_lib_z_gztell" >&6; }
-if test "x$ac_cv_lib_z_gztell" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZLIB package is complete" >&5
-$as_echo_n "checking if ZLIB package is complete... " >&6; }
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_zlib='no (failed tests)'
- else
- ZLIB_LIBS='-lz'
- LIBS="$ZLIB_LIBS $LIBS"
+if test "$have_zlib" = 'yes'; then
$as_echo "#define ZLIB_DELEGATE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_zlib='yes'
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+ CFLAGS="$ZLIB_CFLAGS $CFLAGS"
fi
+
if test "$have_zlib" = 'yes'; then
ZLIB_DELEGATE_TRUE=
ZLIB_DELEGATE_FALSE='#'
+
+
# whether modules are built or not.
with_ltdl='yes'
have_ltdl='no'
AUTOTRACE_LIBS=""
AUTOTRACE_PKG=""
if test "x$with_autotrace" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_autotrace=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
if test "$have_autotrace" = 'yes'; then
- failed=0
$as_echo "#define AUTOTRACE_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$AUTOTRACE_CFLAGS $CFLAGS"
fi
if test "$have_autotrace" = 'yes'; then
fi
have_fftw='no'
-FFTW_LIBS=''
-if test "$with_fftw" != 'no'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+FFTW_CFLAGS=""
+FFTW_LIBS=""
+FFTW_PKG=""
+if test "x$with_fftw" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFTW" >&5
-$as_echo_n "checking for FFTW... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
- failed=0
- passed=0
- ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
-if test "x$ac_cv_header_fftw3_h" = xyes; then :
- passed=`expr $passed + 1`
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw3" >&5
+$as_echo_n "checking for fftw3... " >&6; }
+
+if test -n "$fftw3_CFLAGS"; then
+ pkg_cv_fftw3_CFLAGS="$fftw3_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fftw3 >= 3.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fftw3 >= 3.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_fftw3_CFLAGS=`$PKG_CONFIG --cflags "fftw3 >= 3.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- failed=`expr $failed + 1`
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$fftw3_LIBS"; then
+ pkg_cv_fftw3_LIBS="$fftw3_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fftw3 >= 3.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fftw3 >= 3.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_fftw3_LIBS=`$PKG_CONFIG --libs "fftw3 >= 3.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
-$as_echo_n "checking for fftw_execute in -lfftw3... " >&6; }
-if ${ac_cv_lib_fftw3_fftw_execute+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfftw3 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char fftw_execute ();
-int
-main ()
-{
-return fftw_execute ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_fftw3_fftw_execute=yes
+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
- ac_cv_lib_fftw3_fftw_execute=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ _pkg_short_errors_supported=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
-$as_echo "$ac_cv_lib_fftw3_fftw_execute" >&6; }
-if test "x$ac_cv_lib_fftw3_fftw_execute" = xyes; then :
- passed=`expr $passed + 1`
+ if test $_pkg_short_errors_supported = yes; then
+ fftw3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fftw3 >= 3.0.0" 2>&1`
+ else
+ fftw3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fftw3 >= 3.0.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$fftw3_PKG_ERRORS" >&5
+
+ have_fftw=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_fftw=no
else
- failed=`expr $failed + 1`
+ fftw3_CFLAGS=$pkg_cv_fftw3_CFLAGS
+ fftw3_LIBS=$pkg_cv_fftw3_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_fftw=yes
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FFTW package is complete" >&5
-$as_echo_n "checking if FFTW package is complete... " >&6; }
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_fftw='no (failed tests)'
- else
- FFTW_LIBS='-lfftw3'
- LIBS="$FFTW_LIBS $LIBS"
+if test "$have_fftw" = 'yes'; then
$as_echo "#define FFTW_DELEGATE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_fftw='yes'
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+ CFLAGS="$fftw3_CFLAGS $CFLAGS"
fi
+
if test "$have_fftw" = 'yes'; then
FFTW_DELEGATE_TRUE=
FFTW_DELEGATE_FALSE='#'
+
#
# Check for FlashPIX delegate library.
#
fi
have_djvu='no'
-DJVU_LIBS=''
-if test "$with_djvu" != 'no'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+DJVU_CFLAGS=""
+DJVU_LIBS=""
+DJVU_PKG=""
+if test "x$with_djvu" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DJVU" >&5
-$as_echo_n "checking for DJVU... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
- failed=0
- passed=0
- ac_fn_c_check_header_mongrel "$LINENO" "libdjvu/ddjvuapi.h" "ac_cv_header_libdjvu_ddjvuapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_libdjvu_ddjvuapi_h" = xyes; then :
- passed=`expr $passed + 1`
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ddjvuapi" >&5
+$as_echo_n "checking for ddjvuapi... " >&6; }
+
+if test -n "$ddjvuapi_CFLAGS"; then
+ pkg_cv_ddjvuapi_CFLAGS="$ddjvuapi_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ddjvuapi >= 3.5.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ddjvuapi >= 3.5.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ddjvuapi_CFLAGS=`$PKG_CONFIG --cflags "ddjvuapi >= 3.5.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- failed=`expr $failed + 1`
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$ddjvuapi_LIBS"; then
+ pkg_cv_ddjvuapi_LIBS="$ddjvuapi_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ddjvuapi >= 3.5.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ddjvuapi >= 3.5.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ddjvuapi_LIBS=`$PKG_CONFIG --libs "ddjvuapi >= 3.5.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ddjvu_context_create in -ldjvulibre" >&5
-$as_echo_n "checking for ddjvu_context_create in -ldjvulibre... " >&6; }
-if ${ac_cv_lib_djvulibre_ddjvu_context_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldjvulibre $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ddjvu_context_create ();
-int
-main ()
-{
-return ddjvu_context_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_djvulibre_ddjvu_context_create=yes
+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
- ac_cv_lib_djvulibre_ddjvu_context_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ _pkg_short_errors_supported=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_djvulibre_ddjvu_context_create" >&5
-$as_echo "$ac_cv_lib_djvulibre_ddjvu_context_create" >&6; }
-if test "x$ac_cv_lib_djvulibre_ddjvu_context_create" = xyes; then :
- passed=`expr $passed + 1`
+ if test $_pkg_short_errors_supported = yes; then
+ ddjvuapi_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ddjvuapi >= 3.5.0" 2>&1`
+ else
+ ddjvuapi_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ddjvuapi >= 3.5.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ddjvuapi_PKG_ERRORS" >&5
+
+ have_djvu=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_djvu=no
else
- failed=`expr $failed + 1`
+ ddjvuapi_CFLAGS=$pkg_cv_ddjvuapi_CFLAGS
+ ddjvuapi_LIBS=$pkg_cv_ddjvuapi_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_djvu=yes
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DJVU package is complete" >&5
-$as_echo_n "checking if DJVU package is complete... " >&6; }
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_djvu='no (failed tests)'
- else
- DJVU_LIBS='-ldjvulibre'
- LIBS="$DJVU_LIBS $LIBS"
+if test "$have_djvu" = 'yes'; then
$as_echo "#define DJVU_DELEGATE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_djvu='yes'
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+ CFLAGS="$DDJVUAPI_CFLAGS $CFLAGS"
fi
+
if test "$have_djvu" = 'yes'; then
DJVU_DELEGATE_TRUE=
DJVU_DELEGATE_FALSE='#'
+
#
# Check for fontconfig delegate library.
#
FONTCONFIG_LIBS=""
FONTCONFIG_PKG=""
if test "x$with_fontconfig" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_fontconfig=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define FONTCONFIG_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$FONTCONFIG_CFLAGS $CFLAGS"
fi
if test "$have_fontconfig" = 'yes'; then
FREETYPE_LIBS=""
FREETYPE_PKG=""
if test "x$with_freetype" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_freetype=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define FREETYPE_DELEGATE 1" >>confdefs.h
- CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
+ CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
fi
if test "$have_freetype" = 'yes'; then
GVC_PKG=""
if test "x$with_gvc" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_gvc=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define GVC_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$GVC_CFLAGS $CFLAGS"
fi
if test "$have_gvc" = 'yes'; then
#
# Check for LCMS delegate library.
#
-# Disable LCMS.
# Check whether --with-lcms was given.
if test "${with_lcms+set}" = set; then :
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
fi
-# Disable LCMS2.
+have_lcms='no'
+LCMS_CFLAGS=""
+LCMS_LIBS=""
+LCMS_PKG=""
+if test "x$with_lcms" = "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 LCMS" >&5
+$as_echo_n "checking for LCMS... " >&6; }
-# Check whether --with-lcms2 was given.
-if test "${with_lcms2+set}" = set; then :
- withval=$with_lcms2; with_lcms2=$withval
+if test -n "$LCMS_CFLAGS"; then
+ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms >= 1.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- with_lcms2='yes'
+ pkg_failed=yes
fi
-
-if test "$with_lcms2" != 'yes' ; then
- DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
+ else
+ pkg_failed=untried
fi
-
-have_lcms2='no'
-LCMS_LIBS=''
-if test "$with_lcms2" != 'no'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
-$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS v2" >&5
-$as_echo_n "checking for LCMS v2... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
- failed=0
- passed=0
- have_lcms_header='no'
-
- # Check for <lcms2.h>
- ac_fn_c_check_header_mongrel "$LINENO" "lcms2.h" "ac_cv_header_lcms2_h" "$ac_includes_default"
-if test "x$ac_cv_header_lcms2_h" = xyes; then :
- have_lcms_header='yes'
+if test -n "$LCMS_LIBS"; then
+ pkg_cv_LCMS_LIBS="$LCMS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms >= 1.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
fi
-
-
- if test "$have_lcms_header" = 'yes'; then
-
-$as_echo "#define HAVE_LCMS2_H 1" >>confdefs.h
-
- passed=`expr $passed + 1`
- fi
-
- # Check for <lcms2/lcms2.h)
- if test "$have_lcms_header" != 'yes'; then
- ac_fn_c_check_header_mongrel "$LINENO" "lcms2/lcms2.h" "ac_cv_header_lcms2_lcms2_h" "$ac_includes_default"
-if test "x$ac_cv_header_lcms2_lcms2_h" = xyes; then :
- have_lcms_header='yes'
+ else
+ pkg_failed=untried
fi
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
-
-$as_echo "#define HAVE_LCMS2_LCMS2_H 1" >>confdefs.h
-
- fi
- fi
-
- # Failed to find lcms header?
- if test "$have_lcms_header" != 'yes'; then
- failed=`expr $failed + 1`
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsSetLogErrorHandler in -llcms2" >&5
-$as_echo_n "checking for cmsSetLogErrorHandler in -llcms2... " >&6; }
-if ${ac_cv_lib_lcms2_cmsSetLogErrorHandler+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-llcms2 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cmsSetLogErrorHandler ();
-int
-main ()
-{
-return cmsSetLogErrorHandler ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_lcms2_cmsSetLogErrorHandler=yes
-else
- ac_cv_lib_lcms2_cmsSetLogErrorHandler=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lcms2_cmsSetLogErrorHandler" >&5
-$as_echo "$ac_cv_lib_lcms2_cmsSetLogErrorHandler" >&6; }
-if test "x$ac_cv_lib_lcms2_cmsSetLogErrorHandler" = xyes; then :
- passed=`expr $passed + 1`
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- failed=`expr $failed + 1`
+ _pkg_short_errors_supported=no
fi
+ if test $_pkg_short_errors_supported = yes; then
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms >= 1.0.0" 2>&1`
+ else
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms >= 1.0.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LCMS_PKG_ERRORS" >&5
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LCMS v2 package is complete" >&5
-$as_echo_n "checking if LCMS v2 package is complete... " >&6; }
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_lcms2='no (failed tests)'
- else
- LCMS_LIBS='-llcms2'
- LIBS="$LCMS_LIBS $LIBS"
+ have_lcms=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_lcms=no
+else
+ LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
+ LCMS_LIBS=$pkg_cv_LCMS_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_lcms2='yes'
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-fi
-
-#
-# Check for LCMS v1 (1.11 or later)
-#
-if test $have_lcms2 = 'yes'; then
- with_lcms='no'
+ have_lcms=yes
fi
-
-have_lcms='no'
-if test "$with_lcms" != 'no'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
-$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS v1.1X" >&5
-$as_echo_n "checking for LCMS v1.1X... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- failed=0
- passed=0
- have_lcms_header='no'
-
- # Check for <lcms.h>
- if test "$have_lcms_header" != 'yes'; then
- ac_fn_c_check_header_mongrel "$LINENO" "lcms.h" "ac_cv_header_lcms_h" "$ac_includes_default"
-if test "x$ac_cv_header_lcms_h" = xyes; then :
- have_lcms_header='yes'
fi
+if test "$have_lcms" = 'yes'; then
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
-
-$as_echo "#define HAVE_LCMS_H 1" >>confdefs.h
-
- fi
- fi
-
- # Check for <lcms/lcms.h>
- if test "$have_lcms_header" != 'yes'; then
- ac_fn_c_check_header_mongrel "$LINENO" "lcms/lcms.h" "ac_cv_header_lcms_lcms_h" "$ac_includes_default"
-if test "x$ac_cv_header_lcms_lcms_h" = xyes; then :
- have_lcms_header='yes'
-fi
-
-
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
-
-$as_echo "#define HAVE_LCMS_LCMS_H 1" >>confdefs.h
-
- fi
- fi
-
- # Failed to find lcms header?
- if test "$have_lcms_header" != 'yes'; then
- failed=`expr $failed + 1`
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmsSetErrorHandler in -llcms" >&5
-$as_echo_n "checking for cmsSetErrorHandler in -llcms... " >&6; }
-if ${ac_cv_lib_lcms_cmsSetErrorHandler+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-llcms $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cmsSetErrorHandler ();
-int
-main ()
-{
-return cmsSetErrorHandler ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_lcms_cmsSetErrorHandler=yes
-else
- ac_cv_lib_lcms_cmsSetErrorHandler=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lcms_cmsSetErrorHandler" >&5
-$as_echo "$ac_cv_lib_lcms_cmsSetErrorHandler" >&6; }
-if test "x$ac_cv_lib_lcms_cmsSetErrorHandler" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
+$as_echo "#define LCMS_DELEGATE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LCMS package is complete" >&5
-$as_echo_n "checking if LCMS package is complete... " >&6; }
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_lcms='no (failed tests)'
- else
- LCMS_LIBS='-llcms'
- LIBS="$LCMS_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_lcms='yes'
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+ CFLAGS="$LCMS_CFLAGS $CFLAGS"
fi
- if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
+ if test "$have_lcms" = 'yes'; then
LCMS_DELEGATE_TRUE=
LCMS_DELEGATE_FALSE='#'
else
LCMS_DELEGATE_FALSE=
fi
-if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
-
-$as_echo "#define LCMS_DELEGATE 1" >>confdefs.h
-
-fi
LIBOPENJP2_LIBS=""
LIBOPENJP2_PKG=""
if test "x$with_openjp2" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_openjp2=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define LIBOPENJP2_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
- fi
+ CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
fi
if test "$have_openjp2" = 'yes'; then
LQR_LIBS=""
LQR_PKG=""
if test "x$with_lqr" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_lqr=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define LQR_DELEGATE 1" >>confdefs.h
- CFLAGS="$LQR_CFLAGS $CFLAGS"
+ CFLAGS="$LQR_CFLAGS $CFLAGS"
fi
if test "$have_lqr" = 'yes'; then
LZMA_PKG=""
if test "x$with_lzma" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_lzma=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define LZMA_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$LZMA_CFLAGS $CFLAGS"
fi
if test "$have_lzma" = 'yes'; then
OPENEXR_LIBS=""
OPENEXR_PKG=""
if test "x$with_openexr" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_openexr=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define OPENEXR_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
- fi
+ CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
fi
if test "$have_openexr" = 'yes'; then
PANGO_LIBS=""
PANGO_PKG=""
if test "x$with_pango" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_pangocairo=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_pango=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define PANGO_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$PANGO_CFLAGS $CFLAGS"
fi
if test "$have_pangocairo" = 'yes'; then
$as_echo "#define PANGOCAIRO_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$PANGOCAIRO_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
fi
if test "$have_pango" = 'yes'; then
fi
have_png='no'
-PNG_LIBS=''
-
-if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
+PNG_CFLAGS=""
+PNG_LIBS=""
+PNG_PKG=""
+if test "x$with_png" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG support " >&5
-$as_echo_n "checking for PNG support ... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
- failed=0
- passed=0
- ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
-if test "x$ac_cv_header_png_h" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
-
-
- if test $passed -gt 0; then
- for var in 7 6 5 4 2 '' ; do
- if test "$have_png" = 'no' ; then
- if test "x${var}" = 'x' ; then
- pnglib='png'
- else
- pnglib="png1${var}"
- fi
-
-# Test for compatible LIBPNG library
- failed=0
- passed=0
- if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
- if test "${pnglib}" != 'png' ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG1${var} support " >&5
-$as_echo_n "checking for LIBPNG1${var} support ... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-#include <stdlib.h>
-#include <png.h>
-
-int
-main ()
-{
-
-#if PNG_LIBPNG_VER_MINOR != ${var}
-#error LIBPNG library must be version 1${var}!
-Kaboom, Kaboom
-#endif
-return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_libpng_ok='yes'
-else
- ac_cv_libpng_ok='no'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$ac_cv_libpng_ok" = 'yes' ; then
- passed=`expr $passed + 1`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- failed=`expr $failed + 1`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- else
- passed=`expr $passed + 1`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- fi
-
- if test $passed -gt 0 -a $failed -le 0; then
- if test "1${var}" = '17' ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng17" >&5
-$as_echo_n "checking for png_get_io_ptr in -lpng17... " >&6; }
-if ${ac_cv_lib_png17_png_get_io_ptr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng17 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_get_io_ptr ();
-int
-main ()
-{
-return png_get_io_ptr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png17_png_get_io_ptr=yes
-else
- ac_cv_lib_png17_png_get_io_ptr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png17_png_get_io_ptr" >&5
-$as_echo "$ac_cv_lib_png17_png_get_io_ptr" >&6; }
-if test "x$ac_cv_lib_png17_png_get_io_ptr" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_longjmp in -lpng17" >&5
-$as_echo_n "checking for png_longjmp in -lpng17... " >&6; }
-if ${ac_cv_lib_png17_png_longjmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng17 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_longjmp ();
-int
-main ()
-{
-return png_longjmp ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png17_png_longjmp=yes
-else
- ac_cv_lib_png17_png_longjmp=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png17_png_longjmp" >&5
-$as_echo "$ac_cv_lib_png17_png_longjmp" >&6; }
-if test "x$ac_cv_lib_png17_png_longjmp" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
- fi
- if test "1${var}" = '16' ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng16" >&5
-$as_echo_n "checking for png_get_io_ptr in -lpng16... " >&6; }
-if ${ac_cv_lib_png16_png_get_io_ptr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng16 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_get_io_ptr ();
-int
-main ()
-{
-return png_get_io_ptr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png16_png_get_io_ptr=yes
-else
- ac_cv_lib_png16_png_get_io_ptr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png16_png_get_io_ptr" >&5
-$as_echo "$ac_cv_lib_png16_png_get_io_ptr" >&6; }
-if test "x$ac_cv_lib_png16_png_get_io_ptr" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_longjmp in -lpng16" >&5
-$as_echo_n "checking for png_longjmp in -lpng16... " >&6; }
-if ${ac_cv_lib_png16_png_longjmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng16 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_longjmp ();
-int
-main ()
-{
-return png_longjmp ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png16_png_longjmp=yes
-else
- ac_cv_lib_png16_png_longjmp=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png16_png_longjmp" >&5
-$as_echo "$ac_cv_lib_png16_png_longjmp" >&6; }
-if test "x$ac_cv_lib_png16_png_longjmp" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
-
- fi
- if test "1${var}" = '15' ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng15" >&5
-$as_echo_n "checking for png_get_io_ptr in -lpng15... " >&6; }
-if ${ac_cv_lib_png15_png_get_io_ptr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng15 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_get_io_ptr ();
-int
-main ()
-{
-return png_get_io_ptr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png15_png_get_io_ptr=yes
-else
- ac_cv_lib_png15_png_get_io_ptr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png15_png_get_io_ptr" >&5
-$as_echo "$ac_cv_lib_png15_png_get_io_ptr" >&6; }
-if test "x$ac_cv_lib_png15_png_get_io_ptr" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_longjmp in -lpng15" >&5
-$as_echo_n "checking for png_longjmp in -lpng15... " >&6; }
-if ${ac_cv_lib_png15_png_longjmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng15 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
+$as_echo_n "checking for PNG... " >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_longjmp ();
-int
-main ()
-{
-return png_longjmp ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png15_png_longjmp=yes
+if test -n "$PNG_CFLAGS"; then
+ pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libpng >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng >= 1.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- ac_cv_lib_png15_png_longjmp=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ pkg_failed=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png15_png_longjmp" >&5
-$as_echo "$ac_cv_lib_png15_png_longjmp" >&6; }
-if test "x$ac_cv_lib_png15_png_longjmp" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ else
+ pkg_failed=untried
fi
-
- fi
- if test "1${var}" = '14' ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng14" >&5
-$as_echo_n "checking for png_get_io_ptr in -lpng14... " >&6; }
-if ${ac_cv_lib_png14_png_get_io_ptr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng14 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_get_io_ptr ();
-int
-main ()
-{
-return png_get_io_ptr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png14_png_get_io_ptr=yes
+if test -n "$PNG_LIBS"; then
+ pkg_cv_PNG_LIBS="$PNG_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libpng >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng >= 1.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- ac_cv_lib_png14_png_get_io_ptr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ pkg_failed=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png14_png_get_io_ptr" >&5
-$as_echo "$ac_cv_lib_png14_png_get_io_ptr" >&6; }
-if test "x$ac_cv_lib_png14_png_get_io_ptr" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ else
+ pkg_failed=untried
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_state in -lpng14" >&5
-$as_echo_n "checking for png_get_io_state in -lpng14... " >&6; }
-if ${ac_cv_lib_png14_png_get_io_state+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng14 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_get_io_state ();
-int
-main ()
-{
-return png_get_io_state ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png14_png_get_io_state=yes
-else
- ac_cv_lib_png14_png_get_io_state=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png14_png_get_io_state" >&5
-$as_echo "$ac_cv_lib_png14_png_get_io_state" >&6; }
-if test "x$ac_cv_lib_png14_png_get_io_state" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
- fi
- if test "1${var}" = '12' ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng12" >&5
-$as_echo_n "checking for png_get_io_ptr in -lpng12... " >&6; }
-if ${ac_cv_lib_png12_png_get_io_ptr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng12 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_get_io_ptr ();
-int
-main ()
-{
-return png_get_io_ptr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png12_png_get_io_ptr=yes
-else
- ac_cv_lib_png12_png_get_io_ptr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png12_png_get_io_ptr" >&5
-$as_echo "$ac_cv_lib_png12_png_get_io_ptr" >&6; }
-if test "x$ac_cv_lib_png12_png_get_io_ptr" = xyes; then :
- passed=`expr $passed + 1`
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- failed=`expr $failed + 1`
+ _pkg_short_errors_supported=no
fi
+ if test $_pkg_short_errors_supported = yes; then
+ PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng >= 1.0.0" 2>&1`
+ else
+ PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng >= 1.0.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$PNG_PKG_ERRORS" >&5
- fi
- if test "1${var}" = '1' ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_io_ptr in -lpng" >&5
-$as_echo_n "checking for png_get_io_ptr in -lpng... " >&6; }
-if ${ac_cv_lib_png_png_get_io_ptr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_get_io_ptr ();
-int
-main ()
-{
-return png_get_io_ptr ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_png_png_get_io_ptr=yes
+ have_png=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_png=no
else
- ac_cv_lib_png_png_get_io_ptr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
+ PNG_LIBS=$pkg_cv_PNG_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_png=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_io_ptr" >&5
-$as_echo "$ac_cv_lib_png_png_get_io_ptr" >&6; }
-if test "x$ac_cv_lib_png_png_get_io_ptr" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
fi
- fi
- if test $passed -gt 0 -a $failed -le 0 ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${pnglib} package is complete" >&5
-$as_echo_n "checking if ${pnglib} package is complete... " >&6; }
- if test $passed -gt 0 ; then
- if test $failed -gt 0 ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_png='no (failed tests)'
- else
- PNG_LIBS="-l${pnglib}"
- LIBS="$PNG_LIBS $LIBS"
+if test "$have_png" = 'yes'; then
$as_echo "#define PNG_DELEGATE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_png='yes'
- fi
- fi
- fi
- fi
- fi
- done
- fi
+ CFLAGS="$PNG_CFLAGS $CFLAGS"
fi
if test "$have_png" = 'yes'; then
RSVG_LIBS=""
RSVG_PKG=""
if test "x$with_rsvg" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_rsvg=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
pkg_failed=no
$as_echo "yes" >&6; }
have_cairo=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
$as_echo "#define RSVG_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$RSVG_CFLAGS $CFLAGS"
fi
if test "$have_cairo" = 'yes'; then
$as_echo "#define CAIRO_DELEGATE 1" >>confdefs.h
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$CAIRO_SVG_CFLAGS $CFLAGS"
fi
if test "$have_rsvg" = 'yes'; then
if test "${with_wmf+set}" = set; then :
withval=$with_wmf; with_wmf=$withval
else
- with_wmf='no'
+ with_wmf='yes'
fi
fi
have_wmf='no'
-WMF_LIBS=''
-WMF_LIBS_DEPS=''
-OLIBS="$LIBS"
-if test "$with_wmf" != 'no'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+WMF_CFLAGS=""
+WMF_LIBS=""
+WMF_PKG=""
+if test "x$with_wmf" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WMF" >&5
-$as_echo_n "checking for WMF... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
- have_libwmf='no'
- have_libwmflite='no'
- have_libwmf_ipa_h='no'
-
- ac_fn_c_check_header_compile "$LINENO" "libwmf/ipa.h" "ac_cv_header_libwmf_ipa_h" "$FT2BUILD_H
-"
-if test "x$ac_cv_header_libwmf_ipa_h" = xyes; then :
- have_libwmf_ipa_h='yes'
-fi
-
- if test "$have_libwmf_ipa_h" = 'yes'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmf_lite_create in -lwmflite" >&5
-$as_echo_n "checking for wmf_lite_create in -lwmflite... " >&6; }
-if ${ac_cv_lib_wmflite_wmf_lite_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lwmflite $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WMF" >&5
+$as_echo_n "checking for WMF... " >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char wmf_lite_create ();
-int
-main ()
-{
-return wmf_lite_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_wmflite_wmf_lite_create=yes
+if test -n "$WMF_CFLAGS"; then
+ pkg_cv_WMF_CFLAGS="$WMF_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wmf >= 0.2.8\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "wmf >= 0.2.8") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_WMF_CFLAGS=`$PKG_CONFIG --cflags "wmf >= 0.2.8" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- ac_cv_lib_wmflite_wmf_lite_create=no
+ pkg_failed=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ else
+ pkg_failed=untried
+fi
+if test -n "$WMF_LIBS"; then
+ pkg_cv_WMF_LIBS="$WMF_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wmf >= 0.2.8\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "wmf >= 0.2.8") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_WMF_LIBS=`$PKG_CONFIG --libs "wmf >= 0.2.8" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wmflite_wmf_lite_create" >&5
-$as_echo "$ac_cv_lib_wmflite_wmf_lite_create" >&6; }
-if test "x$ac_cv_lib_wmflite_wmf_lite_create" = xyes; then :
- have_libwmflite='yes'
+ else
+ pkg_failed=untried
fi
- if test "$have_libwmflite" = 'yes'; then
-$as_echo "#define WMFLITE_DELEGATE 1" >>confdefs.h
- WMF_LIBS='-lwmflite'
- LIBS="$WMF_LIBS $LIBS"
- have_wmf='yes'
- else
- WMF_LIBS_DEPS=''
- WMF_CONFIG_LIBS=`libwmf-config --libs`
- for lib in xml2 expat freetype jpeg png z; do
- testlib="-l${lib}"
- echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmf_api_create in -lwmf" >&5
-$as_echo_n "checking for wmf_api_create in -lwmf... " >&6; }
-if ${ac_cv_lib_wmf_wmf_api_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lwmf $WMF_LIBS_DEPS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char wmf_api_create ();
-int
-main ()
-{
-return wmf_api_create ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_wmf_wmf_api_create=yes
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- ac_cv_lib_wmf_wmf_api_create=no
+ _pkg_short_errors_supported=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ if test $_pkg_short_errors_supported = yes; then
+ WMF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "wmf >= 0.2.8" 2>&1`
+ else
+ WMF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "wmf >= 0.2.8" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$WMF_PKG_ERRORS" >&5
+
+ have_wmf=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_wmf=no
+else
+ WMF_CFLAGS=$pkg_cv_WMF_CFLAGS
+ WMF_LIBS=$pkg_cv_WMF_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_wmf=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wmf_wmf_api_create" >&5
-$as_echo "$ac_cv_lib_wmf_wmf_api_create" >&6; }
-if test "x$ac_cv_lib_wmf_wmf_api_create" = xyes; then :
- have_libwmf='yes'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
fi
- if test "$have_libwmf" = 'yes'; then
+if test "$have_wmf" = 'yes'; then
$as_echo "#define WMF_DELEGATE 1" >>confdefs.h
- WMF_LIBS='-lwmf'
- LIBS="$WMF_LIBS $LIBS"
- have_wmf='yes'
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_wmf='no (failed tests)'
- have_wmflite='no (failed tests)'
- LIBS="$OLIBS"
- WMF_LIBS=''
- fi
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if WMF package is complete" >&5
-$as_echo_n "checking if WMF package is complete... " >&6; }
- if test "$have_wmf" = 'yes'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+ CFLAGS="$WMF_CFLAGS $CFLAGS"
fi
+
if test "$have_wmf" = 'yes'; then
WMF_DELEGATE_TRUE=
WMF_DELEGATE_FALSE='#'
-
#
# Check for XML delegate library.
#
fi
have_xml='no'
-XML_LIBS=''
-if test "$with_xml" != 'no'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
+XML_CFLAGS=""
+XML_LIBS=""
+XML_PKG=""
+if test "x$with_xml" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5
$as_echo "-------------------------------------------------------------" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML" >&5
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML" >&5
$as_echo_n "checking for XML... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
- PERSIST_LDFLAGS=$LDFLAGS
- PERSIST_CPPFLAGS=$CPPFLAGS
- xml2_config=''
- # Extract the first word of "xml2-config", so it can be a program name with args.
-set dummy xml2-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_xml2_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $xml2_config in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_xml2_config="$xml2_config" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_xml2_config="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
- ;;
-esac
-fi
-xml2_config=$ac_cv_path_xml2_config
-if test -n "$xml2_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xml2_config" >&5
-$as_echo "$xml2_config" >&6; }
+if test -n "$XML_CFLAGS"; then
+ pkg_cv_XML_CFLAGS="$XML_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_XML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
-
- if test -n "$xml2_config"; then
- # Debian installs libxml headers under /usr/include/libxml2/libxml with
- # the shared library installed under /usr/lib, whereas the package
- # installs itself under $prefix/libxml and $prefix/lib.
- xml2_prefix=`${xml2_config} --prefix`
- if test -d "${xml2_prefix}/include/libxml2"; then
- CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
- fi
- if test "${xml2_prefix}" != '/usr'; then
- LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
- fi
- fi
- failed=0
- passed=0
- ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
-if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ else
+ pkg_failed=untried
fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSAXVersion in -lxml2" >&5
-$as_echo_n "checking for xmlSAXVersion in -lxml2... " >&6; }
-if ${ac_cv_lib_xml2_xmlSAXVersion+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml2 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xmlSAXVersion ();
-int
-main ()
-{
-return xmlSAXVersion ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_xml2_xmlSAXVersion=yes
+if test -n "$XML_LIBS"; then
+ pkg_cv_XML_LIBS="$XML_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_XML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- ac_cv_lib_xml2_xmlSAXVersion=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ pkg_failed=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSAXVersion" >&5
-$as_echo "$ac_cv_lib_xml2_xmlSAXVersion" >&6; }
-if test "x$ac_cv_lib_xml2_xmlSAXVersion" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
+ else
+ pkg_failed=untried
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlParseChunk in -lxml2" >&5
-$as_echo_n "checking for xmlParseChunk in -lxml2... " >&6; }
-if ${ac_cv_lib_xml2_xmlParseChunk+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml2 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xmlParseChunk ();
-int
-main ()
-{
-return xmlParseChunk ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_xml2_xmlParseChunk=yes
-else
- ac_cv_lib_xml2_xmlParseChunk=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlParseChunk" >&5
-$as_echo "$ac_cv_lib_xml2_xmlParseChunk" >&6; }
-if test "x$ac_cv_lib_xml2_xmlParseChunk" = xyes; then :
- passed=`expr $passed + 1`
-else
- failed=`expr $failed + 1`
-fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlCreatePushParserCtxt in -lxml2" >&5
-$as_echo_n "checking for xmlCreatePushParserCtxt in -lxml2... " >&6; }
-if ${ac_cv_lib_xml2_xmlCreatePushParserCtxt+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml2 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xmlCreatePushParserCtxt ();
-int
-main ()
-{
-return xmlCreatePushParserCtxt ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_xml2_xmlCreatePushParserCtxt=yes
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- ac_cv_lib_xml2_xmlCreatePushParserCtxt=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ _pkg_short_errors_supported=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlCreatePushParserCtxt" >&5
-$as_echo "$ac_cv_lib_xml2_xmlCreatePushParserCtxt" >&6; }
-if test "x$ac_cv_lib_xml2_xmlCreatePushParserCtxt" = xyes; then :
- passed=`expr $passed + 1`
+ if test $_pkg_short_errors_supported = yes; then
+ XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.0.0" 2>&1`
+ else
+ XML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.0.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$XML_PKG_ERRORS" >&5
+
+ have_xml=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_xml=no
else
- failed=`expr $failed + 1`
+ XML_CFLAGS=$pkg_cv_XML_CFLAGS
+ XML_LIBS=$pkg_cv_XML_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_xml=yes
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XML package is complete" >&5
-$as_echo_n "checking if XML package is complete... " >&6; }
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
-$as_echo "no -- some components failed test" >&6; }
- have_xml='no (failed tests)'
- LDFLAGS="$PERSIST_LDFLAGS"
- CPPFLAGS="$PERSIST_CPPFLAGS"
- else
- XML_LIBS='-lxml2'
- LIBS="$XML_LIBS $LIBS"
+if test "$have_xml" = 'yes'; then
$as_echo "#define XML_DELEGATE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_xml='yes'
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+ CFLAGS="$XML_CFLAGS $CFLAGS"
fi
+
if test "$have_xml" = 'yes'; then
XML_DELEGATE_TRUE=
XML_DELEGATE_FALSE='#'
+
# Substitute compiler name to build/link PerlMagick
#
#
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_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"
+ MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $fftw3_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 $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_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 $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DDJVUAP_LIBS $fftw3_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"
fi
#
# Sanitize output variables (asthetic).
#
-for variable in CC CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MAGICK_DEP_LIBS TESTED_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS; do
+for variable in CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PCFLAGS X_CFLAGS; do
sanitize=''
eval value=$`echo $variable`
for component in $value
fi
have_zlib='no'
-ZLIB_LIBS=''
-dnl PNG requires zlib so enable zlib check if PNG is requested
-if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for ZLIB])
- AC_MSG_RESULT([])
- ZLIB_LIBS=''
- failed=0
- passed=0
- AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
- AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
- AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING([if ZLIB package is complete])
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT([no -- some components failed test])
- have_zlib='no (failed tests)'
- else
- ZLIB_LIBS='-lz'
- LIBS="$ZLIB_LIBS $LIBS"
- AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
- AC_MSG_RESULT([yes])
- have_zlib='yes'
- fi
- else
- AC_MSG_RESULT([no])
- fi
+ZLIB_CFLAGS=""
+ZLIB_LIBS=""
+ZLIB_PKG=""
+if test "x$with_zlib" = "xyes"; then
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(ZLIB,[zlib >= 1.0.0], have_zlib=yes, have_zlib=no)
+ AC_MSG_RESULT([])
fi
+
+if test "$have_zlib" = 'yes'; then
+ AC_DEFINE(ZLIB_DELEGATE,1,Define if you have ZLIB library)
+ CFLAGS="$ZLIB_CFLAGS $CFLAGS"
+fi
+
AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
+AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)
+dnl ===========================================================================
+
# whether modules are built or not.
with_ltdl='yes'
have_ltdl='no'
AUTOTRACE_LIBS=""
AUTOTRACE_PKG=""
if test "x$with_autotrace" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
+ AC_MSG_RESULT([])
fi
if test "$have_autotrace" = 'yes'; then
- failed=0
- AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
- fi
+ AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
+ CFLAGS="$AUTOTRACE_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
fi
have_fftw='no'
-FFTW_LIBS=''
-if test "$with_fftw" != 'no'; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for FFTW])
- AC_MSG_RESULT([])
- failed=0
- passed=0
- AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING([if FFTW package is complete])
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT([no -- some components failed test])
- have_fftw='no (failed tests)'
- else
- FFTW_LIBS='-lfftw3'
- LIBS="$FFTW_LIBS $LIBS"
- AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
- AC_MSG_RESULT([yes])
- have_fftw='yes'
- fi
- else
- AC_MSG_RESULT([no])
- fi
+FFTW_CFLAGS=""
+FFTW_LIBS=""
+FFTW_PKG=""
+if test "x$with_fftw" = "xyes"; then
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(fftw3,[fftw3 >= 3.0.0], have_fftw=yes, have_fftw=no)
+ AC_MSG_RESULT([])
fi
+
+if test "$have_fftw" = 'yes'; then
+ AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
+ CFLAGS="$fftw3_CFLAGS $CFLAGS"
+fi
+
AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
+AC_SUBST(FFTW_CFLAGS)
AC_SUBST(FFTW_LIBS)
dnl ===========================================================================
fi
have_djvu='no'
-DJVU_LIBS=''
-if test "$with_djvu" != 'no'; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for DJVU])
- AC_MSG_RESULT([])
- failed=0
- passed=0
- AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING([if DJVU package is complete])
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT([no -- some components failed test])
- have_djvu='no (failed tests)'
- else
- DJVU_LIBS='-ldjvulibre'
- LIBS="$DJVU_LIBS $LIBS"
- AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
- AC_MSG_RESULT([yes])
- have_djvu='yes'
- fi
- else
- AC_MSG_RESULT([no])
- fi
+DJVU_CFLAGS=""
+DJVU_LIBS=""
+DJVU_PKG=""
+if test "x$with_djvu" = "xyes"; then
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(ddjvuapi,[ddjvuapi >= 3.5.0], have_djvu=yes, have_djvu=no)
+ AC_MSG_RESULT([])
fi
+
+if test "$have_djvu" = 'yes'; then
+ AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
+ CFLAGS="$DDJVUAPI_CFLAGS $CFLAGS"
+fi
+
AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
+AC_SUBST(DJVU_CFLAGS)
AC_SUBST(DJVU_LIBS)
dnl ===========================================================================
FONTCONFIG_LIBS=""
FONTCONFIG_PKG=""
if test "x$with_fontconfig" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
+ AC_MSG_RESULT([])
fi
if test "$have_fontconfig" = 'yes'; then
AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
- fi
+ CFLAGS="$FONTCONFIG_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
FREETYPE_LIBS=""
FREETYPE_PKG=""
if test "x$with_freetype" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
+ AC_MSG_RESULT([])
fi
if test "$have_freetype" = 'yes'; then
- AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
- CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
+ AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
+ CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
GVC_PKG=""
if test "x$with_gvc" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
+ AC_MSG_RESULT([])
fi
if test "$have_gvc" = 'yes'; then
- AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
- fi
+ AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
+ CFLAGS="$GVC_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
#
# Check for LCMS delegate library.
#
-# Disable LCMS.
AC_ARG_WITH(lcms,
[ --without-lcms disable lcms (v1.1X) support],
[with_lcms=$withval],
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
fi
-# Disable LCMS2.
-AC_ARG_WITH(lcms2,
- [ --without-lcms2 disable lcms (v2.X) support],
- [with_lcms2=$withval],
- [with_lcms2='yes'])
-if test "$with_lcms2" != 'yes' ; then
- DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
-fi
-
-have_lcms2='no'
-LCMS_LIBS=''
-if test "$with_lcms2" != 'no'; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for LCMS v2])
- AC_MSG_RESULT()
- failed=0
- passed=0
- have_lcms_header='no'
-
- # Check for <lcms2.h>
- AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
- if test "$have_lcms_header" = 'yes'; then
- AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
- passed=`expr $passed + 1`
- fi
-
- # Check for <lcms2/lcms2.h)
- if test "$have_lcms_header" != 'yes'; then
- AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
- AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
- fi
- fi
-
- # Failed to find lcms header?
- if test "$have_lcms_header" != 'yes'; then
- failed=`expr $failed + 1`
- fi
-
- AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING(if LCMS v2 package is complete)
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT(no -- some components failed test)
- have_lcms2='no (failed tests)'
- else
- LCMS_LIBS='-llcms2'
- LIBS="$LCMS_LIBS $LIBS"
- AC_MSG_RESULT(yes)
- have_lcms2='yes'
- fi
- else
- AC_MSG_RESULT(no)
- fi
-fi
-
-#
-# Check for LCMS v1 (1.11 or later)
-#
-if test $have_lcms2 = 'yes'; then
- with_lcms='no'
-fi
-
have_lcms='no'
-if test "$with_lcms" != 'no'; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for LCMS v1.1X])
- AC_MSG_RESULT()
- failed=0
- passed=0
- have_lcms_header='no'
-
- # Check for <lcms.h>
- if test "$have_lcms_header" != 'yes'; then
- AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
- AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
- fi
- fi
-
- # Check for <lcms/lcms.h>
- if test "$have_lcms_header" != 'yes'; then
- AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
- AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
- fi
- fi
-
- # Failed to find lcms header?
- if test "$have_lcms_header" != 'yes'; then
- failed=`expr $failed + 1`
- fi
-
- AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING(if LCMS package is complete)
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT(no -- some components failed test)
- have_lcms='no (failed tests)'
- else
- LCMS_LIBS='-llcms'
- LIBS="$LCMS_LIBS $LIBS"
- AC_MSG_RESULT(yes)
- have_lcms='yes'
- fi
- else
- AC_MSG_RESULT(no)
- fi
+LCMS_CFLAGS=""
+LCMS_LIBS=""
+LCMS_PKG=""
+if test "x$with_lcms" = "xyes"; then
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(LCMS,[lcms >= 1.0.0], have_lcms=yes, have_lcms=no)
+ AC_MSG_RESULT([])
fi
-AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
-if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
- AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
+if test "$have_lcms" = 'yes'; then
+ AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
+ CFLAGS="$LCMS_CFLAGS $CFLAGS"
fi
-AC_SUBST(LCMS_LIBS)
+AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes')
+AC_SUBST(LCMS_CFLAGS)
+AC_SUBST(LCMS_LIBS)
dnl ===========================================================================
LIBOPENJP2_LIBS=""
LIBOPENJP2_PKG=""
if test "x$with_openjp2" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(LIBOPENJP2,[libopenjp2 >= 2.1.0], have_openjp2=yes, have_openjp2=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(LIBOPENJP2,[libopenjp2 >= 2.1.0], have_openjp2=yes, have_openjp2=no)
+ AC_MSG_RESULT([])
fi
if test "$have_openjp2" = 'yes'; then
- AC_DEFINE(LIBOPENJP2_DELEGATE,1,Define if you have OPENJP2 library)
- if test "$build_modules" = 'no'; then
- CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
- fi
+ AC_DEFINE(LIBOPENJP2_DELEGATE,1,Define if you have OPENJP2 library)
+ CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(LIBOPENJP2_DELEGATE, test "$have_openjp2" = 'yes')
LQR_LIBS=""
LQR_PKG=""
if test "x$with_lqr" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
+ AC_MSG_RESULT([])
fi
if test "$have_lqr" = 'yes'; then
- AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
- CFLAGS="$LQR_CFLAGS $CFLAGS"
+ AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
+ CFLAGS="$LQR_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
LZMA_PKG=""
if test "x$with_lzma" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
+ AC_MSG_RESULT([])
fi
if test "$have_lzma" = 'yes'; then
- AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
- fi
+ AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
+ CFLAGS="$LZMA_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
OPENEXR_LIBS=""
OPENEXR_PKG=""
if test "x$with_openexr" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
+ AC_MSG_RESULT([])
fi
if test "$have_openexr" = 'yes'; then
- AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
- if test "$build_modules" = 'no'; then
- CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
- fi
+ AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
+ CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
PANGO_LIBS=""
PANGO_PKG=""
if test "x$with_pango" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
- AC_MSG_RESULT([])
- PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
+ AC_MSG_RESULT([])
+ PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
+ AC_MSG_RESULT([])
fi
if test "$have_pango" = 'yes'; then
- AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
- fi
+ AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
+ CFLAGS="$PANGO_CFLAGS $CFLAGS"
fi
if test "$have_pangocairo" = 'yes'; then
- AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$PANGOCAIRO_CFLAGS $CPPFLAGS"
- fi
+ AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
+ CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
fi
have_png='no'
-PNG_LIBS=''
-
-if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
+PNG_CFLAGS=""
+PNG_LIBS=""
+PNG_PKG=""
+if test "x$with_png" = "xyes"; then
AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING(for PNG support )
- AC_MSG_RESULT()
- failed=0
- passed=0
- AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
-
- if test $passed -gt 0; then
- for var in 7 6 5 4 2 '' ; do
- if test "$have_png" = 'no' ; then
- if test "x${var}" = 'x' ; then
- pnglib='png'
- else
- pnglib="png1${var}"
- fi
-
-# Test for compatible LIBPNG library
- failed=0
- passed=0
- if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
- if test "${pnglib}" != 'png' ; then
- AC_MSG_CHECKING(for LIBPNG1${var} support )
- AC_TRY_COMPILE(
-#include <stdio.h>
-#include <stdlib.h>
-#include <png.h>
-,
-changequote(<<, >>)dnl
-<<
-#if PNG_LIBPNG_VER_MINOR != ${var}
-#error LIBPNG library must be version 1${var}!
-Kaboom, Kaboom
-#endif
-return 0;
->>,
- changequote([, ])dnl
- ac_cv_libpng_ok='yes',
- ac_cv_libpng_ok='no')
- if test "$ac_cv_libpng_ok" = 'yes' ; then
- passed=`expr $passed + 1`
- AC_MSG_RESULT(yes)
- else
- failed=`expr $failed + 1`
- AC_MSG_RESULT(no)
- fi
- else
- passed=`expr $passed + 1`
- AC_MSG_RESULT(yes)
- fi
- fi
+ PKG_CHECK_MODULES(PNG,[libpng >= 1.0.0], have_png=yes, have_png=no)
+ AC_MSG_RESULT([])
+fi
- if test $passed -gt 0 -a $failed -le 0; then
- if test "1${var}" = '17' ; then
- AC_CHECK_LIB(png17,png_get_io_ptr,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- AC_CHECK_LIB(png17,png_longjmp,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- fi
- if test "1${var}" = '16' ; then
- AC_CHECK_LIB(png16,png_get_io_ptr,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- AC_CHECK_LIB(png16,png_longjmp,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- fi
- if test "1${var}" = '15' ; then
- AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- fi
- if test "1${var}" = '14' ; then
- AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- fi
- if test "1${var}" = '12' ; then
- AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- fi
- if test "1${var}" = '1' ; then
- AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
- failed=`expr $failed + 1`,)
- fi
- if test $passed -gt 0 -a $failed -le 0 ; then
- AC_MSG_CHECKING(if ${pnglib} package is complete)
- if test $passed -gt 0 ; then
- if test $failed -gt 0 ; then
- AC_MSG_RESULT(no -- some components failed test)
- have_png='no (failed tests)'
- else
- PNG_LIBS="-l${pnglib}"
- LIBS="$PNG_LIBS $LIBS"
- AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
- AC_MSG_RESULT(yes)
- have_png='yes'
- fi
- fi
- fi
- fi
- fi
- done
- fi
+if test "$have_png" = 'yes'; then
+ AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
+ CFLAGS="$PNG_CFLAGS $CFLAGS"
fi
-AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
+AM_CONDITIONAL(PNG_DELEGATE, test "$have_png" = 'yes')
+AC_SUBST(PNG_CFLAGS)
AC_SUBST(PNG_LIBS)
-
dnl ===========================================================================
#
RSVG_LIBS=""
RSVG_PKG=""
if test "x$with_rsvg" = "xyes"; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
- AC_MSG_RESULT([])
- PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
- AC_MSG_RESULT([])
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
+ AC_MSG_RESULT([])
+ PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
+ AC_MSG_RESULT([])
fi
if test "$have_rsvg" = 'yes'; then
- AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
- fi
+ AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
+ CFLAGS="$RSVG_CFLAGS $CFLAGS"
fi
if test "$have_cairo" = 'yes'; then
- AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
- if test "$build_modules" = 'no'; then
- CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
- fi
+ AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
+ CFLAGS="$CAIRO_SVG_CFLAGS $CFLAGS"
fi
AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
[AC_HELP_STRING([--with-wmf],
[enable WMF support])],
[with_wmf=$withval],
- [with_wmf='no'])
+ [with_wmf='yes'])
if test "$with_wmf" != 'yes'; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
fi
have_wmf='no'
-WMF_LIBS=''
-WMF_LIBS_DEPS=''
-OLIBS="$LIBS"
-if test "$with_wmf" != 'no'; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for WMF])
- AC_MSG_RESULT([])
- have_libwmf='no'
- have_libwmflite='no'
- have_libwmf_ipa_h='no'
-
- AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H])
- if test "$have_libwmf_ipa_h" = 'yes'; then
- AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,)
- if test "$have_libwmflite" = 'yes'; then
- AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library)
- WMF_LIBS='-lwmflite'
- LIBS="$WMF_LIBS $LIBS"
- have_wmf='yes'
- else
- WMF_LIBS_DEPS=''
- WMF_CONFIG_LIBS=`libwmf-config --libs`
- for lib in xml2 expat freetype jpeg png z; do
- testlib="-l${lib}"
- echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
- done
- AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS)
- if test "$have_libwmf" = 'yes'; then
- AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library)
- WMF_LIBS='-lwmf'
- LIBS="$WMF_LIBS $LIBS"
- have_wmf='yes'
- else
- AC_MSG_RESULT([no -- some components failed test])
- have_wmf='no (failed tests)'
- have_wmflite='no (failed tests)'
- LIBS="$OLIBS"
- WMF_LIBS=''
- fi
- fi
- fi
- AC_MSG_CHECKING([if WMF package is complete])
- if test "$have_wmf" = 'yes'; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
+WMF_CFLAGS=""
+WMF_LIBS=""
+WMF_PKG=""
+if test "x$with_wmf" = "xyes"; then
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(WMF,[wmf >= 0.2.8], have_wmf=yes, have_wmf=no)
+ AC_MSG_RESULT([])
+fi
+
+if test "$have_wmf" = 'yes'; then
+ AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
+ CFLAGS="$WMF_CFLAGS $CFLAGS"
fi
+
AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes')
+AC_SUBST(WMF_CFLAGS)
AC_SUBST(WMF_LIBS)
-AC_SUBST(WMF_LIBS_DEPS)
-
dnl ===========================================================================
fi
have_xml='no'
-XML_LIBS=''
-if test "$with_xml" != 'no'; then
- AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for XML])
- AC_MSG_RESULT([])
- PERSIST_LDFLAGS=$LDFLAGS
- PERSIST_CPPFLAGS=$CPPFLAGS
- xml2_config=''
- AC_PATH_PROG(xml2_config,xml2-config,)dnl
- if test -n "$xml2_config"; then
- # Debian installs libxml headers under /usr/include/libxml2/libxml with
- # the shared library installed under /usr/lib, whereas the package
- # installs itself under $prefix/libxml and $prefix/lib.
- xml2_prefix=`${xml2_config} --prefix`
- if test -d "${xml2_prefix}/include/libxml2"; then
- CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
- fi
- if test "${xml2_prefix}" != '/usr'; then
- LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
- fi
- fi
- failed=0
- passed=0
- AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
- AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING([if XML package is complete])
- if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT([no -- some components failed test])
- have_xml='no (failed tests)'
- LDFLAGS="$PERSIST_LDFLAGS"
- CPPFLAGS="$PERSIST_CPPFLAGS"
- else
- XML_LIBS='-lxml2'
- LIBS="$XML_LIBS $LIBS"
- AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
- AC_MSG_RESULT([yes])
- have_xml='yes'
- fi
- else
- AC_MSG_RESULT([no])
- fi
+XML_CFLAGS=""
+XML_LIBS=""
+XML_PKG=""
+if test "x$with_xml" = "xyes"; then
+ AC_MSG_RESULT([-------------------------------------------------------------])
+ PKG_CHECK_MODULES(XML,[libxml-2.0 >= 2.0.0], have_xml=yes, have_xml=no)
+ AC_MSG_RESULT([])
fi
-AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
+
+if test "$have_xml" = 'yes'; then
+ AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
+ CFLAGS="$XML_CFLAGS $CFLAGS"
+fi
+
+AM_CONDITIONAL(XML_DELEGATE, test "$have_xml" = 'yes')
+AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)
dnl ===========================================================================
#
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_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"
+ MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $fftw3_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 $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_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 $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DDJVUAP_LIBS $fftw3_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"
fi
AC_SUBST(MAGICK_DEP_LIBS)
#
# Sanitize output variables (asthetic).
#
-for variable in CC CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MAGICK_DEP_LIBS TESTED_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS; do
+for variable in CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PCFLAGS X_CFLAGS; do
sanitize=''
eval value=$`echo $variable`
for component in $value