Eina: Add Eina_Lock API
[framework/uifw/eina.git] / configure.ac
1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [0])
5 m4_define([v_mic], [999])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7 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']))])
8 ##--   When released, remove the dnl on the below line
9 dnl m4_undefine([v_rev])
10 ##--   When doing snapshots - change soname. remove dnl on below line
11 dnl m4_define([relname], [ver-pre-svn-07])
12 dnl m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_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])])
15 m4_define([lt_cur], m4_eval(v_maj + v_min))
16 m4_define([lt_rev], v_mic)
17 m4_define([lt_age], v_min)
18 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21 AC_INIT([eina], [v_ver], [enlightenment-devel@lists.sourceforge.net])
22 AC_PREREQ([2.59])
23 AC_CONFIG_SRCDIR([configure.ac])
24 AC_CONFIG_MACRO_DIR([m4])
25
26 AC_CONFIG_HEADERS([config.h])
27 AH_TOP([
28 #ifndef EFL_CONFIG_H__
29 #define EFL_CONFIG_H__
30 ])
31 AH_BOTTOM([
32 #endif /* EFL_CONFIG_H__ */
33 ])
34
35 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38 AC_GNU_SOURCE
39 AC_SYS_LARGEFILE
40
41 AC_LIBTOOL_WIN32_DLL
42 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
43 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
44 AC_PROG_LIBTOOL
45
46 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
47 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
48 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
49 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
50 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
51 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
52 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
53 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
54 version_info="lt_cur:lt_rev:lt_age"
55 release_info="v_rel"
56 AC_SUBST(version_info)
57 AC_SUBST(release_info)
58 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
59 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
60 VMAJ=v_maj
61 AC_SUBST(VMAJ)
62
63
64 ### Needed information
65
66 AC_CANONICAL_BUILD
67 AC_CANONICAL_HOST
68
69 requirement_eina=""
70
71 case "$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       ;;
78 esac
79 AC_SUBST(MODULE_ARCH)
80 AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
81
82 case "$host_os" in
83    mingw*)
84       MODULE_EXT=".dll"
85       ;;
86    *)
87       MODULE_EXT=".so"
88       ;;
89 esac
90
91 AC_DEFINE_UNQUOTED(SHARED_LIB_SUFFIX, "${MODULE_EXT}", [Suffix for shared objects])
92
93 EFL_CHECK_CPU_MMX([have_mmx="yes"], [have_mmx="no"])
94 EFL_CHECK_CPU_SSE([have_sse="yes"], [have_sse="no"])
95 EFL_CHECK_CPU_SSE2([have_sse2="yes"], [have_sse2="no"])
96 EFL_CHECK_CPU_ALTIVEC([have_altivec="yes"], [have_altivec="no"])
97
98 EFL_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"])
111 EFL_CHECK_SPINLOCK([have_posix_threads_spinlock="yes"], [have_posix_threads_spinlock="no"])
112
113 if ! test "x${have_threads}" = "xno" ; then
114    EINA_CONFIGURE_HAVE_THREADS="#define EINA_HAVE_THREADS"
115 fi
116 AC_SUBST(EINA_CONFIGURE_HAVE_THREADS)
117 AM_CONDITIONAL([EINA_HAVE_THREADS], [! test "x${have_threads}" = "xno"])
118
119 ### Additional options to configure
120
121 # Magic debug
122 AC_ARG_ENABLE([magic-debug],
123    [AC_HELP_STRING([--disable-magic-debug], [disable magic debug of eina structure @<:@default=enabled@:>@])],
124    [
125     if test "x${enableval}" = "xyes" ; then
126        have_magic_debug="yes"
127     else
128        have_magic_debug="no"
129     fi
130    ],
131    [have_magic_debug="yes"])
132
133 AC_MSG_CHECKING([whether magic debug is enable])
134 AC_MSG_RESULT([${have_magic_debug}])
135
136 if test "x${have_magic_debug}" = "xyes" ; then
137    EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG"
138 fi
139 AC_SUBST(EINA_CONFIGURE_MAGIC_DEBUG)
140
141 # Valgrind
142 want_valgrind="auto"
143 have_valgrind="no"
144
145 AC_MSG_CHECKING(whether to enable build with valgrind)
146 AC_ARG_ENABLE(valgrind,
147   AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks.]),
148   [want_valgrind=$enableval]
149 )
150 AC_MSG_RESULT($want_valgrind)
151
152 if test "x${want_valgrind}" = "xyes" -o "x${want_valgrind}" = "xauto"; then
153     PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
154         [
155          requirement_eina="valgrind ${requirement_eina}"
156          have_valgrind="yes"
157         ],
158         [
159          AC_DEFINE(NVALGRIND, 1, [Valgrind support disabled])
160          if test "x$want_valgrind" = "xyes"; then
161             AC_MSG_ERROR([Valgrind >= 2.4.0 is required)])
162          fi
163         ]
164     )
165 else
166     AC_DEFINE(NVALGRIND, 1, [Valgrind support disabled])
167 fi
168
169 # Safety checks (avoid crashes on wrong api usage)
170 AC_ARG_ENABLE(safety-checks,
171    [AC_HELP_STRING([--disable-safety-checks], [disable safety checks for NULL pointers and like. @<:@default=enabled@:>@])],
172    [
173     if test "x${enableval}" = "xyes" ; then
174        have_safety_checks="yes"
175     else
176        have_safety_checks="no"
177     fi
178    ],
179    [have_safety_checks="yes"])
180
181 AC_MSG_CHECKING(whether to do safety checking on api parameters)
182 AC_MSG_RESULT($have_safety_checks)
183
184 AM_CONDITIONAL(SAFETY_CHECKS, test "x$have_safety_checks" = "xyes")
185 if test "x$have_safety_checks" = "xyes"; then
186   AC_DEFINE(EINA_SAFETY_CHECKS, 1, [disable safety checks for NULL pointers and like.])
187   EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS"
188 fi
189 AC_SUBST(EINA_CONFIGURE_SAFETY_CHECKS)
190
191 with_max_log_level="<unset>"
192 AC_ARG_WITH(internal-maximum-log-level,
193    [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
194                    [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.])],
195    [
196     if test "x${withval}" != "xno"; then
197        if echo "${withval}" | grep '^[[0-9]]\+$' >/dev/null 2>/dev/null; then
198           AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}])
199           AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${withval}, [if set, logging is limited to this amount.])
200           with_max_log_level="${withval}"
201        else
202           AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal number, got "${withval}" instead.])
203        fi
204     fi
205     ], [:])
206
207 AC_ARG_ENABLE([amalgamation],
208    [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
209    [if test "x${enableval}" = "xyes"; then
210        do_amalgamation="yes"
211     else
212        do_amalgamation="no"
213     fi
214    ],
215    [do_amalgamation="no"]
216 )
217 AM_CONDITIONAL(EINA_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
218
219 # Choose best memory pool
220 AC_ARG_ENABLE([default-mempool],
221    [AC_HELP_STRING([--enable-default-mempool], [Default memory allocator could be faster for some computer. @<:@default=disabled@:>@])],
222    [
223     if test "x${enableval}" = "xyes"; then
224        have_default_mempool="yes"
225     else
226        have_default_mempool="no"
227     fi
228    ],
229    [have_default_mempool="no"]
230 )
231 AC_MSG_CHECKING([whether to use default mempool allocator])
232 AC_MSG_RESULT([${have_default_mempool}])
233
234 if test "x${have_default_mempool}" = "xyes" ; then
235    EINA_CONFIGURE_DEFAULT_MEMPOOL="#define EINA_DEFAULT_MEMPOOL"
236 fi
237 AC_SUBST(EINA_CONFIGURE_DEFAULT_MEMPOOL)
238
239 # Report stringshare usage
240 AC_ARG_ENABLE([stringshare-usage],
241    [AC_HELP_STRING([--enable-stringshare-usage], [Report stringshare usage on stringshare shutdown. @<:@default=disabled@:>@])],
242    [
243     if test "x${enableval}" = "xyes"; then
244        have_stringshare_usage="yes"
245     else
246        have_stringshare_usage="no"
247     fi
248    ],
249    [have_stringshare_usage="no"]
250 )
251 AC_MSG_CHECKING([whether to report stringshare usage])
252 AC_MSG_RESULT([${have_stringshare_usage}])
253
254 if test "x${have_stringshare_usage}" = "xyes"; then
255    AC_DEFINE(EINA_STRINGSHARE_USAGE, 1, [Report Eina stringshare usage pattern])
256 fi
257
258 # Check if we want to benchmark on real data
259 enable_benchmark_e17="no"
260 AC_ARG_ENABLE([e17],
261    [AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])],
262    [
263     if test "x${enableval}" = "xyes" ; then
264        enable_benchmark_e17="yes"
265     else
266        enable_benchmark_e17="no"
267     fi
268    ],
269    [enable_benchmark_e17="no"])
270
271 AC_MSG_CHECKING([whether e17 real data benchmark are built])
272 AC_MSG_RESULT([${enable_benchmark_e17}])
273
274 AM_CONDITIONAL(EINA_ENABLE_BENCHMARK_E17, test "x${enable_benchmark_e17}" = "xyes")
275
276
277 ### Checks for programs
278 AC_PROG_CC
279 AC_PROG_CXX
280
281 # pkg-config
282 PKG_PROG_PKG_CONFIG
283
284 # Check whether pkg-config supports Requires.private
285 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
286    pkgconfig_requires_private="Requires.private"
287 else
288    pkgconfig_requires_private="Requires"
289 fi
290 AC_SUBST(pkgconfig_requires_private)
291
292 # doxygen program for documentation building
293
294 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
295
296
297 ### Checks for libraries
298
299 # Evil library for compilation on Windows CE
300
301 EFL_EINA_BUILD=""
302 case "$host_os" in
303    mingw*)
304       PKG_CHECK_MODULES([EVIL], [evil])
305       AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
306       requirement_eina="evil"
307       EFL_EINA_BUILD="-DEFL_EINA_BUILD"
308    ;;
309 esac
310 AC_SUBST(EFL_EINA_BUILD)
311
312 # Check ememoa memory pool library
313
314 AC_ARG_ENABLE([ememoa],
315    [AC_HELP_STRING([--enable-ememoa], [build ememoa memory pool module @<:@default=yes@:>@])],
316    [
317     if test "x${enableval}" = "xyes" ; then
318        enable_ememoa="yes"
319     else
320        enable_ememoa="no"
321     fi
322    ],
323    [enable_ememoa="yes"]
324 )
325 AC_MSG_CHECKING([whether to use ememoa for memory pool])
326 AC_MSG_RESULT([$enable_ememoa])
327
328 if test "x${enable_ememoa}" = "xyes" ; then
329    PKG_CHECK_MODULES([EMEMOA],
330       [ememoa >= 0.0.26 ],
331       [enable_ememoa="yes"],
332       [enable_ememoa="no"]
333    )
334 fi
335
336
337 ### Checks for header files
338 AC_HEADER_ASSERT
339 AC_HEADER_DIRENT
340 AC_HEADER_TIME
341 AC_CHECK_HEADERS([unistd.h libgen.h])
342 EFL_CHECK_PATH_MAX
343
344 ### Checks for types
345 AC_CHECK_HEADER([inttypes.h],
346    [
347     EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
348     AC_DEFINE(HAVE_INTTYPES_H, 1, [Define to 1 if you have the <inttypes.h> header file.])
349    ])
350 AC_SUBST(EINA_CONFIGURE_HAVE_INTTYPES_H)
351
352 AC_CHECK_HEADER([stdint.h],
353    [
354     EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
355     AC_DEFINE(HAVE_STDINT_H, 1, [Define to 1 if you have the <stdint.h> header file.])
356    ])
357 AC_SUBST(EINA_CONFIGURE_HAVE_STDINT_H)
358
359 AC_CHECK_SIZEOF(wchar_t)
360 EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
361 AC_SUBST(EINA_SIZEOF_WCHAR_T)
362
363 ### Checks for structures
364
365
366 ### Checks for compiler characteristics
367 AC_C_CONST
368 AC_C_BIGENDIAN
369 AC_C_INLINE
370 AC_C___ATTRIBUTE__
371 AC_PROG_CC_STDC
372
373 have_wince="no"
374 have_win32="no"
375 EINA_CPPFLAGS=""
376 EINA_CFLAGS=""
377 case "$host_os" in
378    mingw32ce*)
379       EINA_CPPFLAGS="-D_WIN32_WCE=0x0420"
380       EINA_CFLAGS="${EVIL_CFLAGS}"
381       have_win32="yes"
382       have_wince="yes"
383       ;;
384    mingw*)
385       EINA_CPPFLAGS="-D_WIN32_WINNT=0x0501"
386       EINA_CFLAGS="${EVIL_CFLAGS}"
387       have_win32="yes"
388       ;;
389 esac
390 AM_CONDITIONAL([EINA_HAVE_WINCE], [test "x$have_wince" = "xyes"])
391 AM_CONDITIONAL([EINA_HAVE_WIN32], [test "x$have_win32" = "xyes"])
392
393 m4_ifdef([v_mic],
394    [
395     EFL_COMPILER_FLAG([-Wall])
396     EFL_COMPILER_FLAG([-W])
397    ])
398
399 EFL_COMPILER_FLAG([-Wshadow])
400
401 AC_SUBST(EINA_CPPFLAGS)
402 AC_SUBST(EINA_CFLAGS)
403
404
405 ### Checks for linker characteristics
406 EINA_LIBS=
407 lt_enable_auto_import=""
408 case "${host_os}" in
409    mingw*)
410       EINA_LIBS="-ldl ${EVIL_LIBS} -lm"
411       lt_enable_auto_import="-Wl,--enable-auto-import"
412    ;;
413    dragonfly*|openbsd*)
414       EINA_LIBS="-lm"
415    ;;
416    freebsd*|netbsd*)
417       EINA_LIBS="-lrt -lm"
418    ;;
419    darwin*)
420       EINA_LIBS="-lm"
421    ;;
422    cygwin*)
423       EINA_LIBS="-ldl -lm"
424    ;;
425    *)
426       EINA_LIBS="-ldl -lrt -lm"
427    ;;
428 esac
429 AC_SUBST(EINA_LIBS)
430 AC_SUBST(lt_enable_auto_import)
431
432 EFL_LINKER_FLAG([-fno-strict-aliasing])
433
434
435 ### Checks for library functions
436 AC_ISC_POSIX
437 AC_FUNC_ALLOCA
438 AC_CHECK_FUNCS(strlcpy)
439
440 #dlopen and dladdr
441 dlopen_libs=""
442 case "$host_os" in
443    mingw*)
444 # managed by evil
445       AC_DEFINE(HAVE_DLADDR)
446       ;;
447    *)
448       AC_CHECK_FUNCS([dlopen], [res="yes"], [res="no"])
449       if test "x${res}" = "xyes" ; then
450          AC_CHECK_FUNCS([dladdr], [AC_DEFINE(HAVE_DLADDR)])
451       else
452          AC_CHECK_LIB([dl], [dlopen], [res="yes"], [res="no"])
453          if test "x${res}" = "xyes" ; then
454             AC_CHECK_LIB([dl], [dladdr], [AC_DEFINE(HAVE_DLADDR)])
455             dlopen_libs="-ldl"
456          else
457             AC_MSG_ERROR([Cannot find dlopen])
458          fi
459       fi
460       ;;
461 esac
462 AC_SUBST(dlopen_libs)
463
464 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
465
466 # iconv library
467 have_iconv="no"
468 AC_ARG_WITH([iconv-link],
469    AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
470    [
471     LIBS="$withval $LIBS"
472     have_iconv="yes"
473    ])
474
475 AC_MSG_CHECKING(for explicit iconv link options)
476 if test "x${iconv_libs}" = "x" ; then
477    AC_MSG_RESULT([no explicit iconv link option])
478 else
479    AC_MSG_RESULT([$iconv_libs])
480 fi
481
482 if test "x${have_iconv}" = "xno" ; then
483    AC_CHECK_HEADERS([iconv.h], [have_iconv="yes"])
484
485    if test "x${have_iconv}" = "xyes" ; then
486       AC_MSG_CHECKING([whether iconv() is in libc])
487
488       AC_LINK_IFELSE(
489          [AC_LANG_PROGRAM(
490              [[
491 #include <stdlib.h>
492 #include <iconv.h>
493              ]],
494              [[
495 iconv_t ic;
496 size_t count = iconv(ic, NULL, NULL, NULL, NULL);
497              ]])],
498          [have_iconv="yes"],
499          [have_iconv="no"])
500
501       AC_MSG_RESULT([${have_iconv}])
502    fi
503
504    if test "x${have_iconv}" = "xno" ; then
505       AC_MSG_CHECKING([whether iconv() is in libiconv.a])
506
507       LIBS_save="${LIBS}"
508       LIBS="-liconv $LIBS"
509       AC_LINK_IFELSE(
510          [AC_LANG_PROGRAM(
511              [[
512 #include <stdlib.h>
513 #include <iconv.h>
514              ]],
515              [[
516 iconv_t ic;
517 size_t count;
518 count = iconv(ic, NULL, NULL, NULL, NULL);
519              ]])],
520          [have_iconv="yes"],
521          [
522           have_iconv="no"
523           LIBS=${LIBS_save}
524          ])
525
526       AC_MSG_RESULT([${have_iconv}])
527    fi
528
529    if test "x${have_iconv}" = "xno" ; then
530       AC_MSG_CHECKING([whether iconv() is in libiconv_plug.a])
531
532       LIBS_save="${LIBS}"
533       LIBS="-liconv_plug $LIBS"
534       AC_LINK_IFELSE(
535          [AC_LANG_PROGRAM(
536              [[
537 #include <stdlib.h>
538 #include <iconv.h>
539              ]],
540              [[
541 iconv_t ic;
542 size_t count = iconv(ic, NULL, NULL, NULL, NULL);
543              ]])],
544          [have_iconv="yes"],
545          [
546           have_iconv="no"
547           LIBS=${LIBS_save}
548          ])
549
550       AC_MSG_RESULT([${have_iconv}])
551    fi
552 fi
553
554 if test "x${have_iconv}" = "xyes" ; then
555    AC_DEFINE([HAVE_ICONV], [1], [Set to 1 if iconv library is installed])
556 fi
557
558 #check for dirfd API presence
559 have_dirfd="no"
560 AC_CHECK_FUNCS([dirfd], [have_dirfd="yes"], [])
561 if test "x${dirfd}" = "xyes"; then
562    AC_DEFINE(HAVE_DIRFD)
563 fi
564 AC_CHECK_FUNCS([openat], [AC_DEFINE(HAVE_OPENAT)], [])
565 AC_CHECK_FUNCS([statat], [AC_DEFINE(HAVE_STATAT)], [])
566 AC_CHECK_FUNCS([fpathconf], [AC_DEFINE(HAVE_FPATHCONF)], [])
567
568 ### Modules
569
570 if test "x${have_default_mempool}" = "xyes" ; then
571    enable_chained_pool="no"
572    enable_pass_through="static"
573 else
574    enable_chained_pool="static"
575    enable_pass_through="no"
576 fi
577
578 enable_one_big="static"
579
580 EINA_CHECK_MODULE([chained-pool],   [${enable_chained_pool}], [chained pool])
581 EINA_CHECK_MODULE([ememoa-fixed],   [${enable_ememoa}],       [ememoa fixed])
582 EINA_CHECK_MODULE([ememoa-unknown], [${enable_ememoa}],       [ememoa unknown])
583 EINA_CHECK_MODULE([fixed-bitmap],   [no],                     [fixed bitmap])
584 EINA_CHECK_MODULE([pass-through],   [${enable_pass_through}], [pass through])
585 EINA_CHECK_MODULE([buddy],          [no],                     [buddy])
586 EINA_CHECK_MODULE([one-big],        [${enable_one_big}],      [one big])
587
588 ### Make the debug preprocessor configurable
589
590 ### Unit tests, coverage and benchmarking
591
592 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
593
594 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
595 EINA_CFLAGS="${EINA_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
596 EINA_LIBS="${EINA_LIBS} ${EFL_COVERAGE_LIBS}"
597 if test "x$enable_coverage" = "xyes" ; then
598    EINA_CFLAGS="${EINA_CFLAGS} ${EFL_DEBUG_CFLAGS}"
599 fi
600
601 EFL_CHECK_BENCHMARK([enable_benchmark="yes"], [enable_benchmark="no"])
602 EINA_BENCH_MODULE([glib], [${enable_benchmark}], [glib-2.0], [enable_benchmark_glib="yes"], [enable_benchmark_glib="no"])
603 if test -n "$CXX" && test "x$enable_benchmark" = "xyes" ; then
604    AC_DEFINE_UNQUOTED([CITYHASH_BENCH], [1], [enable bench tests for google hash method])
605 fi
606 AM_CONDITIONAL([CITYHASH_BENCH], [test -n "$CXX" && test "x$enable_benchmark" = "xyes"])
607
608 AC_SUBST(requirement_eina)
609
610 ### Create the .pc.in file according to the major version
611 #cat > ${srcdir}/eina-${VMAJ}.pc.in << EOF
612 #prefix=@prefix@
613 #exec_prefix=@exec_prefix@
614 #libdir=@libdir@
615 #includedir=@includedir@
616 #
617 #Name: Eina
618 #Description: A Library that implements fast data types and miscellaneous tools
619 #Requires:
620 #Version: @VERSION@
621 #Libs: -L${libdir} -leina
622 #Libs.private: -ldl
623 #Cflags: -I${includedir}/eina-@VMAJ@ -I${includedir}/eina-@VMAJ@/eina
624 #EOF
625
626 AC_CONFIG_FILES([
627 Makefile
628 eina.pc
629 eina.spec
630 doc/Makefile
631 src/Makefile
632 src/include/Makefile
633 src/include/eina_config.h
634 src/lib/Makefile
635 src/modules/Makefile
636 src/modules/mp/Makefile
637 src/modules/mp/chained_pool/Makefile
638 src/modules/mp/ememoa_fixed/Makefile
639 src/modules/mp/ememoa_unknown/Makefile
640 src/modules/mp/pass_through/Makefile
641 src/modules/mp/fixed_bitmap/Makefile
642 src/modules/mp/buddy/Makefile
643 src/modules/mp/one_big/Makefile
644 src/tests/Makefile
645 ])
646
647 AC_OUTPUT
648
649 #####################################################################
650 ## Info
651
652 echo
653 echo
654 echo
655 echo "------------------------------------------------------------------------"
656 echo "$PACKAGE $VERSION"
657 echo "------------------------------------------------------------------------"
658 echo
659 echo
660 echo "Configuration Options Summary:"
661 echo
662 echo "  Magic debug..........: ${have_magic_debug}"
663 echo "  Safety checks........: ${have_safety_checks}"
664 echo "  Maximum log level....: ${with_max_log_level}"
665 echo "  Report string usage..: ${have_stringshare_usage}"
666 echo "  Valgrind support.....: ${have_valgrind}"
667 echo "  Default mempool......: ${have_default_mempool}"
668 echo "  Thread Support.......: ${have_threads}"
669 if test "${have_threads}" = "POSIX" ; then
670 echo "    spinlock...........: ${have_posix_threads_spinlock}"
671 echo "    debug usage........: ${have_debug_threads}"
672 fi
673 echo "  Amalgamation.........: ${do_amalgamation}"
674 echo "  Iconv support........: ${have_iconv}"
675 echo "  File dirfd...........: ${have_dirfd}"
676 echo
677 echo "  Documentation........: ${build_doc}"
678 echo "  Tests................: ${enable_tests}"
679 echo "  Coverage.............: ${enable_coverage}"
680 echo "  Benchmark............: ${enable_benchmark}"
681 if test "x${enable_benchmark}" = "xyes" ; then
682 echo "    Glib...............: ${enable_benchmark_glib}"
683 echo "    E17 real data......: ${enable_benchmark_e17}"
684 fi
685 echo
686 echo "  CPU Specific Extensions:"
687 echo "    MMX................: ${have_mmx}"
688 echo "    SSE................: ${have_sse}"
689 echo "    SSE2...............: ${have_sse2}"
690 echo "    ALTIVEC............: ${have_altivec}"
691 echo
692 echo "  Memory pools:"
693 echo "    Chained pool.......: ${enable_chained_pool}"
694 echo "    Ememoa fixed.......: ${enable_ememoa_fixed}"
695 echo "    Ememoa unknown.....: ${enable_ememoa_unknown}"
696 echo "    Fixed bitmap.......: ${enable_fixed_bitmap}"
697 echo "    Pass through.......: ${enable_pass_through}"
698 echo "    Buddy..............: ${enable_buddy}"
699 echo "    One big............: ${enable_one_big}"
700 echo
701 echo "Compilation............: make (or gmake)"
702 echo "  CPPFLAGS.............: $CPPFLAGS"
703 echo "  CFLAGS...............: $CFLAGS"
704 echo "  LDFLAGS..............: $LDFLAGS"
705 echo
706 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
707 echo "  prefix...............: $prefix"
708 echo
709 EFL_FORM_VOLTRON