configure: Use the pkg-config helper macro for gstreamer.

This commit is contained in:
Alexandre Julliard 2013-05-03 17:44:45 +02:00
parent 100806e473
commit 96d9a7dec2
3 changed files with 52 additions and 37 deletions

55
configure vendored
View File

@ -646,8 +646,8 @@ FONTCONFIGINCL
CUPSINCL CUPSINCL
OSS4INCL OSS4INCL
ALSALIBS ALSALIBS
GSTREAMER_INCL
GSTREAMER_LIBS GSTREAMER_LIBS
GSTREAMER_CFLAGS
LIBGETTEXTPO LIBGETTEXTPO
ZLIB ZLIB
FREETYPE_LIBS FREETYPE_LIBS
@ -875,7 +875,9 @@ SANE_LIBS
GPHOTO2_CFLAGS GPHOTO2_CFLAGS
GPHOTO2_LIBS GPHOTO2_LIBS
FREETYPE_CFLAGS FREETYPE_CFLAGS
FREETYPE_LIBS' FREETYPE_LIBS
GSTREAMER_CFLAGS
GSTREAMER_LIBS'
# Initialize some variables set by options. # Initialize some variables set by options.
@ -1584,6 +1586,10 @@ Some influential environment variables:
C compiler flags for freetype2, overriding pkg-config C compiler flags for freetype2, overriding pkg-config
FREETYPE_LIBS FREETYPE_LIBS
Linker flags for freetype2, overriding pkg-config Linker flags for freetype2, overriding pkg-config
GSTREAMER_CFLAGS
C compiler flags for gstreamer-app-0.10, overriding pkg-config
GSTREAMER_LIBS
Linker flags for gstreamer-app-0.10, overriding pkg-config
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. it to find libraries and programs with nonstandard names/locations.
@ -11131,17 +11137,30 @@ fi
if test "x$with_gstreamer" != "xno" if test "x$with_gstreamer" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" ac_save_CPPFLAGS="$CPPFLAGS"
if test "$PKG_CONFIG" != "false"; then if test -n "$GSTREAMER_CFLAGS"; then :
ac_gst_incl=""
for i in `$PKG_CONFIG --cflags gstreamer-app-0.10 2>/dev/null` elif test -n "$PKG_CONFIG"; then :
do GSTREAMER_CFLAGS=`$PKG_CONFIG --cflags gstreamer-app-0.10 2>/dev/null`
case "$i" in fi
-I*) ac_gst_incl="$ac_gst_incl $i";;
esac CPPFLAGS="$CPPFLAGS $GSTREAMER_CFLAGS"
done if test -n "$GSTREAMER_LIBS"; then :
ac_gst_libs="`$PKG_CONFIG --libs gstreamer-app-0.10 2>/dev/null`"
CPPFLAGS="$CPPFLAGS $ac_gst_incl" elif test -n "$PKG_CONFIG"; then :
ac_fn_c_check_header_mongrel "$LINENO" "gst/gstpad.h" "ac_cv_header_gst_gstpad_h" "$ac_includes_default" GSTREAMER_LIBS=`$PKG_CONFIG --libs gstreamer-app-0.10 2>/dev/null`
fi
ac_gst_incl=""
for i in $GSTREAMER_CFLAGS
do
case "$i" in
-I*) ac_gst_incl="$ac_gst_incl $i";;
esac
done
GSTREAMER_CFLAGS=$ac_gst_incl
CPPFLAGS="$ac_save_CPPFLAGS $GSTREAMER_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "gst/gstpad.h" "ac_cv_header_gst_gstpad_h" "$ac_includes_default"
if test "x$ac_cv_header_gst_gstpad_h" = xyes; then : if test "x$ac_cv_header_gst_gstpad_h" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "gst/app/gstappsink.h" "ac_cv_header_gst_app_gstappsink_h" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "gst/app/gstappsink.h" "ac_cv_header_gst_app_gstappsink_h" "$ac_includes_default"
if test "x$ac_cv_header_gst_app_gstappsink_h" = xyes; then : if test "x$ac_cv_header_gst_app_gstappsink_h" = xyes; then :
@ -11204,7 +11223,7 @@ if ${ac_cv_lib_gstapp_0_10_gst_app_buffer_new+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_check_lib_save_LIBS=$LIBS
LIBS="-lgstapp-0.10 $ac_gst_libs $LIBS" LIBS="-lgstapp-0.10 $GSTREAMER_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
@ -11235,10 +11254,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gstapp_0_10_gst_app_buffer_new" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gstapp_0_10_gst_app_buffer_new" >&5
$as_echo "$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" >&6; } $as_echo "$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" >&6; }
if test "x$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" = xyes; then : if test "x$ac_cv_lib_gstapp_0_10_gst_app_buffer_new" = xyes; then :
GSTREAMER_LIBS="$ac_gst_libs" :
GSTREAMER_INCL="$ac_gst_incl"
fi fi
fi fi
@ -11251,10 +11267,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
else
GSTREAMER_CFLAGS=""
fi 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 :

View File

@ -1536,28 +1536,26 @@ dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno" if test "x$with_gstreamer" != "xno"
then then
ac_save_CPPFLAGS="$CPPFLAGS" ac_save_CPPFLAGS="$CPPFLAGS"
if test "$PKG_CONFIG" != "false"; then WINE_PACKAGE_FLAGS(GSTREAMER,[gstreamer-app-0.10])
ac_gst_incl="" ac_gst_incl=""
for i in `$PKG_CONFIG --cflags gstreamer-app-0.10 2>/dev/null` for i in $GSTREAMER_CFLAGS
do do
case "$i" in case "$i" in
-I*) ac_gst_incl="$ac_gst_incl $i";; -I*) ac_gst_incl="$ac_gst_incl $i";;
esac esac
done done
ac_gst_libs="`$PKG_CONFIG --libs gstreamer-app-0.10 2>/dev/null`" GSTREAMER_CFLAGS=$ac_gst_incl
CPPFLAGS="$CPPFLAGS $ac_gst_incl" CPPFLAGS="$ac_save_CPPFLAGS $GSTREAMER_CFLAGS"
AC_CHECK_HEADER([gst/gstpad.h], AC_CHECK_HEADER([gst/gstpad.h],
[AC_CHECK_HEADER([gst/app/gstappsink.h], [AC_CHECK_HEADER([gst/app/gstappsink.h],
[AC_MSG_CHECKING([whether gint64 defined by gst/app/gstappsink.h is indeed 64-bit]) [AC_MSG_CHECKING([whether gint64 defined by gst/app/gstappsink.h is indeed 64-bit])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gst/app/gstappsink.h>]], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gst/app/gstappsink.h>]],
[[static int a[sizeof(gint64) > 4 ? 1 : -1]; if (a[0]) return 0;]])], [[static int a[sizeof(gint64) > 4 ? 1 : -1]; if (a[0]) return 0;]])],
[AC_MSG_RESULT([yes]) [AC_MSG_RESULT([yes])
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, [AC_CHECK_LIB(gstapp-0.10,gst_app_buffer_new,[:],,[$GSTREAMER_LIBS])])],
[AC_SUBST(GSTREAMER_LIBS,"$ac_gst_libs") [AC_MSG_RESULT([no])])])],
AC_SUBST(GSTREAMER_INCL,"$ac_gst_incl")],,[$ac_gst_libs])])], [GSTREAMER_CFLAGS=""])
[AC_MSG_RESULT([no])])])])
fi
CPPFLAGS="$ac_save_CPPFLAGS" 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],

View File

@ -1,6 +1,6 @@
MODULE = winegstreamer.dll MODULE = winegstreamer.dll
IMPORTS = strmbase strmiids uuid winmm msacm32 msvfw32 ole32 oleaut32 user32 gdi32 advapi32 IMPORTS = strmbase strmiids uuid winmm msacm32 msvfw32 ole32 oleaut32 user32 gdi32 advapi32
EXTRAINCL = @GSTREAMER_INCL@ EXTRAINCL = @GSTREAMER_CFLAGS@
EXTRALIBS = @GSTREAMER_LIBS@ @LIBPTHREAD@ EXTRALIBS = @GSTREAMER_LIBS@ @LIBPTHREAD@
C_SRCS = \ C_SRCS = \