configure: Add a helper macro for invoking pkg-config, and use it for libxml.

This commit is contained in:
Alexandre Julliard 2013-05-03 16:09:38 +02:00
parent 3173e275ec
commit 8dabde1782
4 changed files with 199 additions and 136 deletions

27
aclocal.m4 vendored
View file

@ -22,13 +22,17 @@ dnl configuration script generated by Autoconf, you may include it
dnl under the same distribution terms that you use for the rest of
dnl that program.
dnl **** Get the programs used by WINE_GET_SONAME ****
dnl **** Initialize the programs used by other checks ****
dnl
dnl Usage: WINE_PATH_SONAME_TOOLS
dnl Usage: WINE_PATH_PKG_CONFIG
dnl
AC_DEFUN([WINE_PATH_SONAME_TOOLS],
[AC_PATH_PROG(LDD,ldd,true,/sbin:/usr/sbin:$PATH)
AC_CHECK_TOOLS(READELF,[readelf],true)])
AC_CHECK_TOOL(READELF,[readelf],true)])
AC_DEFUN([WINE_PATH_PKG_CONFIG],
[AC_CHECK_TOOL(PKG_CONFIG,[pkg-config])])
dnl **** Extract the soname of a library ****
dnl
@ -61,6 +65,25 @@ AS_IF([test "x]AS_VAR_GET(ac_Lib)[" = "x"],
m4_popdef([ac_lib_pattern])dnl
AS_VAR_POPDEF([ac_Lib])])
dnl **** Get flags from pkg-config or alternate xxx-config program ****
dnl
dnl Usage: WINE_PACKAGE_FLAGS(var,pkg-name,[default-lib,[cflags-alternate,libs-alternate]])
dnl
AC_DEFUN([WINE_PACKAGE_FLAGS],
[AC_REQUIRE([WINE_PATH_PKG_CONFIG])dnl
AC_ARG_VAR([$1]_CFLAGS, [C compiler flags for $2, overriding pkg-config])dnl
AS_IF([test -n "$[$1]_CFLAGS"],[],
[test -n "$PKG_CONFIG"],
[[$1]_CFLAGS=`$PKG_CONFIG --cflags [$2] 2>/dev/null`])
m4_ifval([$4],[[$1]_CFLAGS=[$]{[$1]_CFLAGS:-`[$4] 2>/dev/null`}])
CPPFLAGS="$CPPFLAGS $[$1]_CFLAGS"
AC_ARG_VAR([$1]_LIBS, [Linker flags for $2, overriding pkg-config])dnl
AS_IF([test -n "$[$1]_LIBS"],[],
[test -n "$PKG_CONFIG"],
[[$1]_LIBS=`$PKG_CONFIG --libs [$2] 2>/dev/null`])
m4_ifval([$5],[[$1]_LIBS=[$]{[$1]_LIBS:-`[$5] 2>/dev/null`}])
m4_ifval([$3],[[$1]_LIBS=[$]{[$1]_LIBS:-"$3"}])])
dnl **** Link C code with an assembly file ****
dnl
dnl Usage: WINE_TRY_ASM_LINK(asm-code,includes,function,[action-if-found,[action-if-not-found]])

258
configure vendored
View file

@ -664,9 +664,11 @@ sane_devel
GNUTLSINCL
HALINCL
DBUSINCL
XSLTINCL
XML2INCL
XML2LIBS
XSLT_LIBS
XSLT_CFLAGS
XML2_LIBS
XML2_CFLAGS
PKG_CONFIG
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
@ -693,7 +695,6 @@ LIBWINE_RULES
SOCKETLIBS
DLLWRAP
DLLTOOL
ac_ct_READELF
READELF
LDD
LDRPATH_LOCAL
@ -710,7 +711,6 @@ MSGFMT
ICOTOOL
CONVERT
RSVG
PKG_CONFIG
FONTFORGE
LINTFLAGS
LINT
@ -859,7 +859,11 @@ CXX
CXXFLAGS
CCC
CPP
XMKMF'
XMKMF
XML2_CFLAGS
XML2_LIBS
XSLT_CFLAGS
XSLT_LIBS'
# Initialize some variables set by options.
@ -1547,6 +1551,10 @@ Some influential environment variables:
CXXFLAGS C++ compiler flags
CPP C preprocessor
XMKMF Path to xmkmf, Makefile generator for X Window System
XML2_CFLAGS C compiler flags for libxml-2.0, overriding pkg-config
XML2_LIBS Linker flags for libxml-2.0, overriding pkg-config
XSLT_CFLAGS C compiler flags for libxslt, overriding pkg-config
XSLT_LIBS Linker flags for libxslt, 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.
@ -4919,49 +4927,6 @@ fi
done
test -n "$FONTFORGE" || FONTFORGE="false"
for ac_prog in pkg-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; 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_prog_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PKG_CONFIG"; then
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
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_prog_PKG_CONFIG="$ac_prog"
$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
fi
fi
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$PKG_CONFIG" && break
done
test -n "$PKG_CONFIG" || PKG_CONFIG="false"
for ac_prog in rsvg
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@ -6333,10 +6298,8 @@ fi
if test -n "$ac_tool_prefix"; then
for ac_prog in readelf
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
# Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
set dummy ${ac_tool_prefix}readelf; 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_prog_READELF+:} false; then :
@ -6352,7 +6315,7 @@ do
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_prog_READELF="$ac_tool_prefix$ac_prog"
ac_cv_prog_READELF="${ac_tool_prefix}readelf"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@ -6372,15 +6335,11 @@ $as_echo "no" >&6; }
fi
test -n "$READELF" && break
done
fi
if test -z "$READELF"; then
if test -z "$ac_cv_prog_READELF"; then
ac_ct_READELF=$READELF
for ac_prog in readelf
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
# Extract the first word of "readelf", so it can be a program name with args.
set dummy readelf; 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_prog_ac_ct_READELF+:} false; then :
@ -6396,7 +6355,7 @@ do
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_prog_ac_ct_READELF="$ac_prog"
ac_cv_prog_ac_ct_READELF="readelf"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@ -6415,10 +6374,6 @@ else
$as_echo "no" >&6; }
fi
test -n "$ac_ct_READELF" && break
done
if test "x$ac_ct_READELF" = x; then
READELF="true"
else
@ -6430,6 +6385,8 @@ ac_tool_warned=yes ;;
esac
READELF=$ac_ct_READELF
fi
else
READELF="$ac_cv_prog_READELF"
fi
@ -9583,24 +9540,115 @@ fi
test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_opencl:-no}
XML2LIBS=""
XML2INCL=""
XSLTINCL=""
if test "x$with_xml" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
if test "$PKG_CONFIG" != "false"
then
ac_xml_libs="`$PKG_CONFIG --libs libxml-2.0 2>/dev/null`"
ac_xml_cflags="`$PKG_CONFIG --cflags libxml-2.0 2>/dev/null`"
else
ac_xml_libs="`xml2-config --libs 2>/dev/null`"
ac_xml_cflags="`xml2-config --cflags 2>/dev/null`"
fi
CPPFLAGS="$CPPFLAGS $ac_xml_cflags"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-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_prog_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PKG_CONFIG"; then
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
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_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
$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
fi
fi
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_PKG_CONFIG"; then
ac_ct_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-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_prog_ac_ct_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_PKG_CONFIG"; then
ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
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_prog_ac_ct_PKG_CONFIG="pkg-config"
$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
fi
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_ct_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
fi
if test -n "$XML2_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then :
XML2_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0 2>/dev/null`
fi
XML2_CFLAGS=${XML2_CFLAGS:-`xml2-config --cflags 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $XML2_CFLAGS"
if test -n "$XML2_LIBS"; then :
elif test -n "$PKG_CONFIG"; then :
XML2_LIBS=`$PKG_CONFIG --libs libxml-2.0 2>/dev/null`
fi
XML2_LIBS=${XML2_LIBS:-`xml2-config --libs 2>/dev/null`}
XML2_LIBS=${XML2_LIBS:-"-lxml2"}
for ac_header in libxml/parser.h libxml/xmlsave.h libxml/SAX2.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@ -9622,7 +9670,7 @@ if ${ac_cv_lib_xml2_xmlParseMemory+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $ac_xml_libs $LIBS"
LIBS="-lxml2 $XML2_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9656,8 +9704,8 @@ if test "x$ac_cv_lib_xml2_xmlParseMemory" = xyes; then :
$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
XML2LIBS="$ac_xml_libs"
XML2INCL="$ac_xml_cflags"
else
XML2_LIBS=""
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlReadMemory in -lxml2" >&5
@ -9666,7 +9714,7 @@ if ${ac_cv_lib_xml2_xmlReadMemory+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $ac_xml_libs $LIBS"
LIBS="-lxml2 $XML2_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9708,7 +9756,7 @@ if ${ac_cv_lib_xml2_xmlNewDocPI+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $ac_xml_libs $LIBS"
LIBS="-lxml2 $XML2_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9750,7 +9798,7 @@ if ${ac_cv_lib_xml2_xmlSchemaSetParserStructuredErrors+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $ac_xml_libs $LIBS"
LIBS="-lxml2 $XML2_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9792,7 +9840,7 @@ if ${ac_cv_lib_xml2_xmlSchemaSetValidStructuredErrors+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $ac_xml_libs $LIBS"
LIBS="-lxml2 $XML2_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9834,7 +9882,7 @@ if ${ac_cv_lib_xml2_xmlFirstElementChild+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $ac_xml_libs $LIBS"
LIBS="-lxml2 $XML2_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9878,6 +9926,9 @@ $as_echo "#define HAVE_XMLDOC_PROPERTIES 1" >>confdefs.h
fi
else
XML2_CFLAGS=""
XML2_LIBS=""
fi
CPPFLAGS="$ac_save_CPPFLAGS"
fi
@ -9892,16 +9943,21 @@ fi
if test "x$with_xslt" != "xno"
then
if test "$PKG_CONFIG" != "false"
then
ac_xslt_libs="`$PKG_CONFIG --libs libxslt 2>/dev/null`"
ac_xslt_cflags="`$PKG_CONFIG --cflags libxslt 2>/dev/null`"
else
ac_xslt_libs="`xslt-config --libs 2>/dev/null`"
ac_xslt_cflags="`xslt-config --cflags 2>/dev/null`"
fi
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $ac_xslt_cflags"
if test -n "$XSLT_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then :
XSLT_CFLAGS=`$PKG_CONFIG --cflags libxslt 2>/dev/null`
fi
XSLT_CFLAGS=${XSLT_CFLAGS:-`xslt-config --cflags 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $XSLT_CFLAGS"
if test -n "$XSLT_LIBS"; then :
elif test -n "$PKG_CONFIG"; then :
XSLT_LIBS=`$PKG_CONFIG --libs libxslt 2>/dev/null`
fi
XSLT_LIBS=${XSLT_LIBS:-`xslt-config --libs 2>/dev/null`}
XSLT_LIBS=${XSLT_LIBS:-"-lxml2"}
for ac_header in libxslt/pattern.h libxslt/transform.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@ -9927,7 +9983,7 @@ if ${ac_cv_lib_soname_xslt+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lxslt $ac_xslt_libs $LIBS"
LIBS="-lxslt $XSLT_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9972,8 +10028,10 @@ cat >>confdefs.h <<_ACEOF
#define SONAME_LIBXSLT "$ac_cv_lib_soname_xslt"
_ACEOF
XSLTINCL="$ac_xslt_cflags"
fi
else
XSLT_CFLAGS=""
fi
fi
if test "x$ac_cv_lib_soname_xslt" = "x"; then :

View file

@ -286,7 +286,6 @@ AC_SUBST(LINTFLAGS)
dnl Check for various programs
AC_CHECK_PROGS(FONTFORGE, fontforge, false)
AC_CHECK_PROGS(PKG_CONFIG, pkg-config, false)
AC_CHECK_PROGS(RSVG, rsvg, false)
AC_CHECK_PROGS(CONVERT, convert, false)
AC_CHECK_PROGS(ICOTOOL, icotool, false)
@ -1268,40 +1267,30 @@ test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_op
dnl **** Check for libxml2 ****
AC_SUBST(XML2LIBS,"")
AC_SUBST(XML2INCL,"")
AC_SUBST(XSLTINCL,"")
if test "x$with_xml" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
if test "$PKG_CONFIG" != "false"
then
ac_xml_libs="`$PKG_CONFIG --libs libxml-2.0 2>/dev/null`"
ac_xml_cflags="`$PKG_CONFIG --cflags libxml-2.0 2>/dev/null`"
else
ac_xml_libs="`xml2-config --libs 2>/dev/null`"
ac_xml_cflags="`xml2-config --cflags 2>/dev/null`"
fi
CPPFLAGS="$CPPFLAGS $ac_xml_cflags"
WINE_PACKAGE_FLAGS(XML2,[libxml-2.0],[-lxml2],[xml2-config --cflags],[xml2-config --libs])
AC_CHECK_HEADERS([libxml/parser.h libxml/xmlsave.h libxml/SAX2.h])
if test "$ac_cv_header_libxml_parser_h" = "yes" -a "$ac_cv_header_libxml_xmlsave_h" = "yes" -a "$ac_cv_header_libxml_SAX2_h" = "yes"
then
AC_CHECK_LIB(xml2, xmlParseMemory,
[AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])
XML2LIBS="$ac_xml_libs"
XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
[AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])],[XML2_LIBS=""],[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlReadMemory,
[AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])],,$ac_xml_libs)
[AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlNewDocPI,
[AC_DEFINE(HAVE_XMLNEWDOCPI,1,[Define if libxml2 has the xmlNewDocPI function])],,$ac_xml_libs)
[AC_DEFINE(HAVE_XMLNEWDOCPI,1,[Define if libxml2 has the xmlNewDocPI function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlSchemaSetParserStructuredErrors,
[AC_DEFINE(HAVE_XMLSCHEMASSETPARSERSTRUCTUREDERRORS,1,[Define if libxml2 has the xmlSchemaSetParserStructuredErrors function])],,$ac_xml_libs)
[AC_DEFINE(HAVE_XMLSCHEMASSETPARSERSTRUCTUREDERRORS,1,[Define if libxml2 has the xmlSchemaSetParserStructuredErrors function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlSchemaSetValidStructuredErrors,
[AC_DEFINE(HAVE_XMLSCHEMASSETVALIDSTRUCTUREDERRORS,1,[Define if libxml2 has the xmlSchemaSetValidStructuredErrors function])],,$ac_xml_libs)
[AC_DEFINE(HAVE_XMLSCHEMASSETVALIDSTRUCTUREDERRORS,1,[Define if libxml2 has the xmlSchemaSetValidStructuredErrors function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlFirstElementChild,
[AC_DEFINE(HAVE_XMLFIRSTELEMENTCHILD,1,[Define if libxml2 has the xmlFirstElementChild function])],,$ac_xml_libs)
[AC_DEFINE(HAVE_XMLFIRSTELEMENTCHILD,1,[Define if libxml2 has the xmlFirstElementChild function])],,[$XML2_LIBS])
AC_CHECK_TYPE([xmlDocProperties],
[AC_DEFINE(HAVE_XMLDOC_PROPERTIES,1,[Define if libxml2 has the xmlDocProperties enum])],,[[#include <libxml/tree.h>]])
else
XML2_CFLAGS=""
XML2_LIBS=""
fi
CPPFLAGS="$ac_save_CPPFLAGS"
fi
@ -1310,16 +1299,8 @@ WINE_WARNING_WITH(xml,[test "$ac_cv_lib_xml2_xmlParseMemory" != "yes"],
if test "x$with_xslt" != "xno"
then
if test "$PKG_CONFIG" != "false"
then
ac_xslt_libs="`$PKG_CONFIG --libs libxslt 2>/dev/null`"
ac_xslt_cflags="`$PKG_CONFIG --cflags libxslt 2>/dev/null`"
else
ac_xslt_libs="`xslt-config --libs 2>/dev/null`"
ac_xslt_cflags="`xslt-config --cflags 2>/dev/null`"
fi
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $ac_xslt_cflags"
WINE_PACKAGE_FLAGS(XSLT,[libxslt],[-lxml2],[xslt-config --cflags],[xslt-config --libs])
AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],,,
[#ifdef HAVE_LIBXSLT_PATTERN_H
# include <libxslt/pattern.h>
@ -1327,8 +1308,9 @@ then
CPPFLAGS="$ac_save_CPPFLAGS"
if test "$ac_cv_header_libxslt_transform_h" = "yes"
then
WINE_CHECK_SONAME(xslt,xsltCompilePattern,
[XSLTINCL="$ac_xslt_cflags"],,[$ac_xslt_libs])
WINE_CHECK_SONAME(xslt,xsltCompilePattern,,,[$XSLT_LIBS])
else
XSLT_CFLAGS=""
fi
fi
WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"],

View file

@ -1,8 +1,8 @@
EXTRADEFS = -DCOM_NO_WINDOWS_H
MODULE = msxml3.dll
IMPORTS = uuid urlmon shlwapi oleaut32 ole32 user32 advapi32
EXTRALIBS = @XML2LIBS@
EXTRAINCL = @XML2INCL@ @XSLTINCL@
EXTRALIBS = @XML2_LIBS@
EXTRAINCL = @XML2_CFLAGS@ @XSLT_CFLAGS@
C_SRCS = \
attribute.c \