1 AC_INIT([vala], [0.7.7], [j@bitron.ch], [vala])
2 AC_CONFIG_SRCDIR([Makefile.am])
3 AC_CONFIG_HEADERS(config.h)
4 AC_CONFIG_MACRO_DIR([m4])
5 AM_INIT_AUTOMAKE([dist-bzip2])
15 if test "$LEX" = :; then
16 AC_MSG_ERROR([flex not found but required])
19 AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :)
20 if test "$YACC" = :; then
21 AC_MSG_ERROR([bison not found but required])
24 AC_PATH_PROG(VALAC, valac, valac)
32 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [Enable coverage analysis]), enable_coverage=$enableval, enable_coverage=no)
33 AM_CONDITIONAL(ENABLE_COVERAGE, test x$enable_coverage = xyes)
35 if test "$enable_coverage" = "yes"; then
36 COVERAGE_VALAFLAGS="-g"
37 COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
38 COVERAGE_LIBS="-lgcov"
44 AC_SUBST(COVERAGE_VALAFLAGS)
45 AC_SUBST(COVERAGE_CFLAGS)
46 AC_SUBST(COVERAGE_LIBS)
48 AC_ARG_ENABLE(vapigen, AS_HELP_STRING([--enable-vapigen], [Enable VAPI generator]), enable_vapigen=$enableval, enable_vapigen=no)
49 AM_CONDITIONAL(ENABLE_VAPIGEN, test x$enable_vapigen = xyes)
51 if test "$enable_vapigen" = "yes"; then
52 vapigen_decl='vapigen=${bindir}/vapigen'
53 gen_introspect_decl='gen_introspect=${libdir}/vala/gen-introspect'
54 vala_gen_introspect_decl='vala_gen_introspect=${bindir}/vala-gen-introspect'
57 gen_introspect_decl=''
58 vala_gen_introspect_decl=''
60 AC_SUBST(vapigen_decl)
61 AC_SUBST(gen_introspect_decl)
62 AC_SUBST(vala_gen_introspect_decl)
66 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
71 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
73 AC_SUBST(GMODULE_CFLAGS)
74 AC_SUBST(GMODULE_LIBS)
76 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
78 AC_SUBST(GTHREAD_CFLAGS)
79 AC_SUBST(GTHREAD_LIBS)
81 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
82 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
84 AC_CONFIG_FILES([Makefile
95 gobject-introspection/Makefile
97 vapigen/vala-gen-introspect/Makefile
98 vapigen/vala-gen-introspect/vala-gen-introspect])