aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eet/configure.ac
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/eet/configure.ac
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/eet/configure.ac')
-rw-r--r--libraries/eet/configure.ac490
1 files changed, 490 insertions, 0 deletions
diff --git a/libraries/eet/configure.ac b/libraries/eet/configure.ac
new file mode 100644
index 0000000..984cd75
--- /dev/null
+++ b/libraries/eet/configure.ac
@@ -0,0 +1,490 @@
1y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1])
4m4_define([v_min], [5])
5m4_define([v_mic], [0])
6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7m4_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']))])
8##-- When released, remove the dnl on the below line
9m4_undefine([v_rev])
10##-- When doing snapshots - change soname. remove dnl on below line
11dnl m4_define([relname], [ver-pre-svn-05])
12dnl m4_define([v_rel], [-release relname])
13##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
15m4_define([lt_cur], m4_eval(v_maj + v_min))
16m4_define([lt_rev], v_mic)
17m4_define([lt_age], v_min)
18##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21AC_INIT([eet], [v_ver], [enlightenment-devel@lists.sourceforge.net])
22AC_PREREQ([2.52])
23AC_CONFIG_SRCDIR([configure.ac])
24AC_CONFIG_MACRO_DIR([m4])
25
26AC_CONFIG_HEADERS([config.h])
27AH_TOP([
28#ifndef EFL_CONFIG_H__
29#define EFL_CONFIG_H__
30])
31AH_BOTTOM([
32#endif /* EFL_CONFIG_H__ */
33])
34
35AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38AC_LIBTOOL_WIN32_DLL
39define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
40define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
41AC_PROG_LIBTOOL
42
43##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
44##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
45m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
46m4_ifdef([v_rel], , [m4_define([v_rel], [])])
47AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
48AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
49AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
50AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
51version_info="lt_cur:lt_rev:lt_age"
52release_info="v_rel"
53AC_SUBST(version_info)
54AC_SUBST(release_info)
55##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
56##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
57VMAJ=v_maj
58AC_SUBST(VMAJ)
59
60
61### Needed information
62
63AC_CANONICAL_BUILD
64AC_CANONICAL_HOST
65
66### Default options with respect to host
67
68want_gnutls="auto"
69want_openssl="auto"
70want_cipher="yes"
71want_signature="yes"
72
73requirement_eet=""
74
75
76### Additional options to configure
77
78# Amalgamation
79
80AC_ARG_ENABLE([amalgamation],
81 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
82 [if test "x${enableval}" = "xyes"; then
83 do_amalgamation="yes"
84 else
85 do_amalgamation="no"
86 fi
87 ],
88 [do_amalgamation="no"]
89)
90AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
91
92EFL_ENABLE_BIN([eet])
93
94# Old eet file format support
95
96old_eet_file_format="yes"
97AC_ARG_ENABLE(old-eet-file-format,
98 [AC_HELP_STRING(
99 [--disable-old-eet-file-format],
100 [disable old eet file format support. [[default=enabled]]]
101 )],
102 [old_eet_file_format=$enableval]
103)
104AC_MSG_CHECKING([whether to support old eet file format])
105AC_MSG_RESULT([${old_eet_file_format}])
106
107if test "x${old_eet_file_format}" = "xyes" ; then
108 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
109else
110 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
111fi
112
113# Gnutls support
114
115AC_ARG_ENABLE([gnutls],
116 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
117 [want_gnutls=$enableval]
118)
119AC_MSG_CHECKING([whether to use Gnutls])
120AC_MSG_RESULT([${want_gnutls}])
121
122# Specific GNUTLS improvement
123
124new_gnutls_api="yes"
125AC_ARG_ENABLE(new-gnutls-api,
126 [AC_HELP_STRING(
127 [--disable-new-gnutls-api],
128 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
129 )],
130 [new_gnutls_api=$enableval]
131)
132AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
133AC_MSG_RESULT([${new_gnutls_api}])
134
135if test "x${new_gnutls_api}" = "xyes" ; then
136 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
137 [ new_gnutls_api="yes" ],
138 [ new_gnutls_api="no" ]
139 )
140
141 if test "x${new_gnutls_api}" = "xyes"; then
142 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
143 fi
144fi
145
146# Openssl support
147
148AC_ARG_ENABLE([openssl],
149 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
150 [want_openssl=$enableval]
151)
152AC_MSG_CHECKING([whether to use OpenSSL])
153AC_MSG_RESULT([${want_openssl}])
154
155# Cryptography support
156
157AC_ARG_ENABLE([cipher],
158 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
159 [want_cipher=$enableval]
160)
161AC_MSG_CHECKING([whether to use cipher])
162AC_MSG_RESULT([${want_cipher}])
163
164AC_ARG_ENABLE([signature],
165 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
166 [want_signature=$enableval]
167)
168AC_MSG_CHECKING([whether to use signature])
169AC_MSG_RESULT([${want_signature}])
170
171# Assert or fail.
172prefer_assert="no"
173AC_ARG_ENABLE([assert],
174 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
175 [prefer_assert=$enableval]
176)
177
178# Examples
179
180AC_ARG_ENABLE([install-examples],
181 [AC_HELP_STRING([--disable-install-examples],
182 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
183 [
184 if test "x${enableval}" = "xyes" ; then
185 install_examples="yes"
186 else
187 install_examples="no"
188 fi
189 ],
190 [install_examples="yes"])
191AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
192
193AC_ARG_ENABLE([build-examples],
194 [AC_HELP_STRING([--enable-build-examples],
195 [enable building examples. @<:@default==disabled@:>@])],
196 [
197 if test "x${enableval}" = "xyes" ; then
198 build_examples="yes"
199 else
200 build_examples="no"
201 fi
202 ],
203 [build_examples="no"])
204AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
205
206# Unit tests, coverage and benchmarking
207
208EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
209EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
210
211if test "x${prefer_assert}" = "xno"; then
212 DEBUG_CFLAGS="-DNDEBUG"
213else
214# use debug symbols and set DEBUG if coverage support is enabled
215 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
216fi
217AC_SUBST(DEBUG_CFLAGS)
218
219
220### Checks for programs
221AC_PROG_CC
222
223# pkg-config
224PKG_PROG_PKG_CONFIG
225
226# Check whether pkg-config supports Requires.private
227if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
228 pkgconfig_requires_private="Requires.private"
229else
230 pkgconfig_requires_private="Requires"
231fi
232AC_SUBST(pkgconfig_requires_private)
233
234
235# doxygen program for documentation building
236
237EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
238
239### Checks for libraries
240
241# Evil library for compilation on Windows
242
243EFL_EET_BUILD=""
244case "$host_os" in
245 mingw*)
246 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
247 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
248 requirement_eet="evil ${requirement_eet}"
249 EFL_EET_BUILD="-DEFL_EET_BUILD"
250 ;;
251esac
252AC_SUBST(EFL_EET_BUILD)
253
254EET_LIBS=""
255case "$host_os" in
256 mingw32ce*)
257 EET_LIBS="-lws2"
258 ;;
259 mingw*)
260 EET_LIBS="-lws2_32"
261 ;;
262esac
263AC_SUBST(EET_LIBS)
264
265# Eina library
266
267PKG_CHECK_MODULES(EINA, [eina >= 1.1.0])
268requirement_eet="eina >= 1.1.0 ${requirement_eet}"
269
270# Gnutls library
271have_gnutls="no"
272if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
273 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
274 [
275 have_gnutls="yes"
276 want_openssl="no"
277 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
278 requirement_eet="gnutls ${requirement_eet}"
279 ],
280 [have_gnutls="no"])
281 if test "x${have_gnutls}" = "xyes" ; then
282 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
283 if test "x${have_gnutls}" = "xyes" ; then
284 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
285 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
286 fi
287 fi
288fi
289
290# Openssl library
291have_openssl="no"
292if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
293 PKG_CHECK_MODULES(OPENSSL, openssl,
294 [
295 have_openssl="yes"
296 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
297 requirement_eet="openssl ${requirement_eet}"
298 ],
299 [have_openssl="no"])
300fi
301
302if test "x${have_gnutls}" = "xyes" ; then
303 secure_layer="GnuTLS"
304elif test "x${have_openssl}" = "xyes" ; then
305 secure_layer="OpenSSL"
306else
307 secure_layer="no"
308fi
309
310have_cipher="no"
311if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
312 have_cipher="yes"
313 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
314elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
315 have_cipher="yes"
316 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
317fi
318
319AC_MSG_CHECKING(whether to activate cipher support in eet)
320AC_MSG_RESULT(${have_cipher})
321
322have_signature="no"
323if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
324 have_signature="yes"
325 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
326elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
327 have_signature="yes"
328 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
329fi
330
331AC_MSG_CHECKING(whether to activate signature support in eet)
332AC_MSG_RESULT(${have_signature})
333
334### Checks for header files
335
336AC_CHECK_HEADER([zlib.h],
337 [dummy="yes"],
338 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
339
340AC_CHECK_HEADER([jpeglib.h],
341 [dummy="yes"],
342 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
343
344AC_CHECK_HEADERS(netinet/in.h unistd.h)
345EFL_CHECK_PATH_MAX
346
347### Checks for types
348
349
350### Checks for structures
351
352
353### Checks for compiler characteristics
354AM_PROG_CC_C_O
355AC_C_CONST
356AC_C_INLINE
357AC_PROG_CC_STDC
358AC_C___ATTRIBUTE__
359
360# Check whether the null pointer is zero on this arch
361AC_TRY_RUN(
362 [
363#include <stdlib.h>
364#include <inttypes.h>
365int main (int argc, char **argv) {
366 void *foo = NULL;
367 uintptr_t bar = (uintptr_t)foo;
368 return (uintptr_t)foo;
369}
370 ],
371 [have_null="yes"],
372 [have_null="no"],
373 [
374 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
375 have_null="yes"
376 ])
377AC_MSG_CHECKING([value of the null pointer])
378AC_MSG_RESULT([${have_null}])
379
380if test ! "x${have_null}" = "xyes" ; then
381 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
382fi
383
384# These are needed for fmemopen/open_memstream
385AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
386
387EET_CPPFLAGS=""
388EET_CFLAGS=""
389case "$host_os" in
390 mingw32ce*)
391 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
392 ;;
393 mingw*)
394 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
395 ;;
396esac
397AC_SUBST(EET_CPPFLAGS)
398AC_SUBST(EET_CFLAGS)
399
400
401### Checks for linker characteristics
402
403# use --enable-auto-import on Windows
404
405lt_enable_auto_import=""
406case "$host_os" in
407 mingw*)
408 lt_enable_auto_import="-Wl,--enable-auto-import"
409 ;;
410esac
411AC_SUBST(lt_enable_auto_import)
412
413case "${host_os}" in
414 openbsd*)
415 ;;
416 *)
417 EFL_LINKER_FLAG([-Wl,--as-needed])
418 ;;
419esac
420
421
422### Checks for library functions
423AC_ISC_POSIX
424AC_FUNC_ALLOCA
425
426AC_CHECK_FUNCS(fmemopen open_memstream realpath)
427
428EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
429
430
431AC_SUBST(requirement_eet)
432
433AC_OUTPUT([
434Makefile
435eet.pc
436doc/Makefile
437doc/Doxyfile
438doc/eet.dox
439src/Makefile
440src/lib/Makefile
441src/bin/Makefile
442src/tests/Makefile
443src/examples/Makefile
444eet.spec
445])
446
447
448#####################################################################
449## Info
450
451echo
452echo
453echo
454echo "------------------------------------------------------------------------"
455echo "$PACKAGE_NAME $PACKAGE_VERSION"
456echo "------------------------------------------------------------------------"
457echo
458echo "Configuration Options Summary:"
459echo
460echo " Amalgamation.........: ${do_amalgamation}"
461echo " Secure layer.........: ${secure_layer}"
462if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
463 echo " Cipher support.....: ${have_cipher}"
464 echo " Signature..........: ${have_signature}"
465fi
466echo
467echo " Old eet file format..: ${old_eet_file_format}"
468echo
469echo " Tests................: ${enable_tests}"
470echo " Coverage.............: ${enable_coverage}"
471echo
472echo " Build eet............: $have_eet"
473echo
474echo " Documentation........: ${build_doc}"
475if test "x${build_doc}" = "xyes" ; then
476 echo " Building...........: make doc"
477fi
478echo " Examples.............: ${build_examples}"
479if test "x${build_examples}" = "xyes" ; then
480 echo " Install............: ${install_examples}"
481fi
482echo
483echo "Compilation............: make (or gmake)"
484echo " CPPFLAGS.............: $CPPFLAGS"
485echo " CFLAGS...............: $CFLAGS"
486echo " LDFLAGS..............: $LDFLAGS"
487echo
488echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
489echo " prefix...............: $prefix"
490echo