From 6b771d391d99871ce2a9d1207f1310f3c1610a8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 22 Sep 2010 18:12:50 +0200 Subject: [PATCH] Fix configure checks and installation location for Vala bindings Fixes bug #628676. --- bindings/vala/Makefile.am | 2 +- configure.ac | 31 +++++++++++++------------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index c1fd597..06e8ee4 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -5,7 +5,7 @@ VAPI_FILES = gst-rtsp-server-0.10.vapi gst-rtsp-server-0.10.deps: cp $(srcdir)/packages/gst-rtsp-server-0.10.deps $@ -vapidir = $(VAPIDIR) +vapidir = $(datadir)/vala/vapi vapi_DATA = $(VAPI_FILES) $(DEPS_FILES) EXTRA_DIST = packages $(VAPI_FILES) diff --git a/configure.ac b/configure.ac index 63fe726..ceab687 100644 --- a/configure.ac +++ b/configure.ac @@ -113,23 +113,18 @@ fi AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYTHON_BINDINGS" = "xyes"]) -dnl Check for vala -PKG_CHECK_EXISTS([vala-1.0], [HAVE_VALA="yes"], [HAVE_VALA="no"]) - -AM_CONDITIONAL(WITH_VALA, [test "x$HAVE_VALA" = "xyes"]) - -AC_ARG_WITH([vapidir], - AS_HELP_STRING([--with-vapidir], [Define where to install the VAPI files])) - -if test "x$HAVE_VALA" = "xyes"; then - if test "x$with_vapidir" = "x"; then - VAPIDIR="`pkg-config --variable vapidir vala-1.0`" - else - VAPIDIR="$with_vapidir" - fi -fi -AC_SUBST(VAPIDIR) - +dnl Check for Vala +AC_ARG_ENABLE([vala], + AC_HELP_STRING([--enable-vala],[enable Vala bindings (default=yes)]), + [case "${enableval}" in + yes) enable_vala=yes ;; + no) enable_vala=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-vala) ;; + esac + ], + [enable_vala=yes]) dnl Default value +AM_CONDITIONAL(WITH_VALA, [test "x$enable_vala" = "xyes"]) + dnl *** checks for libraries *** dnl *** checks for header files *** @@ -284,7 +279,7 @@ Configuration Source code location : ${srcdir} Prefix : ${prefix} Compiler : ${CC} - Vala bindings : ${HAVE_VALA} + Vala bindings : ${enable_vala} Python bindings: : ${HAVE_PYTHON_BINDINGS} Gst-rtsp-server configured. Type 'make' to build. -- 2.7.4