configure: Try to detect MinGW libxslt using pkg-config if --with-system-dllpath is specified.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-12-02 19:22:10 -06:00 committed by Alexandre Julliard
parent be8dd96d66
commit 9469711946
2 changed files with 168 additions and 0 deletions

153
configure vendored
View File

@ -13205,6 +13205,159 @@ CPPFLAGS=$ac_save_CPPFLAGS
as_fn_append wine_notices "|libxml2 ${notice_platform}MinGW development files not found (or too old); using bundled version."
fi
if ${XSLT_PE_CFLAGS:+false} :
then :
if test ${MINGW_PKG_CONFIG+y}
then :
XSLT_PE_CFLAGS=`$MINGW_PKG_CONFIG --cflags libxslt 2>/dev/null`
fi
fi
if ${XSLT_PE_LIBS:+false} :
then :
if test ${MINGW_PKG_CONFIG+y}
then :
XSLT_PE_LIBS=`$MINGW_PKG_CONFIG --libs libxslt 2>/dev/null`
fi
fi
XSLT_PE_LIBS=${XSLT_PE_LIBS:-"-lxslt"}
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $XSLT_PE_CFLAGS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MinGW libxslt/pattern.h" >&5
printf %s "checking for MinGW libxslt/pattern.h... " >&6; }
if test ${ac_cv_mingw_header_libxslt_pattern_h+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_check_headers_saved_cc=$CC
ac_wine_check_headers_saved_exeext=$ac_exeext
CC="$CROSSCC"
ac_exeext=".exe"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <libxslt/pattern.h>
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_mingw_header_libxslt_pattern_h=yes
else $as_nop
ac_cv_mingw_header_libxslt_pattern_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CC=$ac_wine_check_headers_saved_cc
ac_exeext=$ac_wine_check_headers_saved_exeext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mingw_header_libxslt_pattern_h" >&5
printf "%s\n" "$ac_cv_mingw_header_libxslt_pattern_h" >&6; }
if test "x$ac_cv_mingw_header_libxslt_pattern_h" = xyes
then :
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MinGW libxslt/transform.h" >&5
printf %s "checking for MinGW libxslt/transform.h... " >&6; }
if test ${ac_cv_mingw_header_libxslt_transform_h+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_check_headers_saved_cc=$CC
ac_wine_check_headers_saved_exeext=$ac_exeext
CC="$CROSSCC"
ac_exeext=".exe"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <libxslt/transform.h>
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_mingw_header_libxslt_transform_h=yes
else $as_nop
ac_cv_mingw_header_libxslt_transform_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CC=$ac_wine_check_headers_saved_cc
ac_exeext=$ac_wine_check_headers_saved_exeext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mingw_header_libxslt_transform_h" >&5
printf "%s\n" "$ac_cv_mingw_header_libxslt_transform_h" >&6; }
if test "x$ac_cv_mingw_header_libxslt_transform_h" = xyes
then :
fi
if test "$ac_cv_mingw_header_libxslt_pattern_h" = "yes" -a "$ac_cv_mingw_header_libxslt_transform_h" = "yes"
then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xsltCompilePattern in MinGW -lxslt" >&5
printf %s "checking for xsltCompilePattern in MinGW -lxslt... " >&6; }
if test ${ac_cv_mingw_lib_xslt+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_check_headers_saved_cc=$CC
ac_wine_check_headers_saved_exeext=$ac_exeext
ac_wine_check_headers_saved_libs=$LIBS
CC="$CROSSCC"
ac_exeext=".exe"
LIBS="-lxslt $XSLT_PE_LIBS $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. */
char xsltCompilePattern ();
int
main (void)
{
return xsltCompilePattern ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_mingw_lib_xslt=yes
else $as_nop
ac_cv_mingw_lib_xslt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CC=$ac_wine_check_headers_saved_cc
ac_exeext=$ac_wine_check_headers_saved_exeext
LIBS=$ac_wine_check_headers_saved_libs
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mingw_lib_xslt" >&5
printf "%s\n" "$ac_cv_mingw_lib_xslt" >&6; }
if test "x$ac_cv_mingw_lib_xslt" = xyes
then :
:
else $as_nop
XSLT_PE_CFLAGS=""; XSLT_PE_LIBS=""
fi
else
XSLT_PE_CFLAGS=""
XSLT_PE_LIBS=""
fi
CPPFLAGS=$ac_save_CPPFLAGS
if test "x$XSLT_PE_LIBS" = "x"
then
as_fn_append wine_notices "|libxslt ${notice_platform}MinGW development files not found; using bundled version."
fi
if ${ZLIB_PE_CFLAGS:+false} :
then :
if test ${MINGW_PKG_CONFIG+y}

View File

@ -1107,6 +1107,21 @@ then
WINE_NOTICE([libxml2 ${notice_platform}MinGW development files not found (or too old); using bundled version.])
fi
WINE_MINGW_PACKAGE_FLAGS(XSLT,[libxslt],[-lxslt],
[WINE_CHECK_MINGW_HEADER(libxslt/pattern.h)
WINE_CHECK_MINGW_HEADER(libxslt/transform.h)
if test "$ac_cv_mingw_header_libxslt_pattern_h" = "yes" -a "$ac_cv_mingw_header_libxslt_transform_h" = "yes"
then
WINE_CHECK_MINGW_LIB(xslt,xsltCompilePattern,[:],[XSLT_PE_CFLAGS=""; XSLT_PE_LIBS=""],[$XSLT_PE_LIBS])
else
XSLT_PE_CFLAGS=""
XSLT_PE_LIBS=""
fi])
if test "x$XSLT_PE_LIBS" = "x"
then
WINE_NOTICE([libxslt ${notice_platform}MinGW development files not found; using bundled version.])
fi
WINE_MINGW_PACKAGE_FLAGS(ZLIB,[zlib],[-lz],
[WINE_CHECK_MINGW_HEADER(zlib.h,
[WINE_CHECK_MINGW_LIB(z,inflate,[:],[ZLIB_PE_CFLAGS=""; ZLIB_PE_LIBS=""],[$ZLIB_PE_LIBS])],