Fix order of commandline arguments passed to C compiler, patch by
[vala-lang.git] / configure.ac
blobb00725ed39c845021c6d4dbc22d75142132e5802
1 AC_INIT([vala], [0.5.3], [j@bitron.ch], [vala])
2 AC_CONFIG_SRCDIR([Makefile.am])
3 AC_CONFIG_HEADERS(config.h)
4 AM_INIT_AUTOMAKE([dist-bzip2])
5 AM_MAINTAINER_MODE
7 # Checks for programs.
8 AC_PROG_CC
9 AM_PROG_CC_C_O
10 AC_DISABLE_STATIC
11 AC_PROG_LIBTOOL
13 AC_PROG_LEX
14 if test "$LEX" = :; then
15         AC_MSG_ERROR([flex not found but required])
18 AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :)
19 if test "$YACC" = :; then
20         AC_MSG_ERROR([bison not found but required])
23 AC_PATH_PROG(VALAC, valac, valac)
24 AC_SUBST(VALAC)
26 AC_SUBST(CFLAGS)
27 AC_SUBST(CPPFLAGS)
28 AC_SUBST(LDFLAGS)
30 AC_ARG_ENABLE(vapigen, AS_HELP_STRING([--enable-vapigen], [Enable VAPI generator]), enable_vapigen=$enableval, enable_vapigen=no)
31 AM_CONDITIONAL(ENABLE_VAPIGEN, test x$enable_vapigen = xyes)
33 AC_ARG_ENABLE(gen-project, AS_HELP_STRING([--enable-gen-project], [Enable project generator]), enable_gen_project=$enableval, enable_gen_project=no)
34 AM_CONDITIONAL(ENABLE_GEN_PROJECT, test x$enable_gen_project = xyes)
36 GLIB_REQUIRED=2.12.0
37 GTK_REQUIRED=2.10.0
39 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
41 AC_SUBST(GLIB_CFLAGS)
42 AC_SUBST(GLIB_LIBS)
44 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
46 AC_SUBST(GMODULE_CFLAGS)
47 AC_SUBST(GMODULE_LIBS)
49 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
51 AC_SUBST(GTHREAD_CFLAGS)
52 AC_SUBST(GTHREAD_LIBS)
54 if test x$enable_gen_project = xyes; then
55         PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
58 AC_SUBST(GTK_CFLAGS)
59 AC_SUBST(GTK_LIBS)
61 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
62 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
64 AC_CONFIG_FILES([Makefile
65            vala-1.0.pc
66            gee/Makefile
67            ccode/Makefile
68            vala/Makefile
69            gobject/Makefile
70            compiler/Makefile
71            vapi/Makefile
72            tests/Makefile
73            doc/Makefile
74            doc/vala/Makefile
75            gobject-introspection/Makefile
76            vapigen/Makefile
77            vapigen/vala-gen-introspect/Makefile
78            vapigen/vala-gen-introspect/vala-gen-introspect
79            gen-project/Makefile
80            gen-project/licenses/Makefile])
82 AC_OUTPUT