aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/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/eina/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/eina/configure.ac')
-rw-r--r--libraries/eina/configure.ac797
1 files changed, 797 insertions, 0 deletions
diff --git a/libraries/eina/configure.ac b/libraries/eina/configure.ac
new file mode 100644
index 0000000..5e2fab2
--- /dev/null
+++ b/libraries/eina/configure.ac
@@ -0,0 +1,797 @@
1##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1])
4m4_define([v_min], [1])
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-07])
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([eina], [v_ver], [enlightenment-devel@lists.sourceforge.net])
22AC_PREREQ([2.59])
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_GNU_SOURCE
39AC_SYS_LARGEFILE
40
41AC_LIBTOOL_WIN32_DLL
42define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
43define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
44AC_PROG_LIBTOOL
45
46##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
47##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
48m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
49m4_ifdef([v_rel], , [m4_define([v_rel], [])])
50AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
51AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
52AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
53AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
54version_info="lt_cur:lt_rev:lt_age"
55release_info="v_rel"
56AC_SUBST(version_info)
57AC_SUBST(release_info)
58##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
59##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
60VMAJ=v_maj
61AC_SUBST(VMAJ)
62
63
64### Needed information
65
66AC_CANONICAL_BUILD
67AC_CANONICAL_HOST
68
69requirement_eina=""
70
71case "$host_os" in
72 mingw32ce*)
73 MODULE_ARCH="$host_os-$host_cpu"
74 ;;
75 *)
76 MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
77 ;;
78esac
79AC_SUBST(MODULE_ARCH)
80AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
81
82case "$host_os" in
83 mingw*)
84 MODULE_EXT=".dll"
85 ;;
86 *)
87 MODULE_EXT=".so"
88 ;;
89esac
90
91AC_DEFINE_UNQUOTED(SHARED_LIB_SUFFIX, "${MODULE_EXT}", [Suffix for shared objects])
92
93EFL_CHECK_CPU_MMX([have_mmx="yes"], [have_mmx="no"])
94EFL_CHECK_CPU_SSE([have_sse="yes"], [have_sse="no"])
95EFL_CHECK_CPU_SSE2([have_sse2="yes"], [have_sse2="no"])
96EFL_CHECK_CPU_ALTIVEC([have_altivec="yes"], [have_altivec="no"])
97
98EFL_CHECK_THREADS(
99 [
100 if test "x${_efl_have_posix_threads}" = "xyes" ; then
101 have_threads="POSIX"
102 else
103 if test "x${_efl_have_win32_threads}" = "xyes" ; then
104 have_threads="Win32"
105 else
106 have_threads="no"
107 fi
108 fi
109 ],
110 [have_threads="no"])
111EFL_CHECK_SPINLOCK([have_posix_threads_spinlock="yes"], [have_posix_threads_spinlock="no"])
112
113if ! test "x${have_threads}" = "xno" ; then
114 EINA_CONFIGURE_HAVE_THREADS="#define EINA_HAVE_THREADS"
115fi
116AC_SUBST(EINA_CONFIGURE_HAVE_THREADS)
117AM_CONDITIONAL([EINA_HAVE_THREADS], [! test "x${have_threads}" = "xno"])
118
119if ! test "x${have_debug_threads}" = "xno"; then
120 EINA_CONFIGURE_HAVE_DEBUG_THREADS="#define EINA_HAVE_DEBUG_THREADS"
121fi
122AC_SUBST(EINA_CONFIGURE_HAVE_DEBUG_THREADS)
123AM_CONDITIONAL([EINA_DEBUG_THREADS], [! test "x${have_debug_threads}" = "xno"])
124
125if ! test "x${have_on_off_threads}" = "xno"; then
126 EINA_CONFIGURE_HAVE_ON_OFF_THREADS="#define EINA_HAVE_ON_OFF_THREADS"
127fi
128AC_SUBST(EINA_CONFIGURE_HAVE_ON_OFF_THREADS)
129AM_CONDITIONAL([EINA_ON_OFF_THREADS], [! test "x${have_on_off_threads}" = "xno"])
130
131### Additional options to configure
132
133# Magic debug
134AC_ARG_ENABLE([magic-debug],
135 [AC_HELP_STRING([--disable-magic-debug], [disable magic debug of eina structure @<:@default=enabled@:>@])],
136 [
137 if test "x${enableval}" = "xyes" ; then
138 have_magic_debug="yes"
139 else
140 have_magic_debug="no"
141 fi
142 ],
143 [have_magic_debug="yes"])
144
145AC_MSG_CHECKING([whether magic debug is enable])
146AC_MSG_RESULT([${have_magic_debug}])
147
148if test "x${have_magic_debug}" = "xyes" ; then
149 EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG"
150fi
151AC_SUBST(EINA_CONFIGURE_MAGIC_DEBUG)
152
153# Safety checks (avoid crashes on wrong api usage)
154AC_ARG_ENABLE(safety-checks,
155 [AC_HELP_STRING([--disable-safety-checks], [disable safety checks for NULL pointers and like. @<:@default=enabled@:>@])],
156 [
157 if test "x${enableval}" = "xyes" ; then
158 have_safety_checks="yes"
159 else
160 have_safety_checks="no"
161 fi
162 ],
163 [have_safety_checks="yes"])
164
165AC_MSG_CHECKING(whether to do safety checking on api parameters)
166AC_MSG_RESULT($have_safety_checks)
167
168AM_CONDITIONAL(SAFETY_CHECKS, test "x$have_safety_checks" = "xyes")
169if test "x$have_safety_checks" = "xyes"; then
170 AC_DEFINE(EINA_SAFETY_CHECKS, 1, [disable safety checks for NULL pointers and like.])
171 EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS"
172fi
173AC_SUBST(EINA_CONFIGURE_SAFETY_CHECKS)
174
175with_max_log_level="<unset>"
176AC_ARG_WITH(internal-maximum-log-level,
177 [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
178 [limit eina internal log level to the given number, any call to EINA_LOG() with values greater than this will be compiled out, ignoring runtime settings, but saving function calls.])],
179 [
180 if test "x${withval}" != "xno"; then
181 if echo "${withval}" | grep -E '^[[0-9]]+$' >/dev/null 2>/dev/null; then
182 AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}])
183 AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${withval}, [if set, logging is limited to this amount.])
184 with_max_log_level="${withval}"
185 else
186 AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal number, got "${withval}" instead.])
187 fi
188 fi
189 ], [:])
190
191AC_ARG_ENABLE([amalgamation],
192 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
193 [if test "x${enableval}" = "xyes"; then
194 do_amalgamation="yes"
195 else
196 do_amalgamation="no"
197 fi
198 ],
199 [do_amalgamation="no"]
200)
201AM_CONDITIONAL(EINA_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
202
203# Choose best memory pool
204AC_ARG_ENABLE([default-mempool],
205 [AC_HELP_STRING([--enable-default-mempool], [Default memory allocator could be faster for some computer. @<:@default=disabled@:>@])],
206 [
207 if test "x${enableval}" = "xyes"; then
208 have_default_mempool="yes"
209 else
210 have_default_mempool="no"
211 fi
212 ],
213 [have_default_mempool="no"]
214)
215AC_MSG_CHECKING([whether to use default mempool allocator])
216AC_MSG_RESULT([${have_default_mempool}])
217
218if test "x${have_default_mempool}" = "xyes" ; then
219 EINA_CONFIGURE_DEFAULT_MEMPOOL="#define EINA_DEFAULT_MEMPOOL"
220fi
221AC_SUBST(EINA_CONFIGURE_DEFAULT_MEMPOOL)
222
223# Report stringshare usage
224AC_ARG_ENABLE([stringshare-usage],
225 [AC_HELP_STRING([--enable-stringshare-usage], [Report stringshare usage on stringshare shutdown. @<:@default=disabled@:>@])],
226 [
227 if test "x${enableval}" = "xyes"; then
228 have_stringshare_usage="yes"
229 else
230 have_stringshare_usage="no"
231 fi
232 ],
233 [have_stringshare_usage="no"]
234)
235AC_MSG_CHECKING([whether to report stringshare usage])
236AC_MSG_RESULT([${have_stringshare_usage}])
237
238if test "x${have_stringshare_usage}" = "xyes"; then
239 AC_DEFINE(EINA_STRINGSHARE_USAGE, 1, [Report Eina stringshare usage pattern])
240fi
241
242# Check if we want to benchmark on real data
243enable_benchmark_e17="no"
244AC_ARG_ENABLE([e17],
245 [AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])],
246 [
247 if test "x${enableval}" = "xyes" ; then
248 enable_benchmark_e17="yes"
249 else
250 enable_benchmark_e17="no"
251 fi
252 ],
253 [enable_benchmark_e17="no"])
254
255AC_MSG_CHECKING([whether e17 real data benchmark are built])
256AC_MSG_RESULT([${enable_benchmark_e17}])
257
258AM_CONDITIONAL(EINA_ENABLE_BENCHMARK_E17, test "x${enable_benchmark_e17}" = "xyes")
259
260
261### Checks for programs
262AC_PROG_CC
263AC_PROG_CXX
264
265# pkg-config
266PKG_PROG_PKG_CONFIG
267
268# Check whether pkg-config supports Requires.private
269if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
270 pkgconfig_requires_private="Requires.private"
271else
272 pkgconfig_requires_private="Requires"
273fi
274AC_SUBST(pkgconfig_requires_private)
275
276# doxygen program for documentation building
277
278EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
279
280
281### Checks for libraries
282
283# Valgrind
284want_valgrind="auto"
285have_valgrind="no"
286
287AC_ARG_ENABLE([valgrind],
288 [AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks.])],
289 [want_valgrind=$enableval])
290
291AC_MSG_CHECKING([whether to enable build with valgrind])
292AC_MSG_RESULT([${want_valgrind}])
293
294if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then
295 PKG_CHECK_MODULES([VALGRIND],
296 [valgrind >= 2.4.0],
297 [
298 requirement_eina="valgrind ${requirement_eina}"
299 have_valgrind="yes"
300 ],
301 [
302 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
303 if test "x${want_valgrind}" = "xyes"; then
304 AC_MSG_ERROR([Valgrind >= 2.4.0 is required])
305 fi
306 ])
307else
308 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
309fi
310
311
312# Evil library for compilation on Windows CE
313
314EFL_EINA_BUILD=""
315case "$host_os" in
316 mingw*)
317 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
318 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if evil package is installed])
319 requirement_eina="evil"
320 EFL_EINA_BUILD="-DEFL_EINA_BUILD"
321 ;;
322esac
323AC_SUBST([EFL_EINA_BUILD])
324
325# Check ememoa memory pool library
326
327AC_ARG_ENABLE([ememoa],
328 [AC_HELP_STRING([--enable-ememoa], [build ememoa memory pool module @<:@default=yes@:>@])],
329 [
330 if test "x${enableval}" = "xyes" ; then
331 enable_ememoa="yes"
332 else
333 enable_ememoa="no"
334 fi
335 ],
336 [enable_ememoa="yes"])
337
338AC_MSG_CHECKING([whether to use ememoa for memory pool])
339AC_MSG_RESULT([$enable_ememoa])
340
341if test "x${enable_ememoa}" = "xyes" ; then
342 PKG_CHECK_MODULES([EMEMOA],
343 [ememoa >= 0.0.26 ],
344 [enable_ememoa="yes"],
345 [enable_ememoa="no"])
346fi
347
348PKG_CHECK_MODULES([ECORE_EVAS],
349 [ecore-evas ecore evas],
350 [build_tiler_example="yes"],
351 [build_tiler_example="no"])
352
353AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"])
354
355
356### Checks for header files
357AC_HEADER_ASSERT
358AC_HEADER_DIRENT
359AC_HEADER_TIME
360EFL_CHECK_PATH_MAX
361AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h])
362
363if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
364 EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
365 AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.])
366fi
367AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H])
368
369if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
370 EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
371 AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.])
372fi
373AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H])
374
375### Checks for types
376
377AC_CHECK_SIZEOF([wchar_t])
378EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
379AC_SUBST([EINA_SIZEOF_WCHAR_T])
380AC_CHECK_TYPES([siginfo_t], [], [],
381 [[#include <signal.h>
382 #if HAVE_SIGINFO_H
383 # include <siginfo.h>
384 #endif
385 ]])
386
387### Checks for structures
388
389
390### Checks for compiler characteristics
391AC_C_CONST
392AC_C_BIGENDIAN
393AC_C_INLINE
394AC_PROG_CC_STDC
395EFL_ATTRIBUTE_UNUSED
396
397have_wince="no"
398have_win32="no"
399EINA_CPPFLAGS=""
400EINA_CFLAGS=""
401case "$host_os" in
402 mingw32ce*)
403 EINA_CPPFLAGS="-D_WIN32_WCE=0x0420"
404 EINA_CFLAGS="${EVIL_CFLAGS}"
405 have_win32="yes"
406 have_wince="yes"
407 ;;
408 mingw*)
409 EINA_CPPFLAGS="-D_WIN32_WINNT=0x0501"
410 EINA_CFLAGS="${EVIL_CFLAGS}"
411 have_win32="yes"
412 ;;
413esac
414AM_CONDITIONAL([EINA_HAVE_WINCE], [test "x$have_wince" = "xyes"])
415AM_CONDITIONAL([EINA_HAVE_WIN32], [test "x$have_win32" = "xyes"])
416
417m4_ifdef([v_mic],
418 [
419 EFL_COMPILER_FLAG([-Wall])
420 EFL_COMPILER_FLAG([-W])
421 ])
422
423EFL_COMPILER_FLAG([-Wshadow])
424
425AC_SUBST([EINA_CPPFLAGS])
426AC_SUBST([EINA_CFLAGS])
427
428
429### Checks for linker characteristics
430EINA_LIBS=
431lt_enable_auto_import=""
432case "${host_os}" in
433 mingw*)
434 EINA_LIBS="-ldl ${EVIL_LIBS} -lm"
435 lt_enable_auto_import="-Wl,--enable-auto-import"
436 ;;
437 dragonfly*|openbsd*)
438 EINA_LIBS="-lm"
439 ;;
440 freebsd*|netbsd*)
441 EINA_LIBS="-lrt -lm"
442 ;;
443 darwin*)
444 EINA_LIBS="-lm"
445 ;;
446 cygwin*)
447 EINA_LIBS="-ldl -lm"
448 ;;
449 *)
450 EINA_LIBS="-ldl -lrt -lm"
451 ;;
452esac
453AC_SUBST([EINA_LIBS])
454AC_SUBST([lt_enable_auto_import])
455
456case "$host_vendor" in
457 ps3*)
458 PKG_CHECK_MODULES([ESCAPE], [escape])
459 AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if evil package is installed])
460 requirement_eina="escape"
461 EINA_LIBS="${ESCAPE_LIBS}"
462 EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}"
463 ;;
464esac
465
466EFL_LINKER_FLAG([-fno-strict-aliasing])
467
468
469### Checks for library functions
470AC_ISC_POSIX
471AC_FUNC_ALLOCA
472AC_CHECK_FUNCS([strlcpy dirfd openat fstatat fpathconf execvp])
473
474# dlopen and dladdr
475dlopen_libs=""
476case "$host_os" in
477 mingw*)
478# managed by evil
479 AC_DEFINE([HAVE_DLADDR])
480 AC_DEFINE([HAVE_DLOPEN])
481 ;;
482 *)
483 AC_CHECK_FUNCS([dlopen], [res="yes"], [res="no"])
484 if test "x${res}" = "xyes" ; then
485 AC_CHECK_FUNCS([dladdr], [AC_DEFINE([HAVE_DLADDR])])
486 AC_DEFINE([HAVE_DLOPEN])
487 else
488 AC_CHECK_LIB([dl], [dlopen], [res="yes"], [res="no"])
489 if test "x${res}" = "xyes" ; then
490 AC_CHECK_LIB([dl], [dladdr], [AC_DEFINE([HAVE_DLADDR])])
491 AC_DEFINE(HAVE_DLOPEN)
492 dlopen_libs="-ldl"
493 fi
494 fi
495 ;;
496esac
497AC_SUBST([dlopen_libs])
498
499EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
500
501AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])])
502AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])])
503
504# iconv library
505have_iconv="no"
506AC_ARG_WITH([iconv-link],
507 AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
508 [
509 LIBS="$withval $LIBS"
510 have_iconv="yes"
511 iconv_libs=$withval
512 ])
513
514AC_MSG_CHECKING(for explicit iconv link options)
515if test "x${iconv_libs}" = "x" ; then
516 AC_MSG_RESULT([no explicit iconv link option])
517else
518 AC_MSG_RESULT([$iconv_libs])
519fi
520
521if test "x${have_iconv}" = "xno" ; then
522 AC_CHECK_HEADERS([iconv.h], [have_iconv="yes"])
523
524 if test "x${have_iconv}" = "xyes" ; then
525 AC_MSG_CHECKING([whether iconv() is in libc])
526
527 AC_LINK_IFELSE(
528 [AC_LANG_PROGRAM(
529 [[
530#include <stdlib.h>
531#include <iconv.h>
532 ]],
533 [[
534iconv_t ic;
535size_t count = iconv(ic, NULL, NULL, NULL, NULL);
536 ]])],
537 [have_iconv="yes"],
538 [have_iconv="no"])
539
540 AC_MSG_RESULT([${have_iconv}])
541 fi
542
543 if test "x${have_iconv}" = "xno" ; then
544 AC_MSG_CHECKING([whether iconv() is in libiconv.a])
545
546 LIBS_save="${LIBS}"
547 LIBS="-liconv $LIBS"
548 AC_LINK_IFELSE(
549 [AC_LANG_PROGRAM(
550 [[
551#include <stdlib.h>
552#include <iconv.h>
553 ]],
554 [[
555iconv_t ic;
556size_t count;
557count = iconv(ic, NULL, NULL, NULL, NULL);
558 ]])],
559 [
560 have_iconv="yes"
561 iconv_libs="-liconv"
562 ],
563 [
564 have_iconv="no"
565 LIBS=${LIBS_save}
566 ])
567
568 AC_MSG_RESULT([${have_iconv}])
569 fi
570
571 if test "x${have_iconv}" = "xno" ; then
572 AC_MSG_CHECKING([whether iconv() is in libiconv_plug.a])
573
574 LIBS_save="${LIBS}"
575 LIBS="-liconv_plug $LIBS"
576 AC_LINK_IFELSE(
577 [AC_LANG_PROGRAM(
578 [[
579#include <stdlib.h>
580#include <iconv.h>
581 ]],
582 [[
583iconv_t ic;
584size_t count = iconv(ic, NULL, NULL, NULL, NULL);
585 ]])],
586 [
587 have_iconv="yes"
588 iconv_libs="-liconv_plug"
589 ],
590 [
591 have_iconv="no"
592 LIBS=${LIBS_save}
593 ])
594
595 AC_MSG_RESULT([${have_iconv}])
596 fi
597fi
598
599AC_SUBST([iconv_libs])
600
601if test "x${have_iconv}" = "xyes" ; then
602 AC_DEFINE([HAVE_ICONV], [1], [Set to 1 if iconv library is installed])
603fi
604
605# shmopen
606have_shmopen=no
607AC_MSG_CHECKING([for shm_open availability])
608
609LIBS_save="${LIBS}"
610LIBS="${LIBS} -lrt"
611AC_LINK_IFELSE(
612 [AC_LANG_PROGRAM(
613 [[
614#include <sys/mman.h>
615#include <sys/stat.h> /* For mode constants */
616#include <fcntl.h> /* For O_* constants */
617 ]],
618 [[
619int fd;
620
621fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO);
622 ]])],
623 [have_shmopen="yes"],
624 [have_shmopen="no"])
625
626LIBS="${LIBS_save}"
627
628AC_MSG_RESULT([${have_shmopen}])
629
630if test "x${have_shmopen}" = "xyes"; then
631 AC_DEFINE([HAVE_SHMOPEN], [1], [Define to 1 if you have the `shm_open' function.])
632 rt_libs="-lrt"
633fi
634
635AC_SUBST([rt_libs])
636
637# extended attribute
638
639AC_MSG_CHECKING([for extended attributes])
640
641AC_COMPILE_IFELSE(
642 [AC_LANG_PROGRAM(
643 [[
644#include <stdlib.h>
645#include <sys/types.h>
646#include <sys/xattr.h>
647 ]],
648 [[
649size_t tmp = listxattr("/", NULL, 0);
650tmp = getxattr("/", "user.ethumb.md5", NULL, 0);
651setxattr("/", "user.ethumb.md5", NULL, 0, 0);
652 ]])],
653 [
654 AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.])
655 have_xattr="yes"
656 ],
657 [have_xattr="no"])
658
659AC_MSG_RESULT([${have_xattr}])
660
661### Modules
662
663if test "x${have_default_mempool}" = "xyes" ; then
664 enable_chained_pool="no"
665 enable_pass_through="static"
666else
667 enable_chained_pool="static"
668 enable_pass_through="no"
669fi
670
671enable_one_big="static"
672
673EINA_CHECK_MODULE([chained-pool], [${enable_chained_pool}], [chained pool])
674EINA_CHECK_MODULE([ememoa-fixed], [${enable_ememoa}], [ememoa fixed])
675EINA_CHECK_MODULE([ememoa-unknown], [${enable_ememoa}], [ememoa unknown])
676EINA_CHECK_MODULE([fixed-bitmap], [no], [fixed bitmap])
677EINA_CHECK_MODULE([pass-through], [${enable_pass_through}], [pass through])
678EINA_CHECK_MODULE([buddy], [no], [buddy])
679EINA_CHECK_MODULE([one-big], [${enable_one_big}], [one big])
680
681### Make the debug preprocessor configurable
682
683### Unit tests, coverage and benchmarking
684
685EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
686
687EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
688EINA_CFLAGS="${EINA_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
689EINA_LIBS="${EINA_LIBS} ${EFL_COVERAGE_LIBS}"
690if test "x$enable_coverage" = "xyes" ; then
691 EINA_CFLAGS="${EINA_CFLAGS} ${EFL_DEBUG_CFLAGS}"
692fi
693
694EFL_CHECK_BENCHMARK([enable_benchmark="yes"], [enable_benchmark="no"])
695EINA_BENCH_MODULE([glib], [${enable_benchmark}], [glib-2.0], [enable_benchmark_glib="yes"], [enable_benchmark_glib="no"])
696if test -n "$CXX" && test "x$enable_benchmark" = "xyes" ; then
697 AC_DEFINE_UNQUOTED([CITYHASH_BENCH], [1], [enable bench tests for google hash method])
698fi
699AM_CONDITIONAL([CITYHASH_BENCH], [test -n "$CXX" && test "x$enable_benchmark" = "xyes"])
700
701AC_SUBST(requirement_eina)
702
703### Build and install examples
704EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
705EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
706
707AC_CONFIG_FILES([
708Makefile
709eina.pc
710eina.spec
711doc/Makefile
712doc/Doxyfile
713src/Makefile
714src/include/Makefile
715src/include/eina_config.h
716src/lib/Makefile
717src/modules/Makefile
718src/modules/mp/Makefile
719src/modules/mp/chained_pool/Makefile
720src/modules/mp/ememoa_fixed/Makefile
721src/modules/mp/ememoa_unknown/Makefile
722src/modules/mp/pass_through/Makefile
723src/modules/mp/fixed_bitmap/Makefile
724src/modules/mp/buddy/Makefile
725src/modules/mp/one_big/Makefile
726src/tests/Makefile
727src/examples/Makefile
728])
729
730AC_OUTPUT
731
732#####################################################################
733## Info
734
735echo
736echo
737echo
738echo "------------------------------------------------------------------------"
739echo "$PACKAGE $VERSION"
740echo "------------------------------------------------------------------------"
741echo
742echo
743echo "Configuration Options Summary:"
744echo
745echo " Magic debug..........: ${have_magic_debug}"
746echo " Safety checks........: ${have_safety_checks}"
747echo " Maximum log level....: ${with_max_log_level}"
748echo " Report string usage..: ${have_stringshare_usage}"
749echo " Valgrind support.....: ${have_valgrind}"
750echo " Default mempool......: ${have_default_mempool}"
751echo " Thread Support.......: ${have_threads}"
752if test "${have_threads}" = "POSIX" ; then
753echo " spinlock...........: ${have_posix_threads_spinlock}"
754echo " debug usage........: ${have_debug_threads}"
755echo " on/off support.....: ${have_on_off_threads}"
756fi
757echo " Amalgamation.........: ${do_amalgamation}"
758echo " Iconv support........: ${have_iconv}"
759echo " File dirfd...........: ${ac_cv_func_dirfd}"
760echo " File xattr...........: ${have_xattr}"
761echo
762echo " Documentation........: ${build_doc}"
763echo " Tests................: ${enable_tests}"
764echo " Coverage.............: ${enable_coverage}"
765echo " Examples.............: ${enable_build_examples}"
766echo " Tiler Example........: ${build_tiler_example}"
767echo " Examples installed...: ${enable_install_examples}"
768echo " Benchmark............: ${enable_benchmark}"
769if test "x${enable_benchmark}" = "xyes" ; then
770echo " Glib...............: ${enable_benchmark_glib}"
771echo " E17 real data......: ${enable_benchmark_e17}"
772fi
773echo
774echo " CPU Specific Extensions:"
775echo " MMX................: ${have_mmx}"
776echo " SSE................: ${have_sse}"
777echo " SSE2...............: ${have_sse2}"
778echo " ALTIVEC............: ${have_altivec}"
779echo
780echo " Memory pools:"
781echo " Buddy..............: ${enable_buddy}"
782echo " Chained pool.......: ${enable_chained_pool}"
783echo " Ememoa fixed.......: ${enable_ememoa_fixed}"
784echo " Ememoa unknown.....: ${enable_ememoa_unknown}"
785echo " Fixed bitmap.......: ${enable_fixed_bitmap}"
786echo " One big............: ${enable_one_big}"
787echo " Pass through.......: ${enable_pass_through}"
788echo
789echo "Compilation............: make (or gmake)"
790echo " CPPFLAGS.............: $CPPFLAGS"
791echo " CFLAGS...............: $CFLAGS"
792echo " LDFLAGS..............: $LDFLAGS"
793echo
794echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
795echo " prefix...............: $prefix"
796echo
797EFL_FORM_VOLTRON