summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-11 16:04:21 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-11 16:04:21 +0000
commit59a9dfd11860888a35e96dfe51af63cea5cecfe1 (patch)
tree5577297b8bb6e1b299987c45eb0c0fa9a5669b0b /configure.ac
parent0ca69d1f2d2f378223bed712c9cdcd7e6679e305 (diff)
merge: add infra for evil
SVN revision: 76463
Diffstat (limited to '')
-rw-r--r--configure.ac347
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 @@
1m4_define([v_maj], [1])
2m4_define([v_min], [7])
3m4_define([v_mic], [99])
4
5m4_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']))
6m4_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
11dnl m4_undefine([v_rev])
12
13##-- When doing snapshots - change soname. remove dnl on below line
14dnl m4_define([relname], [ver-pre-svn-07])
15dnl m4_define([v_rel], [-release relname])
16
17m4_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
19m4_define([lt_cur], m4_eval(v_maj + v_min))
20m4_define([lt_rev], v_mic)
21m4_define([lt_age], v_min)
22
23AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net])
24AC_PREREQ([2.59])
25AC_CONFIG_SRCDIR([configure.ac])
26AC_CONFIG_MACRO_DIR([m4])
27
28AC_CONFIG_HEADERS([config.h])
29AH_TOP([
30#ifndef EFL_CONFIG_H__
31#define EFL_CONFIG_H__
32])
33AH_BOTTOM([
34#endif /* EFL_CONFIG_H__ */
35])
36
37AC_GNU_SOURCE
38AC_SYS_LARGEFILE
39
40AM_INIT_AUTOMAKE([1.6 dist-bzip2])
41m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
42
43m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
44AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])
45AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])
46AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])
47AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])
48VMAJ=v_maj
49AC_SUBST([VMAJ])
50
51
52#### Default values
53
54want_eina="yes"
55want_eet="yes"
56want_evas="yes"
57want_ecore="yes"
58want_embryo="yes"
59want_eio="yes"
60want_edje="yes"
61want_efreet="yes"
62want_e_dbus="yes"
63want_eeze="yes"
64want_emotion="yes"
65want_ethumb="yes"
66want_elementary="yes"
67
68requirements_libs_evil=""
69requirements_libs_eina=""
70requirements_libs_eet=""
71requirements_libs_evas=""
72requirements_libs_ecore=""
73requirements_libs_embryo=""
74requirements_libs_eio=""
75requirements_libs_edje=""
76requirements_libs_efreet=""
77requirements_libs_e_dbus=""
78requirements_libs_eeze=""
79requirements_libs_emotion=""
80requirements_libs_ethumb=""
81requirements_libs_elementary=""
82
83requirements_pc_eina=""
84requirements_pc_eet=""
85requirements_pc_evas=""
86requirements_pc_ecore=""
87requirements_pc_embryo=""
88requirements_pc_eio=""
89requirements_pc_edje=""
90requirements_pc_efreet=""
91requirements_pc_e_dbus=""
92requirements_pc_eeze=""
93requirements_pc_emotion=""
94requirements_pc_ethumb=""
95requirements_pc_elementary=""
96
97AC_SUBST([requirements_libs_evil])
98AC_SUBST([requirements_libs_eina])
99AC_SUBST([requirements_libs_eet])
100AC_SUBST([requirements_libs_evas])
101AC_SUBST([requirements_libs_ecore])
102AC_SUBST([requirements_libs_embryo])
103AC_SUBST([requirements_libs_eio])
104AC_SUBST([requirements_libs_edje])
105AC_SUBST([requirements_libs_efreet])
106AC_SUBST([requirements_libs_e_dbus])
107AC_SUBST([requirements_libs_eeze])
108AC_SUBST([requirements_libs_emotion])
109AC_SUBST([requirements_libs_ethumb])
110AC_SUBST([requirements_libs_elementary])
111
112AC_SUBST([requirements_pc_eina])
113AC_SUBST([requirements_pc_eet])
114AC_SUBST([requirements_pc_evas])
115AC_SUBST([requirements_pc_ecore])
116AC_SUBST([requirements_pc_embryo])
117AC_SUBST([requirements_pc_eio])
118AC_SUBST([requirements_pc_edje])
119AC_SUBST([requirements_pc_efreet])
120AC_SUBST([requirements_pc_e_dbus])
121AC_SUBST([requirements_pc_eeze])
122AC_SUBST([requirements_pc_emotion])
123AC_SUBST([requirements_pc_ethumb])
124AC_SUBST([requirements_pc_elementary])
125
126
127AC_CANONICAL_HOST
128
129have_wince="no"
130have_win32="no"
131have_windows="no"
132case "$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 ;;
150esac
151
152AM_CONDITIONAL([HAVE_WINCE], [test "x${have_wince}" = "xyes"])
153AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
154AM_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
164if test "x${have_windows}" = "xyes" ; then
165 lt_cv_deplibs_check_method='pass_all'
166fi
167AC_LIBTOOL_WIN32_DLL
168define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
169AC_PROG_LIBTOOL
170version_info="lt_cur:lt_rev:lt_age"
171AC_SUBST([version_info])
172release_info="v_rel"
173AC_SUBST([release_info])
174
175### compilers
176
177AC_PROG_CXX
178AC_LANG(C)
179AC_PROG_CPP
180AC_PROG_CC
181
182# pkg-config
183
184PKG_PROG_PKG_CONFIG
185if 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...])
187fi
188
189# doxygen program for documentation building
190
191EFL_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
208EFL_ATTRIBUTE_UNUSED
209# EFL_CHECK_COMPILER_FLAGS([MY_LIB], [-Wall -Wextra])
210
211
212#### Checks for linker characteristics
213
214lt_enable_auto_import=""
215case "${host_os}" in
216 mingw*)
217 lt_enable_auto_import="-Wl,--enable-auto-import"
218 ;;
219esac
220AC_SUBST([lt_enable_auto_import])
221
222
223#### Checks for library functions
224
225
226
227###################### EFL ######################
228
229#### Evil
230
231if test "x${have_windows}" = "xyes" ; then
232
233### Default values
234
235### Additional options to configure
236EFL_SELECT_WINDOWS_VERSION
237
238### Checks for programs
239
240### Checks for libraries
241
242EVIL_LIBS=""
243EVIL_DLFCN_LIBS=""
244case "$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 ;;
253esac
254requirements_libs_evil="${EVIL_LIBS}"
255AC_SUBST([EVIL_LIBS])
256AC_SUBST([EVIL_DLFCN_LIBS])
257
258### Checks for header files
259
260AC_CHECK_HEADERS([errno.h])
261
262### Checks for types
263
264### Checks for structures
265
266### Checks for compiler characteristics
267
268EVIL_CPPFLAGS="-DEFL_EVIL_BUILD"
269EVIL_CFLAGS="-Wall -Wextra -Wshadow -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -mms-bitfields"
270EVIL_CXXFLAGS=""
271
272if test "x${have_win32}" = "xyes" ; then
273 EVIL_CXXFLAGS="-fno-rtti -fno-exceptions"
274 EVIL_CPPFLAGS="${EVIL_CPPFLAGS} -DSECURITY_WIN32"
275fi
276
277AC_SUBST([EVIL_CPPFLAGS])
278AC_SUBST([EVIL_CFLAGS])
279AC_SUBST([EVIL_CXXFLAGS])
280
281### Checks for linker characteristics
282
283### Checks for library functions
284
285fi
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
308AC_CONFIG_FILES([
309Makefile
310src/Makefile
311src/bin/Makefile
312src/bin/evil/Makefile
313src/lib/Makefile
314src/lib/evil/Makefile
315])
316
317AC_OUTPUT
318
319
320#### Info
321
322echo
323echo
324echo
325echo "------------------------------------------------------------------------"
326echo "$PACKAGE_NAME $PACKAGE_VERSION"
327echo "------------------------------------------------------------------------"
328echo
329echo "Configuration Options Summary:"
330echo
331echo " OS...................: ${host_os}"
332if test "x${have_windows}" = "xyes" ; then
333 echo " Windows version......: ${_efl_windows_version}"
334fi
335echo
336echo " Documentation........: ${build_doc}"
337echo
338echo "Compilation............: make (or gmake)"
339echo " CPPFLAGS.............: $CPPFLAGS"
340echo " CFLAGS...............: $CFLAGS"
341echo " CXXFLAGS.............: $CXXFLAGS"
342echo " LDFLAGS..............: $LDFLAGS"
343echo
344echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
345echo " prefix...............: $prefix"
346echo
347