1 AC_INIT([vala], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [j@bitron.ch], [vala])
2 AC_CONFIG_SRCDIR([Makefile.am])
3 AC_CONFIG_AUX_DIR([build-aux])
4 AC_CONFIG_HEADERS(config.h)
5 AC_CONFIG_MACRO_DIR([m4])
6 AM_INIT_AUTOMAKE([dist-bzip2])
10 AC_SUBST(PACKAGE_SUFFIX)
11 AC_DEFINE_UNQUOTED(PACKAGE_SUFFIX, "$PACKAGE_SUFFIX", [Define to the suffix of this package])
13 program_transform_name="s,\$\$,${PACKAGE_SUFFIX},"
15 AC_SUBST(pkgdatadir, [${datadir}/vala${PACKAGE_SUFFIX}])
17 # Checks for programs.
25 if test "$LEX" = :; then
26 AC_MSG_ERROR([flex not found but required])
29 AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :)
30 if test "$YACC" = :; then
31 AC_MSG_ERROR([bison not found but required])
34 AC_PATH_PROG(VALAC, valac, valac)
37 VALAFLAGS="$VALAFLAGS --disable-version-header"
44 AC_ARG_ENABLE(unversioned, AS_HELP_STRING([--disable-unversioned], [Disable unversioned binaries]), enable_unversioned=$enableval, enable_unversioned=yes)
45 AM_CONDITIONAL(ENABLE_UNVERSIONED, test x$enable_unversioned = xyes)
47 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [Enable coverage analysis]), enable_coverage=$enableval, enable_coverage=no)
48 AM_CONDITIONAL(ENABLE_COVERAGE, test x$enable_coverage = xyes)
50 if test "$enable_coverage" = "yes"; then
51 COVERAGE_VALAFLAGS="-g"
52 COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
53 COVERAGE_LIBS="-lgcov"
59 AC_SUBST(COVERAGE_VALAFLAGS)
60 AC_SUBST(COVERAGE_CFLAGS)
61 AC_SUBST(COVERAGE_LIBS)
63 AC_ARG_ENABLE(vapigen, AS_HELP_STRING([--enable-vapigen], [Enable VAPI generator]), enable_vapigen=$enableval, enable_vapigen=no)
64 AM_CONDITIONAL(ENABLE_VAPIGEN, test x$enable_vapigen = xyes)
66 if test "$enable_vapigen" = "yes"; then
67 vapigen_decl="vapigen=\${bindir}/vapigen${PACKAGE_SUFFIX}"
68 gen_introspect_decl="gen_introspect=\${libdir}/vala${PACKAGE_SUFFIX}/gen-introspect${PACKAGE_SUFFIX}"
69 vala_gen_introspect_decl="vala_gen_introspect=\${bindir}/vala-gen-introspect${PACKAGE_SUFFIX}"
72 gen_introspect_decl=''
73 vala_gen_introspect_decl=''
75 AC_SUBST(vapigen_decl)
76 AC_SUBST(gen_introspect_decl)
77 AC_SUBST(vala_gen_introspect_decl)
81 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
86 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
88 AC_SUBST(GMODULE_CFLAGS)
89 AC_SUBST(GMODULE_LIBS)
91 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
93 AC_SUBST(GTHREAD_CFLAGS)
94 AC_SUBST(GTHREAD_LIBS)
96 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
97 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
99 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
101 AC_CONFIG_FILES([Makefile
112 gobject-introspection/Makefile
114 vapigen/vala-gen-introspect/Makefile
115 vapigen/vala-gen-introspect/vala-gen-introspect])