diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2012-09-11 16:04:21 +0000 |
---|---|---|
committer | Vincent Torri <vincent.torri@gmail.com> | 2012-09-11 16:04:21 +0000 |
commit | 59a9dfd11860888a35e96dfe51af63cea5cecfe1 (patch) | |
tree | 5577297b8bb6e1b299987c45eb0c0fa9a5669b0b /configure.ac | |
parent | 0ca69d1f2d2f378223bed712c9cdcd7e6679e305 (diff) |
merge: add infra for evil
SVN revision: 76463
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 347 |
1 files changed, 347 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000000..4c2a2e9b2c --- /dev/null +++ b/configure.ac | |||
@@ -0,0 +1,347 @@ | |||
1 | m4_define([v_maj], [1]) | ||
2 | m4_define([v_min], [7]) | ||
3 | m4_define([v_mic], [99]) | ||
4 | |||
5 | m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) | ||
6 | m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) | ||
7 | |||
8 | #### FIXME: i am sure that we can do some m4 to automagically do the stuff below for release and snapshots | ||
9 | |||
10 | ##-- When released, remove the dnl on the below line | ||
11 | dnl m4_undefine([v_rev]) | ||
12 | |||
13 | ##-- When doing snapshots - change soname. remove dnl on below line | ||
14 | dnl m4_define([relname], [ver-pre-svn-07]) | ||
15 | dnl m4_define([v_rel], [-release relname]) | ||
16 | |||
17 | m4_ifdef([v_rev], [m4_define([efl_version], [v_maj.v_min.v_mic.v_rev])], [m4_define([efl_version], [v_maj.v_min.v_mic])]) | ||
18 | |||
19 | m4_define([lt_cur], m4_eval(v_maj + v_min)) | ||
20 | m4_define([lt_rev], v_mic) | ||
21 | m4_define([lt_age], v_min) | ||
22 | |||
23 | AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net]) | ||
24 | AC_PREREQ([2.59]) | ||
25 | AC_CONFIG_SRCDIR([configure.ac]) | ||
26 | AC_CONFIG_MACRO_DIR([m4]) | ||
27 | |||
28 | AC_CONFIG_HEADERS([config.h]) | ||
29 | AH_TOP([ | ||
30 | #ifndef EFL_CONFIG_H__ | ||
31 | #define EFL_CONFIG_H__ | ||
32 | ]) | ||
33 | AH_BOTTOM([ | ||
34 | #endif /* EFL_CONFIG_H__ */ | ||
35 | ]) | ||
36 | |||
37 | AC_GNU_SOURCE | ||
38 | AC_SYS_LARGEFILE | ||
39 | |||
40 | AM_INIT_AUTOMAKE([1.6 dist-bzip2]) | ||
41 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
42 | |||
43 | m4_ifdef([v_rev], , [m4_define([v_rev], [0])]) | ||
44 | AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version]) | ||
45 | AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version]) | ||
46 | AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version]) | ||
47 | AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison]) | ||
48 | VMAJ=v_maj | ||
49 | AC_SUBST([VMAJ]) | ||
50 | |||
51 | |||
52 | #### Default values | ||
53 | |||
54 | want_eina="yes" | ||
55 | want_eet="yes" | ||
56 | want_evas="yes" | ||
57 | want_ecore="yes" | ||
58 | want_embryo="yes" | ||
59 | want_eio="yes" | ||
60 | want_edje="yes" | ||
61 | want_efreet="yes" | ||
62 | want_e_dbus="yes" | ||
63 | want_eeze="yes" | ||
64 | want_emotion="yes" | ||
65 | want_ethumb="yes" | ||
66 | want_elementary="yes" | ||
67 | |||
68 | requirements_libs_evil="" | ||
69 | requirements_libs_eina="" | ||
70 | requirements_libs_eet="" | ||
71 | requirements_libs_evas="" | ||
72 | requirements_libs_ecore="" | ||
73 | requirements_libs_embryo="" | ||
74 | requirements_libs_eio="" | ||
75 | requirements_libs_edje="" | ||
76 | requirements_libs_efreet="" | ||
77 | requirements_libs_e_dbus="" | ||
78 | requirements_libs_eeze="" | ||
79 | requirements_libs_emotion="" | ||
80 | requirements_libs_ethumb="" | ||
81 | requirements_libs_elementary="" | ||
82 | |||
83 | requirements_pc_eina="" | ||
84 | requirements_pc_eet="" | ||
85 | requirements_pc_evas="" | ||
86 | requirements_pc_ecore="" | ||
87 | requirements_pc_embryo="" | ||
88 | requirements_pc_eio="" | ||
89 | requirements_pc_edje="" | ||
90 | requirements_pc_efreet="" | ||
91 | requirements_pc_e_dbus="" | ||
92 | requirements_pc_eeze="" | ||
93 | requirements_pc_emotion="" | ||
94 | requirements_pc_ethumb="" | ||
95 | requirements_pc_elementary="" | ||
96 | |||
97 | AC_SUBST([requirements_libs_evil]) | ||
98 | AC_SUBST([requirements_libs_eina]) | ||
99 | AC_SUBST([requirements_libs_eet]) | ||
100 | AC_SUBST([requirements_libs_evas]) | ||
101 | AC_SUBST([requirements_libs_ecore]) | ||
102 | AC_SUBST([requirements_libs_embryo]) | ||
103 | AC_SUBST([requirements_libs_eio]) | ||
104 | AC_SUBST([requirements_libs_edje]) | ||
105 | AC_SUBST([requirements_libs_efreet]) | ||
106 | AC_SUBST([requirements_libs_e_dbus]) | ||
107 | AC_SUBST([requirements_libs_eeze]) | ||
108 | AC_SUBST([requirements_libs_emotion]) | ||
109 | AC_SUBST([requirements_libs_ethumb]) | ||
110 | AC_SUBST([requirements_libs_elementary]) | ||
111 | |||
112 | AC_SUBST([requirements_pc_eina]) | ||
113 | AC_SUBST([requirements_pc_eet]) | ||
114 | AC_SUBST([requirements_pc_evas]) | ||
115 | AC_SUBST([requirements_pc_ecore]) | ||
116 | AC_SUBST([requirements_pc_embryo]) | ||
117 | AC_SUBST([requirements_pc_eio]) | ||
118 | AC_SUBST([requirements_pc_edje]) | ||
119 | AC_SUBST([requirements_pc_efreet]) | ||
120 | AC_SUBST([requirements_pc_e_dbus]) | ||
121 | AC_SUBST([requirements_pc_eeze]) | ||
122 | AC_SUBST([requirements_pc_emotion]) | ||
123 | AC_SUBST([requirements_pc_ethumb]) | ||
124 | AC_SUBST([requirements_pc_elementary]) | ||
125 | |||
126 | |||
127 | AC_CANONICAL_HOST | ||
128 | |||
129 | have_wince="no" | ||
130 | have_win32="no" | ||
131 | have_windows="no" | ||
132 | case "$host_os" in | ||
133 | cegcc*) | ||
134 | AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...]) | ||
135 | ;; | ||
136 | mingw32ce*) | ||
137 | have_wince="yes" | ||
138 | have_windows="yes" | ||
139 | want_efreet="no" | ||
140 | want_e_dbus="no" | ||
141 | want_eeze="no" | ||
142 | want_emotion="no" | ||
143 | want_ethumb="no" | ||
144 | ;; | ||
145 | mingw*) | ||
146 | have_win32="yes" | ||
147 | have_windows="yes" | ||
148 | want_eeze="no" | ||
149 | ;; | ||
150 | esac | ||
151 | |||
152 | AM_CONDITIONAL([HAVE_WINCE], [test "x${have_wince}" = "xyes"]) | ||
153 | AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"]) | ||
154 | AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"]) | ||
155 | |||
156 | |||
157 | #### Additional options to configure | ||
158 | |||
159 | |||
160 | #### Checks for programs | ||
161 | |||
162 | ### libtool | ||
163 | |||
164 | if test "x${have_windows}" = "xyes" ; then | ||
165 | lt_cv_deplibs_check_method='pass_all' | ||
166 | fi | ||
167 | AC_LIBTOOL_WIN32_DLL | ||
168 | define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl | ||
169 | AC_PROG_LIBTOOL | ||
170 | version_info="lt_cur:lt_rev:lt_age" | ||
171 | AC_SUBST([version_info]) | ||
172 | release_info="v_rel" | ||
173 | AC_SUBST([release_info]) | ||
174 | |||
175 | ### compilers | ||
176 | |||
177 | AC_PROG_CXX | ||
178 | AC_LANG(C) | ||
179 | AC_PROG_CPP | ||
180 | AC_PROG_CC | ||
181 | |||
182 | # pkg-config | ||
183 | |||
184 | PKG_PROG_PKG_CONFIG | ||
185 | if test "x${PKGCONFIG}" = "x" ; then | ||
186 | AC_MSG_ERROR([pkg-config tool not found. Install it or set PKGCONFIG environment variable to that path tool. Exiting...]) | ||
187 | fi | ||
188 | |||
189 | # doxygen program for documentation building | ||
190 | |||
191 | EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) | ||
192 | |||
193 | |||
194 | #### Checks for libraries | ||
195 | |||
196 | |||
197 | #### Checks for header files | ||
198 | |||
199 | |||
200 | #### Checks for types | ||
201 | |||
202 | |||
203 | #### Checks for structures | ||
204 | |||
205 | |||
206 | #### Checks for compiler characteristics | ||
207 | |||
208 | EFL_ATTRIBUTE_UNUSED | ||
209 | # EFL_CHECK_COMPILER_FLAGS([MY_LIB], [-Wall -Wextra]) | ||
210 | |||
211 | |||
212 | #### Checks for linker characteristics | ||
213 | |||
214 | lt_enable_auto_import="" | ||
215 | case "${host_os}" in | ||
216 | mingw*) | ||
217 | lt_enable_auto_import="-Wl,--enable-auto-import" | ||
218 | ;; | ||
219 | esac | ||
220 | AC_SUBST([lt_enable_auto_import]) | ||
221 | |||
222 | |||
223 | #### Checks for library functions | ||
224 | |||
225 | |||
226 | |||
227 | ###################### EFL ###################### | ||
228 | |||
229 | #### Evil | ||
230 | |||
231 | if test "x${have_windows}" = "xyes" ; then | ||
232 | |||
233 | ### Default values | ||
234 | |||
235 | ### Additional options to configure | ||
236 | EFL_SELECT_WINDOWS_VERSION | ||
237 | |||
238 | ### Checks for programs | ||
239 | |||
240 | ### Checks for libraries | ||
241 | |||
242 | EVIL_LIBS="" | ||
243 | EVIL_DLFCN_LIBS="" | ||
244 | case "$host_os" in | ||
245 | mingw32ce*) | ||
246 | EVIL_LIBS="-lws2" | ||
247 | EVIL_DLFCN_LIBS="-ltoolhelp" | ||
248 | ;; | ||
249 | *) | ||
250 | EVIL_LIBS="-lole32 -lws2_32 -lsecur32" | ||
251 | EVIL_DLFCN_LIBS="-lpsapi" | ||
252 | ;; | ||
253 | esac | ||
254 | requirements_libs_evil="${EVIL_LIBS}" | ||
255 | AC_SUBST([EVIL_LIBS]) | ||
256 | AC_SUBST([EVIL_DLFCN_LIBS]) | ||
257 | |||
258 | ### Checks for header files | ||
259 | |||
260 | AC_CHECK_HEADERS([errno.h]) | ||
261 | |||
262 | ### Checks for types | ||
263 | |||
264 | ### Checks for structures | ||
265 | |||
266 | ### Checks for compiler characteristics | ||
267 | |||
268 | EVIL_CPPFLAGS="-DEFL_EVIL_BUILD" | ||
269 | EVIL_CFLAGS="-Wall -Wextra -Wshadow -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -mms-bitfields" | ||
270 | EVIL_CXXFLAGS="" | ||
271 | |||
272 | if test "x${have_win32}" = "xyes" ; then | ||
273 | EVIL_CXXFLAGS="-fno-rtti -fno-exceptions" | ||
274 | EVIL_CPPFLAGS="${EVIL_CPPFLAGS} -DSECURITY_WIN32" | ||
275 | fi | ||
276 | |||
277 | AC_SUBST([EVIL_CPPFLAGS]) | ||
278 | AC_SUBST([EVIL_CFLAGS]) | ||
279 | AC_SUBST([EVIL_CXXFLAGS]) | ||
280 | |||
281 | ### Checks for linker characteristics | ||
282 | |||
283 | ### Checks for library functions | ||
284 | |||
285 | fi | ||
286 | |||
287 | #### End of Evil | ||
288 | |||
289 | |||
290 | #### Eina | ||
291 | |||
292 | ### Default values | ||
293 | ### Additional options to configure | ||
294 | ### Checks for programs | ||
295 | ### Checks for libraries | ||
296 | ### Checks for header files | ||
297 | ### Checks for types | ||
298 | ### Checks for structures | ||
299 | ### Checks for compiler characteristics | ||
300 | ### Checks for linker characteristics | ||
301 | ### Checks for library functions | ||
302 | |||
303 | #### End of Eina | ||
304 | |||
305 | #EFL_CHECK_LIBS([eina], [iconv], [have_eina="yes"], [have_eina="no"]) | ||
306 | #EFL_CHECK_LIBS([eet], [zlib libjpeg], [have_eet="yes"], [have_eet="no"]) | ||
307 | |||
308 | AC_CONFIG_FILES([ | ||
309 | Makefile | ||
310 | src/Makefile | ||
311 | src/bin/Makefile | ||
312 | src/bin/evil/Makefile | ||
313 | src/lib/Makefile | ||
314 | src/lib/evil/Makefile | ||
315 | ]) | ||
316 | |||
317 | AC_OUTPUT | ||
318 | |||
319 | |||
320 | #### Info | ||
321 | |||
322 | echo | ||
323 | echo | ||
324 | echo | ||
325 | echo "------------------------------------------------------------------------" | ||
326 | echo "$PACKAGE_NAME $PACKAGE_VERSION" | ||
327 | echo "------------------------------------------------------------------------" | ||
328 | echo | ||
329 | echo "Configuration Options Summary:" | ||
330 | echo | ||
331 | echo " OS...................: ${host_os}" | ||
332 | if test "x${have_windows}" = "xyes" ; then | ||
333 | echo " Windows version......: ${_efl_windows_version}" | ||
334 | fi | ||
335 | echo | ||
336 | echo " Documentation........: ${build_doc}" | ||
337 | echo | ||
338 | echo "Compilation............: make (or gmake)" | ||
339 | echo " CPPFLAGS.............: $CPPFLAGS" | ||
340 | echo " CFLAGS...............: $CFLAGS" | ||
341 | echo " CXXFLAGS.............: $CXXFLAGS" | ||
342 | echo " LDFLAGS..............: $LDFLAGS" | ||
343 | echo | ||
344 | echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')" | ||
345 | echo " prefix...............: $prefix" | ||
346 | echo | ||
347 | |||