Ok. That somehow makes sense. But, how to get the vala version right? 
Consider the following example:
I do my program for vala-0.9.8 and I do a 'make dist' -> c files are 
distributed into tarball.

On the targeted users machine there is vala-0.9.7, the user does './configure' 
and gets:
 $ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for valac... /usr/local/bin/valac
checking /usr/local/bin/valac is at least version 0.9.8... no
configure: error: Vala 0.9.8 not found.

The user should be able to build the program. vala is not necessary to
have on his machine at all.

That's why I did the following check in my configure.ac:
VALA_REQUIRED=0.9.8
AC_PROG_CC
AC_ARG_ENABLE([usevala],
    AS_HELP_STRING([--disable-usevala],
    [Disable use of vala for releases that are compiled on a system that has 
old version of vala (default: enabled)]),
    [enable_usevala=$enableval],
    [enable_usevala=yes])
if test "x$enable_usevala" = "xyes"; then
    PKG_CHECK_MODULES(VALACOMPILER, \
                      vala-0.10 >= $VALA_REQUIRED, \
                      have_vala=yes, \
                      have_vala=no)
    if test "x$have_vala" = "xno"; then
        AC_MSG_WARN([vala $VALA_REQUIRED or greater not found.])
    else
       AM_PROG_VALAC($VALA_REQUIRED)
    fi
fi

That allows me to make distribution that can be compiled on a machine
with an old version of vala installed.

Maybe the real problem is on the autotools side, but I'm not sure how to
work around this problem.

-- 
vala package in Maverick is missing pkg-config info
https://bugs.launchpad.net/bugs/642108
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to