This commit is contained in:
cristy
2011-10-03 18:17:24 +00:00
parent aed9c3814a
commit 81beccdfd8
8 changed files with 1167 additions and 514 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ while test $# -gt 0; do
echo '-L/usr/local/lib '
;;
--libs)
echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -llcms2 -ltiff -ljasper -ljpeg -lpng12 -ldjvulibre -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl"
echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -ldjvulibre -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl"
;;
*)
echo "${usage}" 1>&2
+7 -2
View File
@@ -95,7 +95,7 @@
/* Define if you have FlashPIX library */
/* #undef FPX_DELEGATE */
/* Define if you have FREETYPE library */
/* Define if you have FreeType (TrueType font) library */
#ifndef MAGICKCORE_FREETYPE_DELEGATE
#define MAGICKCORE_FREETYPE_DELEGATE 1
#endif
@@ -340,6 +340,11 @@
#define MAGICKCORE_HAVE_FSEEKO 1
#endif
/* Define to 1 if you have the <ft2build.h> header file. */
#ifndef MAGICKCORE_HAVE_FT2BUILD_H
#define MAGICKCORE_HAVE_FT2BUILD_H 1
#endif
/* Define to 1 if you have the `ftime' function. */
#ifndef MAGICKCORE_HAVE_FTIME
#define MAGICKCORE_HAVE_FTIME 1
@@ -1226,7 +1231,7 @@
#define MAGICKCORE_LT_OBJDIR ".libs/"
#endif
/* Define if you have LZMA library */
/* Define if you have lzma compression library */
#ifndef MAGICKCORE_LZMA_DELEGATE
#define MAGICKCORE_LZMA_DELEGATE 1
#endif
+2 -11
View File
@@ -2346,9 +2346,6 @@ EXEC_PREFIX_DIR = @EXEC_PREFIX_DIR@
EXEEXT = @EXEEXT@
EchoDelegate = @EchoDelegate@
EditorDelegate = @EditorDelegate@
FFTW3_CFLAGS = @FFTW3_CFLAGS@
FFTW3_LIBS = @FFTW3_LIBS@
FFTW_CFLAGS = @FFTW_CFLAGS@
FFTW_LIBS = @FFTW_LIBS@
FGREP = @FGREP@
FIGDecodeDelegate = @FIGDecodeDelegate@
@@ -2356,9 +2353,6 @@ FILTER_PATH = @FILTER_PATH@
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
FPX_LIBS = @FPX_LIBS@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
FREETYPE_LIBS = @FREETYPE_LIBS@
GDI32_LIBS = @GDI32_LIBS@
GOMP_LIBS = @GOMP_LIBS@
@@ -2432,7 +2426,6 @@ LTLIBOBJS = @LTLIBOBJS@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LZMA_CFLAGS = @LZMA_CFLAGS@
LZMA_LIBS = @LZMA_LIBS@
LZWDecodeDelegate = @LZWDecodeDelegate@
LZWEncodeDelegate = @LZWEncodeDelegate@
@@ -2518,7 +2511,6 @@ PERL_VERSION = @PERL_VERSION@
PERSISTINCLUDE_DIR = @PERSISTINCLUDE_DIR@
PGPDecodeDelegate = @PGPDecodeDelegate@
PKG_CONFIG = @PKG_CONFIG@
PNG_CFLAGS = @PNG_CFLAGS@
PNG_LIBS = @PNG_LIBS@
POVDelegate = @POVDelegate@
POW_LIB = @POW_LIB@
@@ -2571,9 +2563,6 @@ WinPathScript = @WinPathScript@
X11_LIBS = @X11_LIBS@
XEXT_LIBS = @XEXT_LIBS@
XMKMF = @XMKMF@
XML2_CFLAGS = @XML2_CFLAGS@
XML2_LIBS = @XML2_LIBS@
XML_CFLAGS = @XML_CFLAGS@
XML_LIBS = @XML_LIBS@
XPSCMYKDevice = @XPSCMYKDevice@
XPSColorDevice = @XPSColorDevice@
@@ -2616,6 +2605,7 @@ dejavu_font_dir = @dejavu_font_dir@
docdir = $(DOCUMENTATION_PATH)
dvidir = @dvidir@
exec_prefix = @exec_prefix@
freetype_config = @freetype_config@
ghostscript_font_dir = @ghostscript_font_dir@
host = @host@
host_alias = @host_alias@
@@ -2654,6 +2644,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
type_include_files = @type_include_files@
windows_font_dir = @windows_font_dir@
xml2_config = @xml2_config@
AUTOMAKE_OPTIONS = 1.11 subdir-objects parallel-tests color-tests dist-zip dist-bzip2 dist-xz foreign
topincludedir = @includedir@/ImageMagick
+2 -2
View File
@@ -156,7 +156,7 @@ foreach my $delegate (@tested_delegates) {
}
# defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile
my $INC_magick = '-I../ -I.. -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libpng12 -I/usr/include/graphviz -I"' . $Config{'usrinc'} . '/ImageMagick"';
my $INC_magick = '-I../ -I.. -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"';
my $LIBS_magick = '-L../MagickCore/.libs -lMagickCore -lperl -lm';
my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread";
my $LDFLAGS_magick = "-L../MagickCore/.libs -lMagickCore $Config{'ldflags'} ";
@@ -201,7 +201,7 @@ WriteMakefile
#'CC' => 'gcc -std=gnu99 -std=gnu99',
# C pre-processor flags (e.g. -I & -D options)
# 'CPPFLAGS' => "$Config{'cppflags'} -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libpng12 -I/usr/include/graphviz",
# 'CPPFLAGS' => "$Config{'cppflags'} -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2",
# C compiler flags (e.g. -O -g)
'CCFLAGS' => $CCFLAGS_magick,
+5 -2
View File
@@ -64,7 +64,7 @@
/* Define if you have FlashPIX library */
#undef FPX_DELEGATE
/* Define if you have FREETYPE library */
/* Define if you have FreeType (TrueType font) library */
#undef FREETYPE_DELEGATE
/* Define if you have Ghostscript library or framework */
@@ -227,6 +227,9 @@
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
/* Define to 1 if you have the <ft2build.h> header file. */
#undef HAVE_FT2BUILD_H
/* Define to 1 if you have the `ftime' function. */
#undef HAVE_FTIME
@@ -805,7 +808,7 @@
*/
#undef LT_OBJDIR
/* Define if you have LZMA library */
/* Define if you have lzma compression library */
#undef LZMA_DELEGATE
/* Define to prepend to default font search path. */
+1 -1
View File
@@ -28,7 +28,7 @@
<configure name="PCFLAGS" value="-fopenmp"/>
<configure name="DEFS" value="-DHAVE_CONFIG_H"/>
<configure name="LDFLAGS" value="-L/usr/local/lib "/>
<configure name="LIBS" value="-lMagickCore -llcms2 -ltiff -ljasper -ljpeg -lpng12 -ldjvulibre -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl"/>
<configure name="LIBS" value="-lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -ldjvulibre -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl"/>
<configure name="CXX" value="g++"/>
<configure name="CXXFLAGS" value="-g -O2 -pthread"/>
<configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no"/>
Vendored
+885 -418
View File
File diff suppressed because it is too large Load Diff
+264 -77
View File
@@ -1680,7 +1680,7 @@ dnl ===========================================================================
#
# Check for FFTW delegate library.
#
AC_ARG_WITH(fftw,
AC_ARG_WITH([fftw],
[AC_HELP_STRING([--without-fftw],
[disable FFTW support])],
[with_fftw=$withval],
@@ -1690,22 +1690,33 @@ if test "$with_fftw" != 'yes'; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
fi
FFTW_PKG=""
if test "x$with_fftw" = "xyes"; then
have_fftw='no'
FFTW_LIBS=''
if test "$with_fftw" != 'no'; then
AC_MSG_RESULT([-------------------------------------------------------------])
PKG_CHECK_MODULES(FFTW3,[fftw3], have_fftw=yes, have_fftw=no)
AC_MSG_CHECKING([for FFTW])
AC_MSG_RESULT([])
fi
if test "$have_fftw" = 'yes'; then
AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
if test "$with_modules" = 'no'; then
CPPFLAGS="$FFTW_CFLAGS $CPPFLAGS"
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
fi
AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
AC_SUBST(FFTW_CFLAGS)
AC_SUBST(FFTW_LIBS)
dnl ===========================================================================
@@ -1793,37 +1804,85 @@ AC_SUBST(FONTCONFIG_LIBS)
dnl ===========================================================================
#
# Check for FREETYPE delegate library.
# Check for freetype delegate library.
#
AC_ARG_WITH(freetype,
AC_ARG_WITH([freetype],
[AC_HELP_STRING([--without-freetype],
[disable FREETYPE support])],
[disable Freetype support])],
[with_freetype=$withval],
[with_freetype='yes'])
if test "$with_freetype" != 'yes'; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
fi
FREETYPE_PKG=""
if test "x$with_freetype" = "xyes"; then
have_freetype='no'
FREETYPE_LIBS=''
if test "$with_freetype" != 'no'; then
AC_MSG_RESULT([-------------------------------------------------------------])
PKG_CHECK_MODULES(FREETYPE2,[freetype2], have_freetype=yes, have_freetype=no)
AC_MSG_CHECKING([for FreeType 2.0])
AC_MSG_RESULT([])
fi
failed=0
passed=0
PERSIST_LIBS="$LIBS"
PERSIST_CPPFLAGS="$CPPFLAGS"
if test "$enable_delegate_build" != 'no' && test -d "$builddir/freetype/include"; then
:
else
freetype_config=''
AC_CHECK_PROGS(freetype_config,freetype-config,)dnl
if test -n "$freetype_config"; then
freetype_cflags=`$freetype_config --cflags`
freetype_libs=`$freetype_config --libs`
LIBS="$LIBS $freetype_libs"
CPPFLAGS="$freetype_cflags $CPPFLAGS"
fi
fi
if test "$have_freetype" = 'yes'; then
AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
if test "$with_modules" = 'no'; then
CPPFLAGS="$FREETYPE_CFLAGS $CPPFLAGS"
dnl First see if there is a library
if test "$FREETYPE_LIBS" = ''; then
AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
if test "$FREETYPE_LIBS" != ''; then
passed=`expr $passed + 1`
else
failed=`expr $failed + 1`
LIBS="$PERSIST_LIBS"
fi
fi
dnl Now test for the headers
AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
if test "$ac_cv_header_ft2build_h" = 'yes' || test "$have_freetype_h" = 'yes'; then
passed=`expr $passed + 1`
else
failed=`expr $failed + 1`
CPPFLAGS="$PERSIST_CPPFLAGS"
fi
AC_MSG_CHECKING([if FreeType package is complete])
if test $passed -gt 0; then
if test $failed -gt 0; then
FREETYPE_LIBS=''
AC_MSG_RESULT([no -- some components failed test])
have_freetype='no (failed tests)'
else
LIBS="$FREETYPE_LIBS $LIBS"
AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
if test "$ac_cv_header_ft2build_h" = 'yes'; then
AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
fi
AC_MSG_RESULT([yes])
have_freetype='yes'
fi
else
AC_MSG_RESULT([no])
fi
fi
AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
AC_SUBST(FREETYPE_CFLAGS)
AM_CONDITIONAL(FREETYPE_DELEGATE,test "$have_freetype" = 'yes')
AC_SUBST(FREETYPE_LIBS)
dnl ===========================================================================
dnl ===========================================================================
@@ -2267,35 +2326,45 @@ AC_SUBST(LQR_LIBS)
dnl ===========================================================================
#
# Check for LZMA delegate library.
#
# Disable LZMA (lzma library)
AC_ARG_WITH(lzma,
[AC_HELP_STRING([--without-lzma],
[disable LZMA support])],
[with_lzma=$withval],
[with_lzma='yes'])
if test "$with_lzma" != 'yes'; then
[ --without-lzma disable LZMA support],
[with_lzma=$withval],
[with_lzma='yes'])
if test "$with_lzma" != 'yes' ; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
fi
LZMA_PKG=""
if test "x$with_lzma" = "xyes"; then
#
# Check for LZMA
#
have_lzma='no'
LZMA_LIBS=''
if test "$with_lzma" != 'no' || test "$with_tiff" != 'no'; then
AC_MSG_RESULT([-------------------------------------------------------------])
PKG_CHECK_MODULES(LZMA,[liblzma], 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 "$with_modules" = 'no'; then
CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
AC_MSG_CHECKING(for LZMA)
AC_MSG_RESULT()
failed=0
passed=0
AC_CHECK_HEADER(lzma.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
AC_CHECK_LIB(lzma,lzma_code,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
AC_MSG_CHECKING(if LZMA package is complete)
if test $passed -gt 0; then
if test $failed -gt 0; then
AC_MSG_RESULT(no -- some components failed test)
have_lzma='no (failed tests)'
else
LZMA_LIBS='-llzma'
LIBS="$LZMA_LIBS $LIBS"
AC_DEFINE(LZMA_DELEGATE,1,Define if you have lzma compression library)
AC_MSG_RESULT(yes)
have_lzma='yes'
fi
else
AC_MSG_RESULT(no)
fi
fi
AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
AC_SUBST(LZMA_CFLAGS)
AC_SUBST(LZMA_LIBS)
dnl ===========================================================================
@@ -2349,24 +2418,108 @@ if test "$with_png" != 'yes'; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
fi
PNG_PKG=""
if test "x$with_png" = "xyes"; then
AC_MSG_RESULT([-------------------------------------------------------------])
PKG_CHECK_MODULES(PNG,[libpng], have_png=yes, have_png=no)
AC_MSG_RESULT([])
have_png='no'
PNG_LIBS=''
if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; 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 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
if test $passed -gt 0 -a $failed -le 0; then
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
fi
if test "$have_png" = 'yes'; then
AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
if test "$with_modules" = 'no'; then
CPPFLAGS="$PNG_CFLAGS $CPPFLAGS"
fi
fi
AM_CONDITIONAL(PNG_DELEGATE, test "$have_png" = 'yes')
AC_SUBST(PNG_CFLAGS)
AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
AC_SUBST(PNG_LIBS)
dnl ===========================================================================
#
@@ -2570,37 +2723,71 @@ fi
AM_CONDITIONAL(WMF_DELEGATE,test "$have_wmf" = 'yes')
AC_SUBST(WMF_LIBS)
dnl ===========================================================================
dnl ===========================================================================
#
# Check for XML delegate library.
#
AC_ARG_WITH(xml,
AC_ARG_WITH([xml],
[AC_HELP_STRING([--without-xml],
[disable XML support])],
[with_xml=$withval],
[with_xml='yes'])
[with_xml=$have_x])
if test "$with_xml" != 'yes'; then
if test "$with_xml" != 'yes' ; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
fi
XML_PKG=""
if test "x$with_xml" = "xyes"; then
have_xml='no'
XML_LIBS=''
if test "$with_xml" != 'no'; then
AC_MSG_RESULT([-------------------------------------------------------------])
PKG_CHECK_MODULES(XML2,[libxml-2.0], have_xml=yes, have_xml=no)
AC_MSG_CHECKING([for XML])
AC_MSG_RESULT([])
fi
if test "$have_xml" = 'yes'; then
AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
if test "$with_modules" = 'no'; then
CPPFLAGS="$XML_CFLAGS $CPPFLAGS"
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
fi
AM_CONDITIONAL(XML_DELEGATE, test "$have_xml" = 'yes')
AC_SUBST(XML_CFLAGS)
AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
AC_SUBST(XML_LIBS)
dnl ===========================================================================