mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 15:02:40 +00:00
configure: Add parameter to select GTK+ version to use and default to 2.0
This commit is contained in:
parent
dfdb83e7b1
commit
4315bd235e
1 changed files with 23 additions and 6 deletions
29
configure.ac
29
configure.ac
|
@ -194,13 +194,30 @@ AC_SUBST(GST_PREFIX)
|
||||||
AC_SUBST(GSTPB_PREFIX)
|
AC_SUBST(GSTPB_PREFIX)
|
||||||
|
|
||||||
dnl GTK is optional and only used in examples
|
dnl GTK is optional and only used in examples
|
||||||
PKG_CHECK_MODULES(GTK, gtk+-3.0, HAVE_GTK=yes,
|
HAVE_GTK=no
|
||||||
[PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.14.0, HAVE_GTK=yes, HAVE_GTK=no)])
|
HAVE_GTK_X11=no
|
||||||
|
GTK2_REQ=2.14.0
|
||||||
|
GTK3_REQ=2.91.3
|
||||||
|
if test "x$BUILD_EXAMPLES" = "xyes"; then
|
||||||
|
AC_MSG_CHECKING([which gtk+ version to compile examples against (optional)])
|
||||||
|
AC_ARG_WITH([gtk],
|
||||||
|
AC_HELP_STRING([--with-gtk=3.0|2.0],
|
||||||
|
[which gtk+ version to compile against (default: 2.0)]),
|
||||||
|
[case "$with_gtk" in
|
||||||
|
2.0) GTK_REQ=$GTK2_REQ ;;
|
||||||
|
3.0) GTK_REQ=$GTK3_REQ ;;
|
||||||
|
*) AC_MSG_ERROR([invalid gtk+ version specified]);;
|
||||||
|
esac],
|
||||||
|
[with_gtk=2.0
|
||||||
|
GTK_REQ=$GTK2_REQ])
|
||||||
|
AC_MSG_RESULT([$with_gtk (>= $GTK_REQ)])
|
||||||
|
PKG_CHECK_MODULES(GTK, gtk+-$with_gtk >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
|
||||||
|
dnl some examples need gtk+-x11
|
||||||
|
PKG_CHECK_MODULES(GTK_X11, gtk+-x11-$with_gtk >= $GTK_REQ, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)
|
||||||
|
AC_SUBST(GTK_LIBS)
|
||||||
|
AC_SUBST(GTK_CFLAGS)
|
||||||
|
fi
|
||||||
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
|
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
|
||||||
|
|
||||||
dnl some examples need gtk+-x11
|
|
||||||
PKG_CHECK_MODULES(GTK_X11, gtk+-x11-3.0, HAVE_GTK_X11=yes,
|
|
||||||
[PKG_CHECK_MODULES(GTK_X11, gtk+-x11-2.0 >= 2.14.0, HAVE_GTK_X11=yes, HAVE_GTK_X11=no)])
|
|
||||||
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
|
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
|
||||||
|
|
||||||
dnl set license and copyright notice
|
dnl set license and copyright notice
|
||||||
|
|
Loading…
Reference in a new issue