Fix #7210 - build latest valac - by adding ccode and codegen direct from valac
[roobuilder] / configure.ac
1
2 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ([2.68])
4
5 AC_INIT([roobuilder], [4.1.0])
6
7 AC_CONFIG_HEADERS([config.h])
8
9 AM_INIT_AUTOMAKE([1.11 subdir-objects])
10 AM_MAINTAINER_MODE([enable])
11
12 AM_SILENT_RULES([yes])
13
14 AC_PROG_CC
15
16 AM_PROG_VALAC([0.36.0])
17
18
19 AC_CHECK_LIB([m],[cos])
20
21 dnl we need to check these exist, then it will generate a compile string for them.
22
23 dnl  we add zlib in to pad the listof libraries (as for some reason -L is injected on the final stage without argument
24 dnl and it breaks the build...
25
26 PKG_CHECK_MODULES(ROOBUILDER, [ zlib
27                  clutter-gtk-1.0
28                  glib-2.0 >= 2.24.1
29                  gobject-2.0 >= 2.24.1
30                  gtk+-3.0 >= 3.11.3
31                  gtksourceview-3.0
32                  json-glib-1.0
33                  gee-0.8
34                  libxml-2.0
35                  libsoup-2.4,
36                  roojspacker-1.4
37 ]) 
38
39 dnl --- libvala -- needs to find matching really..
40
41 dnl -   supported version is 0.36  and  0.56
42
43 PKG_CHECK_MODULES(LIBVALA, [libvala-0.56],
44                 [vala_5_6_enabled=yes],
45                 [vala_5_6_enabled=no]) 
46 if test $vala_5_6_enabled = yes; then
47         AC_DEFINE(HAVE_LIBVALA56,1,[libvala 0.56 support])
48 else
49
50          PKG_CHECK_MODULES(LIBVALA, [libvala-0.36],
51                                  [vala_3_6_enabled=yes],
52                                  [vala_3_6_enabled=no]) 
53          if test $vala_3_6_enabled = yes; then
54                  AC_DEFINE(HAVE_LIBVALA36,1,[libvala 0.36 support])
55          fi
56          
57  fi
58
59 AM_CONDITIONAL(HAVE_LIBVALA56, test "$vala_5_6_enabled" = "yes")
60 AM_CONDITIONAL(HAVE_LIBVALA36, test "$vala_3_6_enabled" = "yes")
61
62
63   
64
65 dnl --- gda
66
67
68
69 PKG_CHECK_MODULES(GDA, [libgda-5.0],
70                                 [gda_5_0_enabled=yes],
71                                 [gda_5_0_enabled=no])
72
73 if test $gda_5_0_enabled = yes; then
74                 AC_DEFINE(HAVE_GDA5,1,[libgda 5.0 support])
75 else
76                 PKG_CHECK_MODULES(GDA, [libgda-4.0],
77                                 [gda_4_0_enabled=yes] )
78                 AC_DEFINE(HAVE_GDA4,1,[libgda 4.0 support])
79 fi
80 AM_CONDITIONAL(HAVE_GDA4, test "$gda_4_0_enabled" = "yes")
81 AM_CONDITIONAL(HAVE_GDA5, test "$gda_5_0_enabled" = "yes")
82
83
84 dnl  -- webkit-4.0 
85
86
87 PKG_CHECK_MODULES(WEBKIT, [webkit2gtk-4.0],
88                                 [webkit_4_0_enabled=yes],
89                                 [webkit_4_0_enabled=no])
90
91 if test $webkit_4_0_enabled = yes; then
92                 AC_DEFINE(HAVE_WEBKIT4,1,[webkit 4.0 support])
93 else
94                 PKG_CHECK_MODULES(WEBKIT, [webkit2gtk-3.0],
95                                 [webkit_3_0_enabled=yes] )
96                 AC_DEFINE(HAVE_WEBKIT3,1,[webkit 3.0 support])
97            
98
99 fi
100 AM_CONDITIONAL(HAVE_WEBKIT3, test "$webkit_3_0_enabled" = "yes")
101 AM_CONDITIONAL(HAVE_WEBKIT4, test "$webkit_4_0_enabled" = "yes")
102
103
104
105 dnl  -- javascriptcoregtk-4.0  ** not sure if this is needed....
106
107
108 PKG_CHECK_MODULES(JAVASCRIPTCOREGTK, [javascriptcoregtk-4.0],
109                                 [javascriptcoregtk_4_0_enabled=yes],
110                                 [javascriptcoregtk_4_0_enabled=no])
111
112 if test $javascriptcoregtk_4_0_enabled = yes; then
113                 AC_DEFINE(HAVE_JAVASCRIPTCOREGTK4,1,[javascriptcoregtk 4.0 support])
114 else
115                 PKG_CHECK_MODULES(JAVASCRIPTCOREGTK, [javascriptcoregtk-3.0],
116                                 [javascriptcoregtk_3_0_enabled=yes] )
117                 AC_DEFINE(HAVE_JAVASCRIPTCOREGTK3,1,[javascriptcoregtk 3.0 support])
118            
119
120 fi
121 AM_CONDITIONAL(HAVE_JAVASCRIPTCOREGTK3, test "$javascriptcoregtk_3_0_enabled" = "yes")
122 AM_CONDITIONAL(HAVE_JAVASCRIPTCOREGTK4, test "$javascriptcoregtk_4_0_enabled" = "yes")
123
124
125
126 dnl --- vte -- fixme - its not used yet.. not sure if we will use it....
127  
128
129 PKG_CHECK_MODULES(VTE, [vte-2.91],
130                                 [vte_2_91_enabled=yes],
131                                 [vte_2_91_enabled=no])
132                                 
133 if test $vte_2_91_enabled = yes; then
134                 AC_DEFINE(HAVE_VTE_2_91,1,[libvte 2.91 support])
135 else
136                 PKG_CHECK_MODULES(VTE, [vte-2.90],
137                                 [vte_2_90_enabled=yes]
138                 )
139                 AC_DEFINE(HAVE_VTE_2_90,1,[libvte 2.90 support])
140 fi
141
142 AM_CONDITIONAL(HAVE_VTE_2_90, test "$vte_2_90_enabled" = "yes")
143 AM_CONDITIONAL(HAVE_VTE_2_91, test "$vte_2_91_enabled" = "yes")
144
145 AC_CONFIG_FILES([
146         Makefile
147         src/Makefile
148         pixmaps/Makefile
149 ])
150
151   
152 AC_SUBST(ROOBUILDER_CFLAGS)
153 AC_SUBST(ROOBUILDER_LIBS)
154
155
156 AC_OUTPUT