Commit 75d40231 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Move the checks inside the WINE_PACKAGE_FLAGS macro to enable…

configure: Move the checks inside the WINE_PACKAGE_FLAGS macro to enable restoring CPPFLAGS automatically.
parent d04d1f52
...@@ -67,22 +67,29 @@ AS_VAR_POPDEF([ac_Lib])]) ...@@ -67,22 +67,29 @@ AS_VAR_POPDEF([ac_Lib])])
dnl **** Get flags from pkg-config or alternate xxx-config program **** dnl **** Get flags from pkg-config or alternate xxx-config program ****
dnl dnl
dnl Usage: WINE_PACKAGE_FLAGS(var,pkg-name,[default-lib,[cflags-alternate,libs-alternate]]) dnl Usage: WINE_PACKAGE_FLAGS(var,pkg-name,[default-lib,[cflags-alternate,libs-alternate,[checks]]])
dnl dnl
AC_DEFUN([WINE_PACKAGE_FLAGS], AC_DEFUN([WINE_PACKAGE_FLAGS],
[AC_REQUIRE([WINE_PATH_PKG_CONFIG])dnl [AC_REQUIRE([WINE_PATH_PKG_CONFIG])dnl
AC_ARG_VAR([$1]_CFLAGS, [C compiler flags for $2, overriding pkg-config])dnl AS_VAR_PUSHDEF([ac_cflags],[[$1]_CFLAGS])dnl
AS_IF([test -n "$[$1]_CFLAGS"],[], AS_VAR_PUSHDEF([ac_libs],[[$1]_LIBS])dnl
AC_ARG_VAR(ac_cflags, [C compiler flags for $2, overriding pkg-config])dnl
AS_IF([test -n "$ac_cflags"],[],
[test -n "$PKG_CONFIG"], [test -n "$PKG_CONFIG"],
[[$1]_CFLAGS=`$PKG_CONFIG --cflags [$2] 2>/dev/null`]) [ac_cflags=`$PKG_CONFIG --cflags [$2] 2>/dev/null`])
m4_ifval([$4],[[$1]_CFLAGS=[$]{[$1]_CFLAGS:-[$4]}]) m4_ifval([$4],[ac_cflags=[$]{ac_cflags:-[$4]}])
CPPFLAGS="$CPPFLAGS $[$1]_CFLAGS" AC_ARG_VAR(ac_libs, [Linker flags for $2, overriding pkg-config])dnl
AC_ARG_VAR([$1]_LIBS, [Linker flags for $2, overriding pkg-config])dnl AS_IF([test -n "$ac_libs"],[],
AS_IF([test -n "$[$1]_LIBS"],[],
[test -n "$PKG_CONFIG"], [test -n "$PKG_CONFIG"],
[[$1]_LIBS=`$PKG_CONFIG --libs [$2] 2>/dev/null`]) [ac_libs=`$PKG_CONFIG --libs [$2] 2>/dev/null`])
m4_ifval([$5],[[$1]_LIBS=[$]{[$1]_LIBS:-[$5]}]) m4_ifval([$5],[ac_libs=[$]{ac_libs:-[$5]}])
m4_ifval([$3],[[$1]_LIBS=[$]{[$1]_LIBS:-"$3"}])]) m4_ifval([$3],[ac_libs=[$]{ac_libs:-"$3"}])
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $ac_cflags"
$6
CPPFLAGS=$ac_save_CPPFLAGS
AS_VAR_POPDEF([ac_libs])dnl
AS_VAR_POPDEF([ac_cflags])])dnl
dnl **** Link C code with an assembly file **** dnl **** Link C code with an assembly file ****
dnl dnl
......
...@@ -9592,14 +9592,12 @@ test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_op ...@@ -9592,14 +9592,12 @@ test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_op
if test "x$with_xml" != "xno" if test "x$with_xml" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$XML2_CFLAGS"; then : if test -n "$XML2_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
XML2_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0 2>/dev/null` XML2_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0 2>/dev/null`
fi fi
XML2_CFLAGS=${XML2_CFLAGS:-`xml2-config --cflags 2>/dev/null`} XML2_CFLAGS=${XML2_CFLAGS:-`xml2-config --cflags 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $XML2_CFLAGS"
if test -n "$XML2_LIBS"; then : if test -n "$XML2_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -9607,7 +9605,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -9607,7 +9605,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
XML2_LIBS=${XML2_LIBS:-`xml2-config --libs 2>/dev/null`} XML2_LIBS=${XML2_LIBS:-`xml2-config --libs 2>/dev/null`}
XML2_LIBS=${XML2_LIBS:-"-lxml2"} XML2_LIBS=${XML2_LIBS:-"-lxml2"}
for ac_header in libxml/parser.h libxml/xmlsave.h libxml/SAX2.h ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $XML2_CFLAGS"
for ac_header in libxml/parser.h libxml/xmlsave.h libxml/SAX2.h
do : do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
...@@ -9888,7 +9888,8 @@ fi ...@@ -9888,7 +9888,8 @@ fi
XML2_CFLAGS="" XML2_CFLAGS=""
XML2_LIBS="" XML2_LIBS=""
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "$ac_cv_lib_xml2_xmlParseMemory" != "yes"; then : if test "$ac_cv_lib_xml2_xmlParseMemory" != "yes"; then :
case "x$with_xml" in case "x$with_xml" in
...@@ -9901,14 +9902,12 @@ fi ...@@ -9901,14 +9902,12 @@ fi
if test "x$with_xslt" != "xno" if test "x$with_xslt" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$XSLT_CFLAGS"; then : if test -n "$XSLT_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
XSLT_CFLAGS=`$PKG_CONFIG --cflags libxslt 2>/dev/null` XSLT_CFLAGS=`$PKG_CONFIG --cflags libxslt 2>/dev/null`
fi fi
XSLT_CFLAGS=${XSLT_CFLAGS:-`xslt-config --cflags 2>/dev/null`} XSLT_CFLAGS=${XSLT_CFLAGS:-`xslt-config --cflags 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $XSLT_CFLAGS"
if test -n "$XSLT_LIBS"; then : if test -n "$XSLT_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -9916,7 +9915,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -9916,7 +9915,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
XSLT_LIBS=${XSLT_LIBS:-`xslt-config --libs 2>/dev/null`} XSLT_LIBS=${XSLT_LIBS:-`xslt-config --libs 2>/dev/null`}
XSLT_LIBS=${XSLT_LIBS:-"-lxml2"} XSLT_LIBS=${XSLT_LIBS:-"-lxml2"}
for ac_header in libxslt/pattern.h libxslt/transform.h ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $XSLT_CFLAGS"
for ac_header in libxslt/pattern.h libxslt/transform.h
do : do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_LIBXSLT_PATTERN_H ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_LIBXSLT_PATTERN_H
...@@ -9932,7 +9933,6 @@ fi ...@@ -9932,7 +9933,6 @@ fi
done done
CPPFLAGS="$ac_save_CPPFLAGS"
if test "$ac_cv_header_libxslt_transform_h" = "yes" if test "$ac_cv_header_libxslt_transform_h" = "yes"
then then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lxslt" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lxslt" >&5
...@@ -9991,6 +9991,8 @@ fi ...@@ -9991,6 +9991,8 @@ fi
else else
XSLT_CFLAGS="" XSLT_CFLAGS=""
fi fi
CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "x$ac_cv_lib_soname_xslt" = "x"; then : if test "x$ac_cv_lib_soname_xslt" = "x"; then :
case "x$with_xslt" in case "x$with_xslt" in
...@@ -10003,14 +10005,12 @@ fi ...@@ -10003,14 +10005,12 @@ fi
if test "x$with_dbus" != "xno" if test "x$with_dbus" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$DBUS_CFLAGS"; then : if test -n "$DBUS_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null` DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
fi fi
CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
if test -n "$DBUS_LIBS"; then : if test -n "$DBUS_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10018,7 +10018,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10018,7 +10018,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default" ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
if test "x$ac_cv_header_dbus_dbus_h" = xyes; then : if test "x$ac_cv_header_dbus_dbus_h" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -ldbus-1" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -ldbus-1" >&5
$as_echo_n "checking for -ldbus-1... " >&6; } $as_echo_n "checking for -ldbus-1... " >&6; }
...@@ -10078,7 +10080,8 @@ else ...@@ -10078,7 +10080,8 @@ else
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "x$ac_cv_lib_soname_dbus_1" = "x" -a \ if test "x$ac_cv_lib_soname_dbus_1" = "x" -a \
"x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"; then : "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"; then :
...@@ -10092,14 +10095,12 @@ fi ...@@ -10092,14 +10095,12 @@ fi
if test "x$with_hal" != "xno" -a "x$ac_cv_lib_soname_dbus_1" != x if test "x$with_hal" != "xno" -a "x$ac_cv_lib_soname_dbus_1" != x
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$HAL_CFLAGS"; then : if test -n "$HAL_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
HAL_CFLAGS=`$PKG_CONFIG --cflags hal 2>/dev/null` HAL_CFLAGS=`$PKG_CONFIG --cflags hal 2>/dev/null`
fi fi
CPPFLAGS="$CPPFLAGS $HAL_CFLAGS"
if test -n "$HAL_LIBS"; then : if test -n "$HAL_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10107,7 +10108,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10107,7 +10108,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
HAL_LIBS=${HAL_LIBS:-"-ldbus-1"} HAL_LIBS=${HAL_LIBS:-"-ldbus-1"}
ac_fn_c_check_header_mongrel "$LINENO" "hal/libhal.h" "ac_cv_header_hal_libhal_h" "$ac_includes_default" ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $HAL_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "hal/libhal.h" "ac_cv_header_hal_libhal_h" "$ac_includes_default"
if test "x$ac_cv_header_hal_libhal_h" = xyes; then : if test "x$ac_cv_header_hal_libhal_h" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lhal" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lhal" >&5
$as_echo_n "checking for -lhal... " >&6; } $as_echo_n "checking for -lhal... " >&6; }
...@@ -10167,7 +10170,8 @@ else ...@@ -10167,7 +10170,8 @@ else
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
if test "x$ac_cv_lib_soname_hal" = "x" -a \ if test "x$ac_cv_lib_soname_hal" = "x" -a \
"x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"; then : "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"; then :
case "x$with_hal" in case "x$with_hal" in
...@@ -10181,14 +10185,12 @@ fi ...@@ -10181,14 +10185,12 @@ fi
if test "x$with_gnutls" != "xno" if test "x$with_gnutls" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$GNUTLS_CFLAGS"; then : if test -n "$GNUTLS_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
GNUTLS_CFLAGS=`$PKG_CONFIG --cflags gnutls 2>/dev/null` GNUTLS_CFLAGS=`$PKG_CONFIG --cflags gnutls 2>/dev/null`
fi fi
CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
if test -n "$GNUTLS_LIBS"; then : if test -n "$GNUTLS_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10196,7 +10198,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10196,7 +10198,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
...@@ -10271,7 +10275,8 @@ else ...@@ -10271,7 +10275,8 @@ else
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "x$ac_cv_lib_soname_gnutls" = "x"; then : if test "x$ac_cv_lib_soname_gnutls" = "x"; then :
case "x$with_gnutls" in case "x$with_gnutls" in
...@@ -10419,14 +10424,12 @@ fi ...@@ -10419,14 +10424,12 @@ fi
if test "x$with_sane" != "xno" if test "x$with_sane" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$SANE_CFLAGS"; then : if test -n "$SANE_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
SANE_CFLAGS=`$PKG_CONFIG --cflags libsane 2>/dev/null` SANE_CFLAGS=`$PKG_CONFIG --cflags libsane 2>/dev/null`
fi fi
SANE_CFLAGS=${SANE_CFLAGS:-`sane-config --cflags 2>/dev/null`} SANE_CFLAGS=${SANE_CFLAGS:-`sane-config --cflags 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $SANE_CFLAGS"
if test -n "$SANE_LIBS"; then : if test -n "$SANE_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10434,7 +10437,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10434,7 +10437,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
SANE_LIBS=${SANE_LIBS:-`sane-config --ldflags 2>/dev/null`} SANE_LIBS=${SANE_LIBS:-`sane-config --ldflags 2>/dev/null`}
ac_fn_c_check_header_mongrel "$LINENO" "sane/sane.h" "ac_cv_header_sane_sane_h" "$ac_includes_default" ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $SANE_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "sane/sane.h" "ac_cv_header_sane_sane_h" "$ac_includes_default"
if test "x$ac_cv_header_sane_sane_h" = xyes; then : if test "x$ac_cv_header_sane_sane_h" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lsane" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lsane" >&5
$as_echo_n "checking for -lsane... " >&6; } $as_echo_n "checking for -lsane... " >&6; }
...@@ -10494,7 +10499,8 @@ else ...@@ -10494,7 +10499,8 @@ else
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "x$ac_cv_lib_soname_sane" = "x"; then : if test "x$ac_cv_lib_soname_sane" = "x"; then :
case "x$with_sane" in case "x$with_sane" in
...@@ -10572,14 +10578,12 @@ fi ...@@ -10572,14 +10578,12 @@ fi
if test "x$with_gphoto" != "xno" if test "x$with_gphoto" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$GPHOTO2_CFLAGS"; then : if test -n "$GPHOTO2_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
GPHOTO2_CFLAGS=`$PKG_CONFIG --cflags libgphoto2 2>/dev/null` GPHOTO2_CFLAGS=`$PKG_CONFIG --cflags libgphoto2 2>/dev/null`
fi fi
GPHOTO2_CFLAGS=${GPHOTO2_CFLAGS:-`gphoto2-config --cflags 2>/dev/null`} GPHOTO2_CFLAGS=${GPHOTO2_CFLAGS:-`gphoto2-config --cflags 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $GPHOTO2_CFLAGS"
if test -n "$GPHOTO2_LIBS"; then : if test -n "$GPHOTO2_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10587,7 +10591,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10587,7 +10591,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
GPHOTO2_LIBS=${GPHOTO2_LIBS:-`gphoto2-config --libs 2>/dev/null`} GPHOTO2_LIBS=${GPHOTO2_LIBS:-`gphoto2-config --libs 2>/dev/null`}
GPHOTO2_LIBS=${GPHOTO2_LIBS:-"-lgphoto2"} GPHOTO2_LIBS=${GPHOTO2_LIBS:-"-lgphoto2"}
ac_fn_c_check_header_mongrel "$LINENO" "gphoto2-camera.h" "ac_cv_header_gphoto2_camera_h" "$ac_includes_default" ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GPHOTO2_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "gphoto2-camera.h" "ac_cv_header_gphoto2_camera_h" "$ac_includes_default"
if test "x$ac_cv_header_gphoto2_camera_h" = xyes; then : if test "x$ac_cv_header_gphoto2_camera_h" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gp_camera_new in -lgphoto2" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gp_camera_new in -lgphoto2" >&5
$as_echo_n "checking for gp_camera_new in -lgphoto2... " >&6; } $as_echo_n "checking for gp_camera_new in -lgphoto2... " >&6; }
...@@ -10638,13 +10644,14 @@ else ...@@ -10638,13 +10644,14 @@ else
fi fi
CPPFLAGS=$ac_save_CPPFLAGS
if test -n "$GPHOTO2_PORT_CFLAGS"; then : if test -n "$GPHOTO2_PORT_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
GPHOTO2_PORT_CFLAGS=`$PKG_CONFIG --cflags libgphoto2_port 2>/dev/null` GPHOTO2_PORT_CFLAGS=`$PKG_CONFIG --cflags libgphoto2_port 2>/dev/null`
fi fi
GPHOTO2_PORT_CFLAGS=${GPHOTO2_PORT_CFLAGS:-`gphoto2-port-config --cflags 2>/dev/null`} GPHOTO2_PORT_CFLAGS=${GPHOTO2_PORT_CFLAGS:-`gphoto2-port-config --cflags 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $GPHOTO2_PORT_CFLAGS"
if test -n "$GPHOTO2_PORT_LIBS"; then : if test -n "$GPHOTO2_PORT_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10652,7 +10659,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10652,7 +10659,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
GPHOTO2_PORT_LIBS=${GPHOTO2_PORT_LIBS:-`gphoto2-port-config --libs 2>/dev/null`} GPHOTO2_PORT_LIBS=${GPHOTO2_PORT_LIBS:-`gphoto2-port-config --libs 2>/dev/null`}
GPHOTO2_PORT_LIBS=${GPHOTO2_PORT_LIBS:-"-lgphoto2_port"} GPHOTO2_PORT_LIBS=${GPHOTO2_PORT_LIBS:-"-lgphoto2_port"}
ac_fn_c_check_header_mongrel "$LINENO" "gphoto2-port.h" "ac_cv_header_gphoto2_port_h" "$ac_includes_default" ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GPHOTO2_PORT_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "gphoto2-port.h" "ac_cv_header_gphoto2_port_h" "$ac_includes_default"
if test "x$ac_cv_header_gphoto2_port_h" = xyes; then : if test "x$ac_cv_header_gphoto2_port_h" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gp_port_info_list_new in -lgphoto2_port" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gp_port_info_list_new in -lgphoto2_port" >&5
$as_echo_n "checking for gp_port_info_list_new in -lgphoto2_port... " >&6; } $as_echo_n "checking for gp_port_info_list_new in -lgphoto2_port... " >&6; }
...@@ -10703,7 +10712,8 @@ else ...@@ -10703,7 +10712,8 @@ else
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"; then : if test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"; then :
case "x$with_gphoto" in case "x$with_gphoto" in
...@@ -10761,14 +10771,12 @@ fi ...@@ -10761,14 +10771,12 @@ fi
if test "x$with_lcms2" != "xno" if test "x$with_lcms2" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$LCMS2_CFLAGS"; then : if test -n "$LCMS2_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
LCMS2_CFLAGS=`$PKG_CONFIG --cflags lcms2 2>/dev/null` LCMS2_CFLAGS=`$PKG_CONFIG --cflags lcms2 2>/dev/null`
fi fi
CPPFLAGS="$CPPFLAGS $LCMS2_CFLAGS"
if test -n "$LCMS2_LIBS"; then : if test -n "$LCMS2_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10776,7 +10784,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10776,7 +10784,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
LCMS2_LIBS=${LCMS2_LIBS:-"-llcms2"} LCMS2_LIBS=${LCMS2_LIBS:-"-llcms2"}
for ac_header in lcms2.h ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LCMS2_CFLAGS"
for ac_header in lcms2.h
do : do :
ac_fn_c_check_header_mongrel "$LINENO" "lcms2.h" "ac_cv_header_lcms2_h" "$ac_includes_default" 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 : if test "x$ac_cv_header_lcms2_h" = xyes; then :
...@@ -10838,7 +10848,8 @@ fi ...@@ -10838,7 +10848,8 @@ fi
LCMS2_CFLAGS="" LCMS2_CFLAGS=""
LCMS2_LIBS="" LCMS2_LIBS=""
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"; then : if test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"; then :
case "x$with_cms" in case "x$with_cms" in
...@@ -10851,14 +10862,12 @@ fi ...@@ -10851,14 +10862,12 @@ fi
if test "x$with_freetype" != "xno" if test "x$with_freetype" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$FREETYPE_CFLAGS"; then : if test -n "$FREETYPE_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
FREETYPE_CFLAGS=`$PKG_CONFIG --cflags freetype2 2>/dev/null` FREETYPE_CFLAGS=`$PKG_CONFIG --cflags freetype2 2>/dev/null`
fi fi
FREETYPE_CFLAGS=${FREETYPE_CFLAGS:-`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`} FREETYPE_CFLAGS=${FREETYPE_CFLAGS:-`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`}
CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
if test -n "$FREETYPE_LIBS"; then : if test -n "$FREETYPE_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -10866,7 +10875,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -10866,7 +10875,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
FREETYPE_LIBS=${FREETYPE_LIBS:-`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`} FREETYPE_LIBS=${FREETYPE_LIBS:-`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`}
FREETYPE_LIBS=${FREETYPE_LIBS:-"-lfreetype"} FREETYPE_LIBS=${FREETYPE_LIBS:-"-lfreetype"}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lfreetype" >&5 ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lfreetype" >&5
$as_echo_n "checking for -lfreetype... " >&6; } $as_echo_n "checking for -lfreetype... " >&6; }
if ${ac_cv_lib_soname_freetype+:} false; then : if ${ac_cv_lib_soname_freetype+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
...@@ -10935,8 +10946,8 @@ fi ...@@ -10935,8 +10946,8 @@ fi
do : do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_FT2BUILD_H ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_FT2BUILD_H
# include <ft2build.h> # include <ft2build.h>
#endif #endif
" "
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -10950,7 +10961,7 @@ done ...@@ -10950,7 +10961,7 @@ done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <ft2build.h> #include <ft2build.h>
#include <freetype/fttrigon.h> #include <freetype/fttrigon.h>
_ACEOF _ACEOF
if ac_fn_c_try_cpp "$LINENO"; then : if ac_fn_c_try_cpp "$LINENO"; then :
...@@ -10983,7 +10994,8 @@ $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h ...@@ -10983,7 +10994,8 @@ $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
else else
FREETYPE_LIBS="" FREETYPE_LIBS=""
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "x$ac_cv_header_freetype_freetype_h" != xyes -o "x$wine_cv_fttrigon" != xyes; then : if test "x$ac_cv_header_freetype_freetype_h" != xyes -o "x$wine_cv_fttrigon" != xyes; then :
case "x$with_freetype" in case "x$with_freetype" in
...@@ -11167,14 +11179,12 @@ fi ...@@ -11167,14 +11179,12 @@ fi
if test "x$with_gstreamer" != "xno" if test "x$with_gstreamer" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$GSTREAMER_CFLAGS"; then : if test -n "$GSTREAMER_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags gstreamer-app-0.10 2>/dev/null` GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags gstreamer-app-0.10 2>/dev/null`
fi fi
CPPFLAGS="$CPPFLAGS $GSTREAMER_CFLAGS"
if test -n "$GSTREAMER_LIBS"; then : if test -n "$GSTREAMER_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -11182,7 +11192,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -11182,7 +11192,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
ac_gst_incl="" ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GSTREAMER_CFLAGS"
ac_gst_incl=""
for i in $GSTREAMER_CFLAGS for i in $GSTREAMER_CFLAGS
do do
case "$i" in case "$i" in
...@@ -11303,7 +11315,8 @@ else ...@@ -11303,7 +11315,8 @@ else
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "x$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" != xyes -a "x$ac_cv_header_QuickTime_ImageCompression_h" != xyes; then : if test "x$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" != xyes -a "x$ac_cv_header_QuickTime_ImageCompression_h" != xyes; then :
case "x$with_gstreamer" in case "x$with_gstreamer" in
...@@ -11834,14 +11847,12 @@ fi ...@@ -11834,14 +11847,12 @@ fi
if test "x$with_png" != "xno" if test "x$with_png" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$PNG_CFLAGS"; then : if test -n "$PNG_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
PNG_CFLAGS=`$PKG_CONFIG --cflags libpng 2>/dev/null` PNG_CFLAGS=`$PKG_CONFIG --cflags libpng 2>/dev/null`
fi fi
PNG_CFLAGS=${PNG_CFLAGS:-$X_CFLAGS} PNG_CFLAGS=${PNG_CFLAGS:-$X_CFLAGS}
CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"
if test -n "$PNG_LIBS"; then : if test -n "$PNG_LIBS"; then :
elif test -n "$PKG_CONFIG"; then : elif test -n "$PKG_CONFIG"; then :
...@@ -11849,7 +11860,9 @@ elif test -n "$PKG_CONFIG"; then : ...@@ -11849,7 +11860,9 @@ elif test -n "$PKG_CONFIG"; then :
fi fi
PNG_LIBS=${PNG_LIBS:-$X_LIBS} PNG_LIBS=${PNG_LIBS:-$X_LIBS}
for ac_header in png.h ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"
for ac_header in png.h
do : do :
ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default" 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 : if test "x$ac_cv_header_png_h" = xyes; then :
...@@ -11935,7 +11948,8 @@ fi ...@@ -11935,7 +11948,8 @@ fi
else else
PNG_CFLAGS="" PNG_CFLAGS=""
fi fi
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS=$ac_save_CPPFLAGS
fi fi
if test "x$ac_cv_lib_soname_png" = "x"; then : if test "x$ac_cv_lib_soname_png" = "x"; then :
case "x$with_png" in case "x$with_png" in
......
...@@ -1262,10 +1262,9 @@ dnl **** Check for libxml2 **** ...@@ -1262,10 +1262,9 @@ dnl **** Check for libxml2 ****
if test "x$with_xml" != "xno" if test "x$with_xml" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
WINE_PACKAGE_FLAGS(XML2,[libxml-2.0],[-lxml2], WINE_PACKAGE_FLAGS(XML2,[libxml-2.0],[-lxml2],
[`xml2-config --cflags 2>/dev/null`],[`xml2-config --libs 2>/dev/null`]) [`xml2-config --cflags 2>/dev/null`],[`xml2-config --libs 2>/dev/null`],
AC_CHECK_HEADERS([libxml/parser.h libxml/xmlsave.h libxml/SAX2.h]) [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" 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 then
AC_CHECK_LIB(xml2, xmlParseMemory, AC_CHECK_LIB(xml2, xmlParseMemory,
...@@ -1285,28 +1284,25 @@ then ...@@ -1285,28 +1284,25 @@ then
else else
XML2_CFLAGS="" XML2_CFLAGS=""
XML2_LIBS="" XML2_LIBS=""
fi fi])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_WARNING_WITH(xml,[test "$ac_cv_lib_xml2_xmlParseMemory" != "yes"], WINE_WARNING_WITH(xml,[test "$ac_cv_lib_xml2_xmlParseMemory" != "yes"],
[libxml2 ${notice_platform}development files not found (or too old), XML won't be supported.]) [libxml2 ${notice_platform}development files not found (or too old), XML won't be supported.])
if test "x$with_xslt" != "xno" if test "x$with_xslt" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
WINE_PACKAGE_FLAGS(XSLT,[libxslt],[-lxml2], WINE_PACKAGE_FLAGS(XSLT,[libxslt],[-lxml2],
[`xslt-config --cflags 2>/dev/null`],[`xslt-config --libs 2>/dev/null`]) [`xslt-config --cflags 2>/dev/null`],[`xslt-config --libs 2>/dev/null`],
AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],,, [AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],,,
[#ifdef HAVE_LIBXSLT_PATTERN_H [#ifdef HAVE_LIBXSLT_PATTERN_H
# include <libxslt/pattern.h> # include <libxslt/pattern.h>
#endif]) #endif])
CPPFLAGS="$ac_save_CPPFLAGS"
if test "$ac_cv_header_libxslt_transform_h" = "yes" if test "$ac_cv_header_libxslt_transform_h" = "yes"
then then
WINE_CHECK_SONAME(xslt,xsltCompilePattern,,,[$XSLT_LIBS]) WINE_CHECK_SONAME(xslt,xsltCompilePattern,,,[$XSLT_LIBS])
else else
XSLT_CFLAGS="" XSLT_CFLAGS=""
fi fi])
fi fi
WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"], WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"],
[libxslt ${notice_platform}development files not found, xslt won't be supported.]) [libxslt ${notice_platform}development files not found, xslt won't be supported.])
...@@ -1314,12 +1310,10 @@ WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"], ...@@ -1314,12 +1310,10 @@ WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"],
dnl **** Check for libdbus **** dnl **** Check for libdbus ****
if test "x$with_dbus" != "xno" if test "x$with_dbus" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" WINE_PACKAGE_FLAGS(DBUS,[dbus-1],,,,
WINE_PACKAGE_FLAGS(DBUS,[dbus-1]) [AC_CHECK_HEADER([dbus/dbus.h],
AC_CHECK_HEADER([dbus/dbus.h],
[WINE_CHECK_SONAME(dbus-1, dbus_connection_close,,[DBUS_CFLAGS=""],[$DBUS_LIBS])], [WINE_CHECK_SONAME(dbus-1, dbus_connection_close,,[DBUS_CFLAGS=""],[$DBUS_LIBS])],
[DBUS_CFLAGS=""]) [DBUS_CFLAGS=""])])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_NOTICE_WITH(dbus,[test "x$ac_cv_lib_soname_dbus_1" = "x" -a \ WINE_NOTICE_WITH(dbus,[test "x$ac_cv_lib_soname_dbus_1" = "x" -a \
"x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"], "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
...@@ -1328,12 +1322,10 @@ WINE_NOTICE_WITH(dbus,[test "x$ac_cv_lib_soname_dbus_1" = "x" -a \ ...@@ -1328,12 +1322,10 @@ WINE_NOTICE_WITH(dbus,[test "x$ac_cv_lib_soname_dbus_1" = "x" -a \
dnl **** Check for libhal **** dnl **** Check for libhal ****
if test "x$with_hal" != "xno" -a "x$ac_cv_lib_soname_dbus_1" != x if test "x$with_hal" != "xno" -a "x$ac_cv_lib_soname_dbus_1" != x
then then
ac_save_CPPFLAGS="$CPPFLAGS" WINE_PACKAGE_FLAGS(HAL,[hal],[-ldbus-1],,,
WINE_PACKAGE_FLAGS(HAL,[hal],[-ldbus-1]) [AC_CHECK_HEADER([hal/libhal.h],
AC_CHECK_HEADER([hal/libhal.h],
[WINE_CHECK_SONAME(hal, libhal_ctx_new,,[HAL_CFLAGS=""],[$HAL_LIBS])], [WINE_CHECK_SONAME(hal, libhal_ctx_new,,[HAL_CFLAGS=""],[$HAL_LIBS])],
[HAL_CFLAGS=""]) [HAL_CFLAGS=""])])
CPPFLAGS="$ac_save_CPPFLAGS"
WINE_NOTICE_WITH(hal,[test "x$ac_cv_lib_soname_hal" = "x" -a \ WINE_NOTICE_WITH(hal,[test "x$ac_cv_lib_soname_hal" = "x" -a \
"x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"], "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
[libhal ${notice_platform}development files not found, no legacy dynamic device support.]) [libhal ${notice_platform}development files not found, no legacy dynamic device support.])
...@@ -1342,14 +1334,12 @@ fi ...@@ -1342,14 +1334,12 @@ fi
dnl **** Check for libgnutls **** dnl **** Check for libgnutls ****
if test "x$with_gnutls" != "xno" if test "x$with_gnutls" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" WINE_PACKAGE_FLAGS(GNUTLS,[gnutls],,,,
WINE_PACKAGE_FLAGS(GNUTLS,[gnutls]) [AC_CHECK_HEADER(gnutls/gnutls.h,
AC_CHECK_HEADER(gnutls/gnutls.h,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h> [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>]], [[static typeof(gnutls_mac_get_key_size) *func; if (func) return 0;]])], #include <gnutls/crypto.h>]], [[static typeof(gnutls_mac_get_key_size) *func; if (func) return 0;]])],
[WINE_CHECK_SONAME(gnutls,gnutls_global_init,,[GNUTLS_CFLAGS=""],[$GNUTLS_LIBS])])], [WINE_CHECK_SONAME(gnutls,gnutls_global_init,,[GNUTLS_CFLAGS=""],[$GNUTLS_LIBS])])],
[GNUTLS_CFLAGS=""]) [GNUTLS_CFLAGS=""])])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_NOTICE_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"], WINE_NOTICE_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"],
[libgnutls ${notice_platform}development files not found, no schannel support.]) [libgnutls ${notice_platform}development files not found, no schannel support.])
...@@ -1373,12 +1363,10 @@ WINE_NOTICE_WITH(curses,[test "x$ac_cv_lib_soname_curses$ac_cv_lib_soname_ncurse ...@@ -1373,12 +1363,10 @@ WINE_NOTICE_WITH(curses,[test "x$ac_cv_lib_soname_curses$ac_cv_lib_soname_ncurse
dnl **** Check for SANE **** dnl **** Check for SANE ****
if test "x$with_sane" != "xno" if test "x$with_sane" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" WINE_PACKAGE_FLAGS(SANE,[libsane],,[`sane-config --cflags 2>/dev/null`],[`sane-config --ldflags 2>/dev/null`],
WINE_PACKAGE_FLAGS(SANE,[libsane],,[`sane-config --cflags 2>/dev/null`],[`sane-config --ldflags 2>/dev/null`]) [AC_CHECK_HEADER(sane/sane.h,
AC_CHECK_HEADER(sane/sane.h,
[WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])], [WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])],
[SANE_CFLAGS=""]) [SANE_CFLAGS=""])])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_NOTICE_WITH(sane,[test "x$ac_cv_lib_soname_sane" = "x"], WINE_NOTICE_WITH(sane,[test "x$ac_cv_lib_soname_sane" = "x"],
[libsane ${notice_platform}development files not found, scanners won't be supported.]) [libsane ${notice_platform}development files not found, scanners won't be supported.])
...@@ -1394,25 +1382,23 @@ WINE_NOTICE_WITH(v4l,[test "x$ac_cv_lib_soname_v4l1" = "x"], ...@@ -1394,25 +1382,23 @@ WINE_NOTICE_WITH(v4l,[test "x$ac_cv_lib_soname_v4l1" = "x"],
dnl **** Check for libgphoto2 **** dnl **** Check for libgphoto2 ****
if test "x$with_gphoto" != "xno" if test "x$with_gphoto" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
WINE_PACKAGE_FLAGS(GPHOTO2,[libgphoto2],[-lgphoto2], WINE_PACKAGE_FLAGS(GPHOTO2,[libgphoto2],[-lgphoto2],
[`gphoto2-config --cflags 2>/dev/null`],[`gphoto2-config --libs 2>/dev/null`]) [`gphoto2-config --cflags 2>/dev/null`],[`gphoto2-config --libs 2>/dev/null`],
AC_CHECK_HEADER(gphoto2-camera.h, [AC_CHECK_HEADER(gphoto2-camera.h,
[AC_CHECK_LIB(gphoto2,gp_camera_new, [AC_CHECK_LIB(gphoto2,gp_camera_new,
[AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have the libgphoto2 development environment])], [AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have the libgphoto2 development environment])],
[GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""], [GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""],
[$GPHOTO2_LIBS])], [$GPHOTO2_LIBS])],
[GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""]) [GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""])])
WINE_PACKAGE_FLAGS(GPHOTO2_PORT,[libgphoto2_port],[-lgphoto2_port], WINE_PACKAGE_FLAGS(GPHOTO2_PORT,[libgphoto2_port],[-lgphoto2_port],
[`gphoto2-port-config --cflags 2>/dev/null`], [`gphoto2-port-config --cflags 2>/dev/null`],
[`gphoto2-port-config --libs 2>/dev/null`]) [`gphoto2-port-config --libs 2>/dev/null`],
AC_CHECK_HEADER(gphoto2-port.h, [AC_CHECK_HEADER(gphoto2-port.h,
[AC_CHECK_LIB(gphoto2_port,gp_port_info_list_new, [AC_CHECK_LIB(gphoto2_port,gp_port_info_list_new,
[AC_DEFINE(HAVE_GPHOTO2_PORT, 1, [Define if we have the libgphoto2_port development environment])], [AC_DEFINE(HAVE_GPHOTO2_PORT, 1, [Define if we have the libgphoto2_port development environment])],
[GPHOTO2_PORT_LIBS=""; GPHOTO2_PORT_CFLAGS=""], [GPHOTO2_PORT_LIBS=""; GPHOTO2_PORT_CFLAGS=""],
[$GPHOTO2_PORT_LIBS])], [$GPHOTO2_PORT_LIBS])],
[GPHOTO2_PORT_LIBS=""; GPHOTO2_PORT_CFLAGS=""]) [GPHOTO2_PORT_LIBS=""; GPHOTO2_PORT_CFLAGS=""])])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"], WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"],
[libgphoto2 ${notice_platform}development files not found, digital cameras won't be supported.]) [libgphoto2 ${notice_platform}development files not found, digital cameras won't be supported.])
...@@ -1443,9 +1429,8 @@ fi ...@@ -1443,9 +1429,8 @@ fi
dnl **** Check for LittleCMS *** dnl **** Check for LittleCMS ***
if test "x$with_lcms2" != "xno" if test "x$with_lcms2" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" WINE_PACKAGE_FLAGS(LCMS2,[lcms2],[-llcms2],,,
WINE_PACKAGE_FLAGS(LCMS2,[lcms2],[-llcms2]) [AC_CHECK_HEADERS([lcms2.h])
AC_CHECK_HEADERS([lcms2.h])
if test "$ac_cv_header_lcms2_h" = "yes" if test "$ac_cv_header_lcms2_h" = "yes"
then then
AC_CHECK_LIB(lcms2, cmsOpenProfileFromFile, AC_CHECK_LIB(lcms2, cmsOpenProfileFromFile,
...@@ -1453,8 +1438,7 @@ then ...@@ -1453,8 +1438,7 @@ then
else else
LCMS2_CFLAGS="" LCMS2_CFLAGS=""
LCMS2_LIBS="" LCMS2_LIBS=""
fi fi])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"], WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"],
[liblcms2 ${notice_platform}development files not found, Color Management won't be supported.]) [liblcms2 ${notice_platform}development files not found, Color Management won't be supported.])
...@@ -1462,11 +1446,10 @@ WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"], ...@@ -1462,11 +1446,10 @@ WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"],
dnl **** Check for FreeType 2 **** dnl **** Check for FreeType 2 ****
if test "x$with_freetype" != "xno" if test "x$with_freetype" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS"
WINE_PACKAGE_FLAGS(FREETYPE,[freetype2],[-lfreetype], WINE_PACKAGE_FLAGS(FREETYPE,[freetype2],[-lfreetype],
[`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`], [`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`],
[`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`]) [`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`],
WINE_CHECK_SONAME(freetype,FT_Init_FreeType,[ft_lib=yes],[ft_lib=no],[$FREETYPE_LIBS]) [WINE_CHECK_SONAME(freetype,FT_Init_FreeType,[ft_lib=yes],[ft_lib=no],[$FREETYPE_LIBS])
if test "$ft_lib" = "yes" if test "$ft_lib" = "yes"
then then
AC_CHECK_HEADERS(ft2build.h \ AC_CHECK_HEADERS(ft2build.h \
...@@ -1481,10 +1464,10 @@ then ...@@ -1481,10 +1464,10 @@ then
freetype/ftmodapi.h \ freetype/ftmodapi.h \
freetype/ftlcdfil.h,,, freetype/ftlcdfil.h,,,
[#ifdef HAVE_FT2BUILD_H [#ifdef HAVE_FT2BUILD_H
# include <ft2build.h> # include <ft2build.h>
#endif]) #endif])
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <ft2build.h> AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <ft2build.h>
#include <freetype/fttrigon.h>]])],[AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1, #include <freetype/fttrigon.h>]])],[AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
[Define if you have the <freetype/fttrigon.h> header file.]) [Define if you have the <freetype/fttrigon.h> header file.])
wine_cv_fttrigon=yes],[wine_cv_fttrigon=no]) wine_cv_fttrigon=yes],[wine_cv_fttrigon=no])
AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <freetype/ftmodapi.h>]) AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <freetype/ftmodapi.h>])
...@@ -1497,8 +1480,7 @@ then ...@@ -1497,8 +1480,7 @@ then
fi fi
else else
FREETYPE_LIBS="" FREETYPE_LIBS=""
fi fi])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_ERROR_WITH(freetype,[test "x$ac_cv_header_freetype_freetype_h" != xyes -o "x$wine_cv_fttrigon" != xyes], WINE_ERROR_WITH(freetype,[test "x$ac_cv_header_freetype_freetype_h" != xyes -o "x$wine_cv_fttrigon" != xyes],
[FreeType ${notice_platform}development files not found. Fonts will not be built.]) [FreeType ${notice_platform}development files not found. Fonts will not be built.])
...@@ -1549,9 +1531,8 @@ fi ...@@ -1549,9 +1531,8 @@ fi
dnl **** Check for gstreamer **** dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno" if test "x$with_gstreamer" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" WINE_PACKAGE_FLAGS(GSTREAMER,[gstreamer-app-0.10],,,,
WINE_PACKAGE_FLAGS(GSTREAMER,[gstreamer-app-0.10]) [ac_gst_incl=""
ac_gst_incl=""
for i in $GSTREAMER_CFLAGS for i in $GSTREAMER_CFLAGS
do do
case "$i" in case "$i" in
...@@ -1569,8 +1550,7 @@ then ...@@ -1569,8 +1550,7 @@ then
AC_CHECK_LIB(gstreamer-0.10,gst_pad_get_caps_reffed, AC_CHECK_LIB(gstreamer-0.10,gst_pad_get_caps_reffed,
[AC_CHECK_LIB(gstapp-0.10,gst_app_buffer_new,[:],,[$GSTREAMER_LIBS])])], [AC_CHECK_LIB(gstapp-0.10,gst_app_buffer_new,[:],,[$GSTREAMER_LIBS])])],
[AC_MSG_RESULT([no])])])], [AC_MSG_RESULT([no])])])],
[GSTREAMER_CFLAGS=""]) [GSTREAMER_CFLAGS=""])])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_NOTICE_WITH(gstreamer,[test "x$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" != xyes -a "x$ac_cv_header_QuickTime_ImageCompression_h" != xyes], WINE_NOTICE_WITH(gstreamer,[test "x$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" != xyes -a "x$ac_cv_header_QuickTime_ImageCompression_h" != xyes],
[gstreamer-0.10 base plugins ${notice_platform}development files not found, gstreamer support disabled]) [gstreamer-0.10 base plugins ${notice_platform}development files not found, gstreamer support disabled])
...@@ -1676,9 +1656,8 @@ WINE_WARNING_WITH(jpeg,[test "x$ac_cv_lib_soname_jpeg" = "x"], ...@@ -1676,9 +1656,8 @@ WINE_WARNING_WITH(jpeg,[test "x$ac_cv_lib_soname_jpeg" = "x"],
dnl **** Check for libpng **** dnl **** Check for libpng ****
if test "x$with_png" != "xno" if test "x$with_png" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" WINE_PACKAGE_FLAGS(PNG,[libpng],,[$X_CFLAGS],[$X_LIBS],
WINE_PACKAGE_FLAGS(PNG,[libpng],,[$X_CFLAGS],[$X_LIBS]) [AC_CHECK_HEADERS([png.h])
AC_CHECK_HEADERS([png.h])
if test "$ac_cv_header_png_h" = "yes" if test "$ac_cv_header_png_h" = "yes"
then then
WINE_CHECK_SONAME(png,png_create_read_struct, WINE_CHECK_SONAME(png,png_create_read_struct,
...@@ -1687,8 +1666,7 @@ then ...@@ -1687,8 +1666,7 @@ then
[PNG_CFLAGS=""],[$PNG_LIBS -lm -lz],[[libpng[[0-9]]*]]) [PNG_CFLAGS=""],[$PNG_LIBS -lm -lz],[[libpng[[0-9]]*]])
else else
PNG_CFLAGS="" PNG_CFLAGS=""
fi fi])
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_WARNING_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"], WINE_WARNING_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"],
[libpng ${notice_platform}development files not found, PNG won't be supported.]) [libpng ${notice_platform}development files not found, PNG won't be supported.])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment