On Wed, 06 Feb 2013 19:50:40 +0100
JM <[email protected]> wrote:

> There is conditional compilation:
> 
> https://live.gnome.org/Vala/ConditionalCompilationSample
> 
> You can check vala version and set flags in your configure script or
> something equivalent.
> 
> You can modify the following to match your demands and use it to set
> flags for your conditional compilation:
> 
> AC_PATH_PROG([VALAC], [valac], [])
>  AS_IF([test -z "$VALAC"],
>    [AC_MSG_WARN([No Vala compiler found. Build uses C files only. While
> this is fine, you will not be able to compile changed .vala source
> files.])],
>    [AS_IF([test -n "$VALA_REQUIRED"],
>       [AC_MSG_CHECKING([$VALAC is at least version $VALA_REQUIRED])
>        am__vala_version=`$VALAC --version | sed 's/Vala  *//'`
>        AS_VERSION_COMPARE([$VALA_REQUIRED], ["$am__vala_version"],
>          [AC_MSG_RESULT([yes])],
>          [AC_MSG_RESULT([yes])],
>          [AC_MSG_RESULT([no])
>           AC_MSG_WARN([Vala $VALA_REQUIRED not found. Your vala version
> is too old! Build uses C files only. While this is fine, you will not be
> able to compile changed .vala source files.])
>           VALAC=""])])])
> AM_CONDITIONAL(USE_VALA, [test -n "$VALAC"])
> AC_SUBST(USE_VALA)
> 

Thanks
 
> 
> 
> Am Mittwoch, den 06.02.2013, 19:09 +0000 schrieb Olivier Duchateau:
> > Hi,
> > 
> > I wonder, if it exists preprocessors in Vala, or if it exists macro like 
> > GLIB_CHECK_VERSION, but known by valac ?
> > 
> > I don't find any responses.
> > 
> 
> 
> _______________________________________________
> vala-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/vala-list


-- 
olivier
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to